From e5a8992abac84f5e586343204964df1b2f514fa7 Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Wed, 10 Apr 2024 07:27:21 +0300 Subject: [PATCH 1/3] Add Linux build to Steam --- .github/workflows/build.yml | 7 +++++++ Support/steam/app.vdf.j2 | 1 + Support/steam/main_depot.linux.vdf.j2 | 25 +++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 Support/steam/main_depot.linux.vdf.j2 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52074a364e..e225616427 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -917,6 +917,11 @@ jobs: with: name: MacOS (signed) path: build_macos + - name: Download Build Artifacts (Linux) + uses: actions/download-artifact@v4 + with: + name: Linux + path: build_linux - name: Upload Build run: | cd build_macos @@ -926,6 +931,7 @@ jobs: 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/main_depot.vdf + jinjanate Support/steam/main_depot.linux.vdf.j2 > build_linux/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: @@ -935,6 +941,7 @@ jobs: 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_LINUX_DEPOT_ID: ${{ vars.STEAM_LINUX_DEPOT_ID }} OPEN_BRUSH_EXECUTABLE: ${{ needs.configuration.outputs.basename}}.exe CHANNEL: beta - name: Update steam login secret diff --git a/Support/steam/app.vdf.j2 b/Support/steam/app.vdf.j2 index bee4ff242f..cb2b3f771b 100644 --- a/Support/steam/app.vdf.j2 +++ b/Support/steam/app.vdf.j2 @@ -11,5 +11,6 @@ { "{{ OPEN_BRUSH_WINDOWS_DEPOT_ID }}" build_windows_openxr/main_depot.vdf "{{ OPEN_BRUSH_MAC_DEPOT_ID }}" build_macos/main_depot.vdf + "{{ OPEN_BRUSH_LINUX_DEPOT_ID }}" build_linux/main_depot.vdf } } diff --git a/Support/steam/main_depot.linux.vdf.j2 b/Support/steam/main_depot.linux.vdf.j2 new file mode 100644 index 0000000000..90ab8bcbfe --- /dev/null +++ b/Support/steam/main_depot.linux.vdf.j2 @@ -0,0 +1,25 @@ +"DepotBuildConfig" +{ + // # Set your assigned depot ID here + "DepotID" "{{ OPEN_BRUSH_LINUX_DEPOT_ID }}" + + "ContentRoot" "build_linux/StandaloneLinux64" + + "FileMapping" + { + // Include all files in the build output directory (ContentRoot) + "LocalPath" "*" + + // Destination is the main install directory + "DepotPath" "." + + // If LocalPath contains wildcards, setting this means that all + // matching files within subdirectories of LocalPath will also + // be included. + "recursive" "1" + } + + // but exclude all symbol files + "FileExclusion" "*.pdb" + "FileExclusion" "build_log.txt" +} From 16c412190733b0aa334348b6b0fbdf364c2c7e7f Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Wed, 10 Apr 2024 07:30:49 +0300 Subject: [PATCH 2/3] Add Linux build to Github release --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e225616427..65d2489103 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -778,6 +778,12 @@ jobs: name: Android Pico path: build_android_pico + - name: Download Build Artifacts (Linux) + uses: actions/download-artifact@v4 + with: + name: Linux + path: build_linux + - name: Download Build Artifacts (Mac) uses: actions/download-artifact@v4 with: @@ -795,11 +801,13 @@ jobs: mv build_windows_openxr/StandaloneWindows64/ releases/OpenBrush_Desktop_$VERSION/ mv build_windows_rift/StandaloneWindows64/ releases/OpenBrush_Rift_$VERSION/ mv build_macos/*.dmg releases/OpenBrush_Mac_$VERSION.dmg + mv build_macos/StandaloneLinux64/ releases/OpenBrush_Linux_$VERSION/ cd releases zip -r OpenBrush_Desktop_$VERSION.zip OpenBrush_Desktop_$VERSION/ - zip -r OpenBrush_Rift_$VERSION.zip OpenBrush_Rift_$VERSION/ rm -rf OpenBrush_Desktop_$VERSION + zip -r OpenBrush_Rift_$VERSION.zip OpenBrush_Rift_$VERSION/ rm -rf OpenBrush_Rift_$VERSION + zip -r OpenBrush_Linux_$VERSION.zip OpenBrush_Linux_$VERSION/ - name: Publish uses: softprops/action-gh-release@v2 From 7b4291a13304289ace49eeed63027ca04f05f98b Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Wed, 10 Apr 2024 09:12:51 +0300 Subject: [PATCH 3/3] Rename OPEN_BRUSH_EXECUTABLE to OPEN_BRUSH_WINDOWS_EXECUTABLE --- .github/workflows/build.yml | 2 +- Support/steam/installscript_win.vdf.j2 | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65d2489103..f5e6e48a5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -950,7 +950,7 @@ jobs: OPEN_BRUSH_WINDOWS_DEPOT_ID: ${{ vars.STEAM_WINDOWS_DEPOT_ID }} OPEN_BRUSH_MAC_DEPOT_ID: ${{ vars.STEAM_MAC_DEPOT_ID }} OPEN_BRUSH_LINUX_DEPOT_ID: ${{ vars.STEAM_LINUX_DEPOT_ID }} - OPEN_BRUSH_EXECUTABLE: ${{ needs.configuration.outputs.basename}}.exe + OPEN_BRUSH_WINDOWS_EXECUTABLE: ${{ needs.configuration.outputs.basename}}.exe CHANNEL: beta - name: Update steam login secret run: | diff --git a/Support/steam/installscript_win.vdf.j2 b/Support/steam/installscript_win.vdf.j2 index 9ed6105813..744be6c7ea 100644 --- a/Support/steam/installscript_win.vdf.j2 +++ b/Support/steam/installscript_win.vdf.j2 @@ -12,12 +12,12 @@ InstallScript { } "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Icosa.OpenBrush.File\\DefaultIcon" { string { - "(Default)" "%INSTALLDIR%\\{{ OPEN_BRUSH_EXECUTABLE }}" + "(Default)" "%INSTALLDIR%\\{{ OPEN_BRUSH_WINDOWS_EXECUTABLE }}" } } "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Icosa.OpenBrush.File\\Shell\\Open\\Command" { string { - "(Default)" "%WINDIR%\\System32\\WindowsPowershell\\v1.0\\powershell -windowstyle hidden -c \"try { $s=[uri]::EscapeDataString('%1'); (new-object System.Net.WebClient).DownloadString('http://localhost:40074/load?'+$s) } catch { & '%INSTALLDIR%\\{{ OPEN_BRUSH_EXECUTABLE }}' '%1' }\"" + "(Default)" "%WINDIR%\\System32\\WindowsPowershell\\v1.0\\powershell -windowstyle hidden -c \"try { $s=[uri]::EscapeDataString('%1'); (new-object System.Net.WebClient).DownloadString('http://localhost:40074/load?'+$s) } catch { & '%INSTALLDIR%\\{{ OPEN_BRUSH_WINDOWS_EXECUTABLE }}' '%1' }\"" } } "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\tiltbrush" { @@ -30,17 +30,17 @@ InstallScript { } "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\tiltbrush\\DefaultIcon" { string { - "(Default)" "%INSTALLDIR%\\{{ OPEN_BRUSH_EXECUTABLE }}" + "(Default)" "%INSTALLDIR%\\{{ OPEN_BRUSH_WINDOWS_EXECUTABLE }}" } } "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\tiltbrush\\Shell\\Open\\Command" { string { - "(Default)" "%WINDIR%\\System32\\WindowsPowershell\\v1.0\\powershell -windowstyle hidden -c \"try { $s=[uri]::EscapeDataString('%1'); (new-object System.Net.WebClient).DownloadString('http://localhost:40074/load?'+$s) } catch { & '%INSTALLDIR%\\{{ OPEN_BRUSH_EXECUTABLE }}' '%1' }\"" + "(Default)" "%WINDIR%\\System32\\WindowsPowershell\\v1.0\\powershell -windowstyle hidden -c \"try { $s=[uri]::EscapeDataString('%1'); (new-object System.Net.WebClient).DownloadString('http://localhost:40074/load?'+$s) } catch { & '%INSTALLDIR%\\{{ OPEN_BRUSH_WINDOWS_EXECUTABLE }}' '%1' }\"" } } } Firewall { - "Open Brush" "%INSTALLDIR%\\{{ OPEN_BRUSH_EXECUTABLE }}" + "Open Brush" "%INSTALLDIR%\\{{ OPEN_BRUSH_WINDOWS_EXECUTABLE }}" } }