Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/snap-ghosts
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Apr 7, 2024
2 parents dbfb6e7 + bbe7337 commit 95e1c51
Show file tree
Hide file tree
Showing 58 changed files with 2,884 additions and 2,125 deletions.
69 changes: 32 additions & 37 deletions .github/workflows/build.yml
Expand Up @@ -181,17 +181,12 @@ jobs:
cache: Windows
extra_defines: OCULUS_SUPPORTED

- name: Windows Monoscopic
targetPlatform: StandaloneWindows64
vrsdk: Monoscopic
cache: Windows

- name: Linux Monoscopic
- name: Linux
targetPlatform: StandaloneLinux64
vrsdk: Monoscopic
vrsdk: Monoscopic # All builds include monoscopic, but this one has no additional XrSdk, so we'll keep the name monoscopic
cache: Linux

- name: MacOS Monoscopic
- name: MacOS
targetPlatform: StandaloneOSX
vrsdk: Monoscopic
cache: MacOS
Expand Down Expand Up @@ -591,8 +586,8 @@ jobs:
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: MacOS Monoscopic
path: build_macos_monoscopic
name: MacOS
path: build_macos

# See https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
- name: Install the Apple certificate and provisioning profile
Expand Down Expand Up @@ -629,7 +624,7 @@ jobs:
env:
VERSION: ${{ needs.configuration.outputs.version }}
run: |
tar xvfz build_macos_monoscopic/*tgz
tar xvfz build_macos/*tgz
export FILENAME=$(basename $(readlink -f StandaloneOSX/OpenBrush*.app))
Expand All @@ -644,7 +639,7 @@ jobs:
- name: Upload signed app
uses: actions/upload-artifact@v4
with:
name: MacOS Monoscopic (signed)
name: MacOS (signed)
path: |
OpenBrush.tgz
Expand All @@ -669,14 +664,14 @@ jobs:
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: MacOS Monoscopic (signed)
path: build_macos_monoscopic
name: MacOS (signed)
path: build_macos

- name: Create a notarized DMG
env:
VERSION: ${{ needs.configuration.outputs.version }}
run: |
tar xvfz build_macos_monoscopic/*tgz
tar xvfz build_macos/*tgz
export FILENAME=$(basename $(readlink -f StandaloneOSX/OpenBrush*.app))
mkdir dist
Expand All @@ -701,7 +696,7 @@ jobs:
- name: Upload notarized dmg
uses: actions/upload-artifact@v4
with:
name: MacOS Monoscopic (DMG)
name: MacOS (DMG)
path: |
dist/OpenBrush.dmg
Expand Down Expand Up @@ -765,12 +760,6 @@ jobs:
name: Windows Rift
path: build_windows_rift

- name: Download Build Artifacts (Windows Monoscopic)
uses: actions/download-artifact@v4
with:
name: Windows Monoscopic
path: build_windows_mono

- name: Download Build Artifacts (Android OpenXR)
uses: actions/download-artifact@v4
with:
Expand All @@ -792,8 +781,8 @@ jobs:
- name: Download Build Artifacts (Mac)
uses: actions/download-artifact@v4
with:
name: MacOS Monoscopic (DMG)
path: build_monoscopic_macos
name: MacOS (DMG)
path: build_macos

- name: Package Artifacts for release
env:
Expand All @@ -805,15 +794,12 @@ jobs:
mv build_android_pico/*/com.Icosa.OpenBrush*apk releases/OpenBrush_Pico_$VERSION.apk
mv build_windows_openxr/StandaloneWindows64/ releases/OpenBrush_Desktop_$VERSION/
mv build_windows_rift/StandaloneWindows64/ releases/OpenBrush_Rift_$VERSION/
mv build_windows_mono/StandaloneWindows64/ releases/OpenBrush_Mono_$VERSION/
mv build_monoscopic_macos/*.dmg releases/OpenBrush_Mac_Mono_$VERSION.dmg
mv build_macos/*.dmg releases/OpenBrush_Mac_$VERSION.dmg
cd releases
zip -r OpenBrush_Desktop_$VERSION.zip OpenBrush_Desktop_$VERSION/
zip -r OpenBrush_Rift_$VERSION.zip OpenBrush_Rift_$VERSION/
zip -r OpenBrush_Mono_$VERSION.zip OpenBrush_Mono_$VERSION/
rm -rf OpenBrush_Desktop_$VERSION
rm -rf OpenBrush_Rift_$VERSION
rm -rf OpenBrush_Mono_$VERSION
- name: Publish
uses: softprops/action-gh-release@v2
Expand Down Expand Up @@ -869,20 +855,29 @@ jobs:
"pr_template": "- #{{TITLE}} ([PR ##{{NUMBER}}](#{{URL}}) by @#{{AUTHOR}})\n"
}
- name: Get the current contents of the docs repository
uses: actions/checkout@v4
with:
repository: icosa-foundation/open-brush-docs
path: open-brush-docs
ref: master
fetch-depth: 0
sparse-checkout: |
release-history/
- name: Create Changelog file
env:
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
run: |
mkdir -p changelog/
echo "$CHANGELOG" | tee changelog/automatic-changelog.md
echo "$CHANGELOG" | tee open-brush-docs/release-history/automatic-changelog.md
- name: Publish release notes
uses: cpina/github-action-push-to-another-repository@composite-1.5.1
env:
SSH_DEPLOY_KEY: ${{ secrets.OPENBRUSH_DOCS_SSH_DEPLOY_KEY }}
with:
source-directory: 'changelog/'
target-directory: 'automatic-release-notes/'
source-directory: 'open-brush-docs/release-history/'
target-directory: 'release-history/'
destination-github-username: 'icosa-foundation'
destination-repository-name: 'open-brush-docs'
user-name: 'release-note-bot'
Expand Down Expand Up @@ -917,20 +912,20 @@ jobs:
with:
name: Windows OpenXR
path: build_windows_openxr
- name: Download Build Artifacts (MacOS Monoscopic Signed)
- name: Download Build Artifacts (MacOS Signed)
uses: actions/download-artifact@v4
with:
name: MacOS Monoscopic (signed)
path: build_macos_monoscopic
name: MacOS (signed)
path: build_macos
- name: Upload Build
run: |
cd build_macos_monoscopic
cd build_macos
tar xvfz OpenBrush.tgz
cd -
pip install -U jinjanator
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/main_depot.mac.vdf.j2 > build_macos/main_depot.vdf
jinjanate Support/steam/installscript_win.vdf.j2 > build_windows_openxr/installscript_win.vdf
steamcmd +login $STEAM_USERNAME +run_app_build $(pwd)/app.vdf +quit
env:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/third_party_notices.yml
@@ -0,0 +1,19 @@
---
# yamllint disable rule:line-length
name: Check for updated Third Party Notices

on: # yamllint disable-line rule:truthy
pull_request:

jobs:
third-party-notices:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
- name: Run the generator
run: |
python Support/Python/unitybuild/generate_notice.py
git diff --exit-code
39 changes: 3 additions & 36 deletions Assets/Editor/BuildTiltBrush.cs
Expand Up @@ -111,9 +111,6 @@ public BuildFailedException(string message)
private static readonly List<KeyValuePair<XrSdkMode, BuildTarget>> kValidSdkTargets
= new List<KeyValuePair<XrSdkMode, BuildTarget>>()
{
// Mono
new KeyValuePair<XrSdkMode, BuildTarget>(XrSdkMode.Monoscopic, BuildTarget.StandaloneWindows64),

// OpenXR
new KeyValuePair<XrSdkMode, BuildTarget>(XrSdkMode.OpenXR, BuildTarget.StandaloneWindows64),
new KeyValuePair<XrSdkMode, BuildTarget>(XrSdkMode.OpenXR, BuildTarget.Android),
Expand Down Expand Up @@ -204,7 +201,6 @@ public static XrSdkMode GuiSelectedSdk
set
{
EditorPrefs.SetString(kMenuPluginPref, value.ToString());
Menu.SetChecked(kMenuPluginMono, value == XrSdkMode.Monoscopic);
Menu.SetChecked(kMenuPluginOpenXr, value == XrSdkMode.OpenXR);
#if OCULUS_SUPPORTED
Menu.SetChecked(kMenuPluginOculus, value == XrSdkMode.Oculus);
Expand Down Expand Up @@ -392,19 +388,6 @@ static bool MenuItem_BackgroundBuild_Validate()

//======= SDKs =======

[MenuItem(kMenuPluginMono, isValidateFunction: false, priority: 100)]
static void MenuItem_Plugin_Mono()
{
GuiSelectedSdk = XrSdkMode.Monoscopic;
}

[MenuItem(kMenuPluginMono, isValidateFunction: true)]
static bool MenuItem_Plugin_Mono_Validate()
{
Menu.SetChecked(kMenuPluginMono, GuiSelectedSdk == XrSdkMode.Monoscopic);
return true;
}

[MenuItem(kMenuPluginOpenXr, isValidateFunction: false, priority: 110)]
static void MenuItem_Plugin_OpenXr()
{
Expand Down Expand Up @@ -630,17 +613,6 @@ static public BuildTargetGroup TargetToGroup(BuildTarget buildTarget)
}
}

static public SdkMode XrTargetToSdk(XrSdkMode mode)
{
switch (mode)
{
case XrSdkMode.Monoscopic:
return SdkMode.Monoscopic;
default:
return SdkMode.UnityXR;
}
}

// Removes the the given suffix from text.
// Returns true on success
static bool RemoveSuffix(ref string text, string suffix)
Expand Down Expand Up @@ -1200,9 +1172,6 @@ public TempSetXrPlugin(TiltBuildOptions tiltOptions)
case XrSdkMode.Zapbox:
targetXrPluginsRequired = new string[] { "Zappar.XR.ZapboxLoader" };
break;
case XrSdkMode.Monoscopic:
targetSettings.InitManagerOnStart = false;
break;
default:
break;
}
Expand Down Expand Up @@ -1466,7 +1435,7 @@ static void ShowBrushExportTextures()
using (var unused = new TempHookUpSingletons())
{
// Set consultUserConfig = false to keep user config from affecting the build output.
TiltBrushManifest manifest = App.Instance.GetMergedManifest(consultUserConfig: false);
TiltBrushManifest manifest = App.Instance.GetMergedManifest(forceExperimental: true);

StringBuilder s = new StringBuilder();
foreach (BrushDescriptor desc in manifest.UniqueBrushes())
Expand Down Expand Up @@ -1558,8 +1527,7 @@ public static void DoBuild(TiltBuildOptions tiltOptions)
"ProjectSettings/GraphicsSettings.asset")))
{
var config = App.Config;
// TODO: can we think of a better way of switching to mono/something else in the future?
config.m_SdkMode = XrTargetToSdk(xrSdk);
config.m_SdkMode = SdkMode.UnityXR;
config.m_AutoProfile = tiltOptions.AutoProfile;
config.m_BuildStamp = stamp;
//config.OnValidate(xrSdk, TargetToGroup(target));
Expand All @@ -1579,8 +1547,7 @@ public static void DoBuild(TiltBuildOptions tiltOptions)
// to be run at build-time (ie when nobody has called Start(), Awake()).
// TempHookupSingletons() has done just enough initialization to make it happy.
// Also set consultUserConfig = false to keep user config from affecting the build output.
TiltBrushManifest manifest = App.Instance.GetMergedManifest(
consultUserConfig: false, forceExperimental: true);
TiltBrushManifest manifest = App.Instance.GetMergedManifest(forceExperimental: true);

// Some sanity checks
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/Editor/PanelLister.cs
Expand Up @@ -23,7 +23,7 @@ static void ListPanels()
panelList.AppendLine($"m_Advanced\tm_Basic\tm_ModeGvr\tm_ModeMono\tm_ModeQuest\tm_ModeVr\tm_PanelPrefab\tm_ModeVrExperimental");
foreach (var panel in m_PanelMap)
{
panelList.AppendLine($"{panel.m_Advanced}\t{panel.m_Basic}\t{panel.m_ModeGvr}\t{panel.m_ModeMono}\t{panel.m_ModeQuest}\t{panel.m_ModeVr}\t{panel.m_PanelPrefab}\t{panel.m_ModeVrExperimental}");
panelList.AppendLine($"{panel.m_Advanced}\t{panel.m_Basic}\t{panel.m_ModeMono}\t{panel.m_ModeQuest}\t{panel.m_ModeVr}\t{panel.m_PanelPrefab}");
}


Expand Down
31 changes: 7 additions & 24 deletions Assets/Editor/PanelMapKeyDrawer.cs
Expand Up @@ -63,36 +63,19 @@ public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)

NextRect(baseX, pos.y, 10, baseHeight, 12);
EditorGUI.PropertyField(drawRect, prop.FindPropertyRelative("m_ModeVr"), GUIContent.none);
NextRect(baseX, pos.y, 30, baseHeight, 30);
EditorGUI.LabelField(drawRect, new GUIContent("VR"));

NextRect(baseX, pos.y, 10, baseHeight, 12);
EditorGUI.PropertyField(drawRect, prop.FindPropertyRelative("m_ModeVrExperimental"),
GUIContent.none);
NextRect(baseX, pos.y, 30, baseHeight, 30);
EditorGUI.LabelField(drawRect, new GUIContent("Exp"));

NextRect(baseX, pos.y, 10, baseHeight, 12);
EditorGUI.PropertyField(drawRect, prop.FindPropertyRelative("m_ModeQuestExperimental"),
GUIContent.none);
NextRect(baseX, pos.y, 30, baseHeight, 30);
EditorGUI.LabelField(drawRect, new GUIContent("ExpQ"));

NextRect(baseX, pos.y, 10, baseHeight, 12);
EditorGUI.PropertyField(drawRect, prop.FindPropertyRelative("m_ModeMono"), GUIContent.none);
NextRect(baseX, pos.y, 30, baseHeight, 30);
EditorGUI.LabelField(drawRect, new GUIContent("Mo", "Monoscopic"));
NextRect(baseX, pos.y, 40, baseHeight, 40);
EditorGUI.LabelField(drawRect, new GUIContent("PCVR"));

NextRect(baseX, pos.y, 10, baseHeight, 12);
EditorGUI.PropertyField(drawRect, prop.FindPropertyRelative("m_ModeQuest"),
GUIContent.none);
NextRect(baseX, pos.y, 30, baseHeight, 30);
EditorGUI.LabelField(drawRect, new GUIContent("OQ", "Oculus Quest"));
NextRect(baseX, pos.y, 40, baseHeight, 40);
EditorGUI.LabelField(drawRect, new GUIContent("Quest", "Oculus Quest"));

NextRect(baseX, pos.y, 10, baseHeight, 12);
EditorGUI.PropertyField(drawRect, prop.FindPropertyRelative("m_ModeGvr"), GUIContent.none);
NextRect(baseX, pos.y, 30, baseHeight, 30);
EditorGUI.LabelField(drawRect, new GUIContent("GVR"));
EditorGUI.PropertyField(drawRect, prop.FindPropertyRelative("m_ModeMono"), GUIContent.none);
NextRect(baseX, pos.y, 40, baseHeight, 60);
EditorGUI.LabelField(drawRect, new GUIContent("Mono", "Monoscopic"));

NextRect(baseX, pos.y, 10, baseHeight, 12);
EditorGUI.PropertyField(drawRect, prop.FindPropertyRelative("m_Basic"), GUIContent.none);
Expand Down

0 comments on commit 95e1c51

Please sign in to comment.