Skip to content

Commit

Permalink
Merge branch 'main' into fix/bump-maps-to-normal-maps
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Mar 27, 2024
2 parents 396c443 + 410ed33 commit d95b5de
Show file tree
Hide file tree
Showing 57 changed files with 30,877 additions and 254 deletions.
74 changes: 60 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
STAMP=""
echo "prerelease=false" >> $GITHUB_OUTPUT
echo "itchchannelname=release" >> $GITHUB_OUTPUT
echo "fastlanelane=release" >> $GITHUB_OUTPUT
echo "fastlanelane=beta" >> $GITHUB_OUTPUT
else
# This is the first 7 characters of the commit; we do it this way rather than via rev-parse to avoid an 'if' conditional depending on whether it's a PR or push. (unlike git describe, git rev-parse doesn't default to the current HEAD)
Expand Down Expand Up @@ -571,15 +571,14 @@ jobs:
# Some platforms share a cache; it's not a 1:1 mapping of either targetPlatform or vrsdk, so we have a distinct variable for which cache to use
key: Library_${{ matrix.cache }}_${{ env.UNITY_VERSION }}

createdmg:
name: Create and Notarize DMG
needs: [configuration, build]
signmacos:
name: Sign the MacOS .app
needs: [build]
if: |
github.event_name == 'push' &&
github.repository == 'icosa-foundation/open-brush' &&
(github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v'))
runs-on: macos-latest # the ovr-platform-util tool is only available for Mac and Windows
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -636,12 +635,49 @@ jobs:
cd StandaloneOSX/
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements ../Support/macos/OpenBrush.entitlements --sign "Developer ID Application: Icosa Gallery Ltd (${{ vars.APPLE_TEAM_ID }})" $FILENAME/Contents/Support/ThirdParty/ffmpeg/bin/ffmpeg
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements ../Support/macos/OpenBrush.entitlements --sign "Developer ID Application: Icosa Gallery Ltd (${{ vars.APPLE_TEAM_ID }})" $FILENAME/Contents/Plugins/UsdCs.bundle
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements ../Support/macos/OpenBrush.entitlements --sign "Developer ID Application: Icosa Gallery Ltd (${{ vars.APPLE_TEAM_ID }})" $FILENAME/Contents/Plugins/lib_burst_generated.bundle
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements ../Support/macos/OpenBrush.entitlements --sign "Developer ID Application: Icosa Gallery Ltd (${{ vars.APPLE_TEAM_ID }})" $FILENAME
cd -
tar -c -v -z -f OpenBrush.tgz StandaloneOSX
- name: Upload signed app
uses: actions/upload-artifact@v4
with:
name: MacOS Monoscopic (signed)
path: |
OpenBrush.tgz
createdmg:
name: Create and Notarize DMG
needs: [signmacos]
if: |
github.event_name == 'push' &&
github.repository == 'icosa-foundation/open-brush' &&
(github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/v'))
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true # We don't use LFS, but it adds no time, and leave it here in case we do at some point later
sparse-checkout: |
Support/macos
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: MacOS Monoscopic (signed)
path: build_macos_monoscopic

- name: Create a notarized DMG
env:
VERSION: ${{ needs.configuration.outputs.version }}
run: |
tar xvfz build_macos_monoscopic/*tgz
export FILENAME=$(basename $(readlink -f StandaloneOSX/OpenBrush*.app))
mkdir dist
Expand Down Expand Up @@ -855,7 +891,7 @@ jobs:

publish_steam:
name: Publish Steam Release
needs: [configuration, build, createdmg]
needs: [build, signmacos]
if: |
github.event_name == 'push' &&
github.repository == 'icosa-foundation/open-brush' &&
Expand All @@ -881,19 +917,29 @@ jobs:
with:
name: Windows OpenXR
path: build_windows_openxr
- name: Download Build Artifacts (MacOS Monoscopic Signed)
uses: actions/download-artifact@v4
with:
name: MacOS Monoscopic (signed)
path: build_macos_monoscopic
- name: Upload Build
run: |
cd build_macos_monoscopic
tar xvfz OpenBrush.tgz
cd -
pip install -U jinjanator
jinjanate Support/steam/app.vdf.j2 > build_windows_openxr/app.vdf
jinjanate Support/steam/main_depot.vdf.j2 > build_windows_openxr/main_depot.vdf
jinjanate Support/steam/app.vdf.j2 > app.vdf
jinjanate Support/steam/main_depot.win.vdf.j2 > build_windows_openxr/main_depot.vdf
jinjanate Support/steam/main_depot.mac.vdf.j2 > build_macos_monoscopic/main_depot.vdf
jinjanate Support/steam/installscript_win.vdf.j2 > build_windows_openxr/installscript_win.vdf
steamcmd +login $STEAM_USERNAME +run_app_build $(pwd)/build_windows_openxr/app.vdf +quit
steamcmd +login $STEAM_USERNAME +run_app_build $(pwd)/app.vdf +quit
env:
STEAM_USERNAME: ${{ vars.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
VERSION: ${{ needs.configuration.outputs.version }}
OPEN_BRUSH_APP_ID: ${{ vars.STEAM_APP_ID }}
OPEN_BRUSH_WINDOWS_DEPOT_ID: ${{ vars.STEAM_WINDOWS_DEPOT_ID }}
OPEN_BRUSH_MAC_DEPOT_ID: ${{ vars.STEAM_MAC_DEPOT_ID }}
OPEN_BRUSH_EXECUTABLE: ${{ needs.configuration.outputs.basename}}.exe
CHANNEL: beta
- name: Update steam login secret
Expand Down Expand Up @@ -1049,10 +1095,10 @@ jobs:
if [ "$PRERELEASE" == "false" ]
then
./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest_$VERSION.apk --channel LIVE:quest2+ --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so'
./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest_$VERSION.apk --channel LIVE:quest2+ --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so' --age-group MIXED_AGES
else
CHANGELOG="${RAW_CHANGELOG}"
./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest_$VERSION.apk --channel Beta:quest2+ --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so' --notes "${CHANGELOG}"
./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest_$VERSION.apk --channel Beta:quest2+ --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so' --notes "${CHANGELOG}" --age-group MIXED_AGES
fi
publish_oculus_quest1:
Expand Down Expand Up @@ -1089,10 +1135,10 @@ jobs:
if [ "$PRERELEASE" == "false" ]
then
./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest1_$VERSION.apk --channel LIVE:quest1only --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so'
./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest1_$VERSION.apk --channel LIVE:quest1only --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so' --age-group MIXED_AGES
else
CHANGELOG="${RAW_CHANGELOG}"
./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest1_$VERSION.apk --channel Beta:quest1only --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so' --notes "${CHANGELOG}"
./ovr-platform-util upload-quest-build --app-id ${OCULUS_QUEST_APP_ID} --app-secret ${OCULUS_QUEST_APP_SECRET} --apk OpenBrush_Quest1_$VERSION.apk --channel Beta:quest1only --debug_symbols_dir ./arm64-v8a/ --debug-symbols-pattern '*.so' --notes "${CHANGELOG}" --age-group MIXED_AGES
fi
publish_oculus_rift:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5.0.0
- uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
- uses: actions/[email protected]
Expand Down
Binary file modified Assets/AddressableAssetsData/iOS/addressables_content_state.bin
Binary file not shown.
28 changes: 26 additions & 2 deletions Assets/Editor/BuildTiltBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.Build.Reporting;
#if UNITY_IPHONE
#if UNITY_IOS
using UnityEditor.iOS.Xcode;
#endif
using UnityEditor.SceneManagement;
Expand Down Expand Up @@ -926,15 +926,37 @@ public void Dispose()

class TempSetPlayerSettings : IDisposable
{
private BuildTarget m_Target;
private UIOrientation m_OrientationSettings;
private iOSTargetDevice m_iOSTargetDevice;
private Texture2D[] m_Icons;

public TempSetPlayerSettings(TiltBuildOptions tiltOptions)
{
m_Target = tiltOptions.Target;
m_OrientationSettings = PlayerSettings.defaultInterfaceOrientation;
m_iOSTargetDevice = PlayerSettings.iOS.targetDevice;
m_Icons = PlayerSettings.GetIcons(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(TargetToGroup(m_Target)), IconKind.Any);

switch (tiltOptions.XrSdk)
{
case XrSdkMode.Zapbox:
PlayerSettings.defaultInterfaceOrientation = UIOrientation.Portrait;
PlayerSettings.iOS.targetDevice = iOSTargetDevice.iPhoneOnly;
var zapboxIcon = AssetDatabase.LoadAssetAtPath<Texture2D>("Assets/Textures/Trademarked/TiltBrushLogoZapbox.png");

Texture2D[] newIcons = { zapboxIcon };

var buildTarget = UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(TargetToGroup(m_Target));

PlayerSettings.SetIcons(buildTarget, newIcons, IconKind.Any);
#if UNITY_IOS
PlayerSettings.SetIcons(buildTarget, newIcons, IconKind.Notification);
PlayerSettings.SetIcons(buildTarget, newIcons, IconKind.Settings);
PlayerSettings.SetIcons(buildTarget, newIcons, IconKind.Spotlight);
PlayerSettings.SetIcons(buildTarget, newIcons, IconKind.Notification);
PlayerSettings.SetIcons(buildTarget, newIcons, IconKind.Store);
#endif
break;
default:
break;
Expand All @@ -944,6 +966,8 @@ public TempSetPlayerSettings(TiltBuildOptions tiltOptions)
public void Dispose()
{
PlayerSettings.defaultInterfaceOrientation = m_OrientationSettings;
PlayerSettings.iOS.targetDevice = m_iOSTargetDevice;
PlayerSettings.SetIcons(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(TargetToGroup(m_Target)), m_Icons, IconKind.Any);
AssetDatabase.SaveAssets();
}
}
Expand Down Expand Up @@ -1819,7 +1843,7 @@ public static void OnPostProcessBuild(BuildTarget target, string path)
{
// TODO: is it possible to embed loose files on iOS?
looseFilesDest = null;
#if UNITY_IPHONE
#if UNITY_IOS
string pbxPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";

PBXProject project = new PBXProject();
Expand Down
164 changes: 0 additions & 164 deletions Assets/Editor/SerializedPropertyReferenceDrawer.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Editor/SerializedPropertyReferenceDrawer.cs.meta

This file was deleted.

Loading

0 comments on commit d95b5de

Please sign in to comment.