From 70c8f6dea5df61b65f7d70887599c2192719ff51 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Mon, 27 Jul 2026 15:18:50 -0500 Subject: [PATCH 01/37] Update installer.nsi --- installer.nsi | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/installer.nsi b/installer.nsi index 8d887fc..048c03d 100644 --- a/installer.nsi +++ b/installer.nsi @@ -33,8 +33,15 @@ InstallDir $PROGRAMFILES64\Kintsugi3DViewer !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH +; Variables to store uninstall choices +Var Checkbox_ClearViewerCache +Var Checkbox_ClearViewerPreferences +Var ClearViewerCache +Var ClearViewerPreferences + ; Uninstaller Pages !insertmacro MUI_UNPAGE_CONFIRM +UninstPage custom un.CachePageCreate un.CachePageLeave !insertmacro MUI_UNPAGE_INSTFILES ; Language Files @@ -116,6 +123,17 @@ Section "Uninstall" RMDir /r "$SMPROGRAMS\Kintsugi3DViewer" RMDir /r "$INSTDIR" + ; Remove viewer cache + ${If} $ClearViewerCache == 1 + RMDir /r "$APPDATA\Kintsugi 3D Viewer\cache" + RMDir /r "$APPDATA\Kintsugi 3D Viewer\shader_cache" + ${EndIf} + + ; Remove viewer preferences (will also remove cache) + ${If} $ClearViewerPreferences == 1 + RMDir /r "$APPDATA\Kintsugi 3D Viewer" + ${EndIf} + ; Remove Desktop Shortcut Delete "$DESKTOP\Kintsugi 3D Viewer.lnk" @@ -139,6 +157,44 @@ Function LaunchLink FunctionEnd +; Options for uninstalling cache directories +Function un.CachePageCreate + ; Create the page + nsDialogs::Create 1018 + + ; Set Page Header Text + !insertmacro MUI_HEADER_TEXT "Additional Directories" "Choose which additional software directories to remove." + + ${NSD_CreateCheckbox} 10u 10u 100% 12u "Clear Kinstugi3D Viewer Preferences" + Pop $Checkbox_ClearViewerPreferences + ${NSD_Check} $Checkbox_ClearViewerPreferences + ${NSD_OnClick} $Checkbox_ClearViewerPreferences un.OnViewerPreferences + + ${NSD_CreateCheckbox} 10u 25u 100% 12u "Clear Kinstugi3D Viewer Cache" + Pop $Checkbox_ClearViewerCache + ${NSD_Check} $Checkbox_ClearViewerCache + + ; Display the configured page + nsDialogs::Show +FunctionEnd + +; Force clearing preferences to clear cache as well +Function un.OnViewerPreferences + Pop $0 + ${NSD_GetState} $Checkbox_ClearViewerPreferences $0 + ${If} $0 == 1 + ${NSD_Check} $Checkbox_ClearViewerCache + ${Else} + ${NSD_Uncheck} $Checkbox_ClearViewerCache + ${EndIf} +FunctionEnd + +; Read checkbox states +Function un.CachePageLeave + ${NSD_GetState} $Checkbox_ClearViewerCache $ClearViewerCache + ${NSD_GetState} $Checkbox_ClearViewerPreferences $ClearViewerPreferences +FunctionEnd + ; Init function, read previous installation directory Function .onInit From ddf74e455d33ac8cb15d690b3f603e8c8a8a9966 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:05:16 -0500 Subject: [PATCH 02/37] add repository checkout and godot install --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6af464f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: Build + +on: + push: + branches: [ "main", "build-automation" ] + tags: [ "v*.*.*" ] + pull_request: + branches: [ "main" ] + +env: + godot-version: 4.5 + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + version: [ "Windows Desktop (with environments)", "MacOS (all environments)" ] + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install Godot + run: | + curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.universal.zip" + unzip ./godot.zip + mv Godot* Godot + From 710fe3266e824a6cd207851f64f3b61d0918fcbf Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:07:15 -0500 Subject: [PATCH 03/37] remove .universal --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6af464f..5651794 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: - name: Install Godot run: | - curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.universal.zip" + curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" unzip ./godot.zip mv Godot* Godot From 4005a9013bec5e44313fae3725ae3675625cf989 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:51:58 -0500 Subject: [PATCH 04/37] split mac and windows build builds left matrix scope --- .github/workflows/build.yml | 52 +++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5651794..95b81c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,18 +11,60 @@ env: godot-version: 4.5 jobs: - build: + build-windows: + name: "Build installer for Windows" runs-on: ubuntu-latest - strategy: - matrix: - version: [ "Windows Desktop (with environments)", "MacOS (all environments)" ] + env: + project-build: "Windows Desktop (with environments)" steps: - name: Check out repository uses: actions/checkout@v4 - + + - name: Install prerequisites + run: apt install nsis + - name: Install Godot run: | curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" unzip ./godot.zip mv Godot* Godot + + - name: Build project + run: "" + + - name: Upload artifacts + run: "" + + - name: Make installer + if: github.ref_type == 'tag' + run: makensis installer.nsi + + - name: Upload release + if: github.ref_type == 'tag' + run: "" + + build-macos: + name: "Build App for MacOS" + runs-on: ubuntu-latest + env: + project-build: "MacOS (all environments)" + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install Godot + run: | + curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" + unzip ./godot.zip + mv Godot* ../Godot + + - name: Build project + run: "" + + - name: Upload artifacts + run: "" + + - name: Upload release + if: github.ref_type == 'tag' + run: "" From 7063d5d484ea5ac498aa197e938ac4b0a3bc52a7 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:54:11 -0500 Subject: [PATCH 05/37] install permissions --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95b81c9..e7c5b38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@v4 - name: Install prerequisites - run: apt install nsis + run: sudo apt install nsis - name: Install Godot run: | From ff4d18a7b33e54095e532448b2bc75bc33806ea6 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:07:38 -0500 Subject: [PATCH 06/37] add Godot build and artifact upload --- .github/workflows/build.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7c5b38..fb7d2c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,12 @@ env: jobs: build-windows: - name: "Build installer for Windows" + name: "Build for Windows" runs-on: ubuntu-latest env: project-build: "Windows Desktop (with environments)" + artifact-name: "windows-${{ github.ref_name }}" + steps: - name: Check out repository uses: actions/checkout@v4 @@ -30,10 +32,16 @@ jobs: mv Godot* Godot - name: Build project - run: "" + run: ./Godot --headless --path project.godot --export-release "${{ env.project-build }}" build/ + + - name: Zip artifacts + run: zip build/* ${{ env.artifact-name }} - name: Upload artifacts - run: "" + uses: actions/upload-artifact@v4 + with: + name: ${{ env.artifact-name }} + path: . - name: Make installer if: github.ref_type == 'tag' @@ -44,10 +52,11 @@ jobs: run: "" build-macos: - name: "Build App for MacOS" + name: "Build for MacOS" runs-on: ubuntu-latest env: project-build: "MacOS (all environments)" + artifact-name: "macos-${{ github.ref_name }}" steps: - name: Check out repository uses: actions/checkout@v4 @@ -56,13 +65,19 @@ jobs: run: | curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" unzip ./godot.zip - mv Godot* ../Godot + mv Godot* Godot - name: Build project - run: "" + run: ./Godot --headless --path project.godot --export-release "${{ env.project-build }}" build/ + + - name: Zip artifacts + run: zip build/* ${{ env.artifact-name }} - name: Upload artifacts - run: "" + uses: actions/upload-artifact@v4 + with: + name: ${{ env.artifact-name }} + path: . - name: Upload release if: github.ref_type == 'tag' From e810dfec5a7e5e6e1f4415c4400ec9b96e616902 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:09:28 -0500 Subject: [PATCH 07/37] fix project.godot path --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb7d2c9..7d185f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: mv Godot* Godot - name: Build project - run: ./Godot --headless --path project.godot --export-release "${{ env.project-build }}" build/ + run: ./Godot --headless --path ./project.godot --export-release "${{ env.project-build }}" build/ - name: Zip artifacts run: zip build/* ${{ env.artifact-name }} @@ -68,7 +68,7 @@ jobs: mv Godot* Godot - name: Build project - run: ./Godot --headless --path project.godot --export-release "${{ env.project-build }}" build/ + run: ./Godot --headless --path ./project.godot --export-release "${{ env.project-build }}" build/ - name: Zip artifacts run: zip build/* ${{ env.artifact-name }} From aa8132721bc8912fabe0fb07167f909cc37229ca Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:12:56 -0500 Subject: [PATCH 08/37] update build path --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d185f8..e47f7d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: mv Godot* Godot - name: Build project - run: ./Godot --headless --path ./project.godot --export-release "${{ env.project-build }}" build/ + run: ./Godot --headless --path . --export-release "${{ env.project-build }}" build/ - name: Zip artifacts run: zip build/* ${{ env.artifact-name }} @@ -68,7 +68,7 @@ jobs: mv Godot* Godot - name: Build project - run: ./Godot --headless --path ./project.godot --export-release "${{ env.project-build }}" build/ + run: ./Godot --headless --path . --export-release "${{ env.project-build }}" build/ - name: Zip artifacts run: zip build/* ${{ env.artifact-name }} From 76790ad1bc19e3a7de853ae65a139c680d364f81 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:25:09 -0500 Subject: [PATCH 09/37] switch to single environment for testing --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e47f7d9..1fb16d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: name: "Build for Windows" runs-on: ubuntu-latest env: - project-build: "Windows Desktop (with environments)" + project-build: "Windows Desktop (single environment)" artifact-name: "windows-${{ github.ref_name }}" steps: @@ -55,7 +55,7 @@ jobs: name: "Build for MacOS" runs-on: ubuntu-latest env: - project-build: "MacOS (all environments)" + project-build: "MacOS (single environment)" artifact-name: "macos-${{ github.ref_name }}" steps: - name: Check out repository From d3e91aec3c8cb84fd43704d4ce90b994a7b7be3a Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Thu, 13 Aug 2026 14:13:30 -0500 Subject: [PATCH 10/37] test job modularity --- .github/workflows/build.yml | 52 +++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1fb16d8..ac3a3d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,30 +9,40 @@ on: env: godot-version: 4.5 + godot-bin: "./Godot" jobs: - build-windows: - name: "Build for Windows" + godot: + name: "Setup Project" runs-on: ubuntu-latest - env: - project-build: "Windows Desktop (single environment)" - artifact-name: "windows-${{ github.ref_name }}" - - steps: + steps: - name: Check out repository uses: actions/checkout@v4 - - name: Install prerequisites - run: sudo apt install nsis - - name: Install Godot run: | curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" unzip ./godot.zip - mv Godot* Godot + mv Godot* ${{ env.godot-bin }} + + - name: Install Godot export templates + run: ${{ env.godot-bin }} --headless --editor --install-export-templates --verbose + + - name: Update project imports + run: ${{ env.godot-bin }} --headless --import --verbose + + build-windows: + name: "Build for Windows" + runs-on: ubuntu-latest + needs: [ godot ] + env: + project-build: "Windows Desktop (single environment)" + artifact-name: "windows-${{ github.ref_name }}" + + steps: - name: Build project - run: ./Godot --headless --path . --export-release "${{ env.project-build }}" build/ + run: ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose - name: Zip artifacts run: zip build/* ${{ env.artifact-name }} @@ -43,6 +53,10 @@ jobs: name: ${{ env.artifact-name }} path: . + - name: Install NSIS + if: github.ref_type == 'tag' + run: sudo apt install nsis + - name: Make installer if: github.ref_type == 'tag' run: makensis installer.nsi @@ -54,21 +68,13 @@ jobs: build-macos: name: "Build for MacOS" runs-on: ubuntu-latest + needs: [ godot ] env: - project-build: "MacOS (single environment)" + project-build: "macOS (single environment)" artifact-name: "macos-${{ github.ref_name }}" steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Install Godot - run: | - curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" - unzip ./godot.zip - mv Godot* Godot - - name: Build project - run: ./Godot --headless --path . --export-release "${{ env.project-build }}" build/ + run: ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose - name: Zip artifacts run: zip build/* ${{ env.artifact-name }} From 740c9196e807603086ae0d1875a0ecd9556a2105 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 14 Aug 2026 08:36:51 -0500 Subject: [PATCH 11/37] add --quit option to end task --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac3a3d7..ae6a431 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: mv Godot* ${{ env.godot-bin }} - name: Install Godot export templates - run: ${{ env.godot-bin }} --headless --editor --install-export-templates --verbose + run: ${{ env.godot-bin }} --headless --editor --install-export-templates --verbose --quit - name: Update project imports run: ${{ env.godot-bin }} --headless --import --verbose From 1e07c2b29fae1277083f698fd3663a9c7eb37ff4 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:16:41 -0500 Subject: [PATCH 12/37] rearrange jobs --- .github/workflows/build.yml | 40 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae6a431..d53b90f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,11 +11,15 @@ env: godot-version: 4.5 godot-bin: "./Godot" -jobs: - godot: - name: "Setup Project" +jobs: + build-windows: + name: "Build for Windows" runs-on: ubuntu-latest - steps: + env: + project-build: "Windows Desktop (single environment)" + artifact-name: "windows-${{ github.ref_name }}" + + steps: - name: Check out repository uses: actions/checkout@v4 @@ -30,17 +34,7 @@ jobs: - name: Update project imports run: ${{ env.godot-bin }} --headless --import --verbose - - - build-windows: - name: "Build for Windows" - runs-on: ubuntu-latest - needs: [ godot ] - env: - project-build: "Windows Desktop (single environment)" - artifact-name: "windows-${{ github.ref_name }}" - - steps: + - name: Build project run: ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose @@ -68,11 +62,25 @@ jobs: build-macos: name: "Build for MacOS" runs-on: ubuntu-latest - needs: [ godot ] env: project-build: "macOS (single environment)" artifact-name: "macos-${{ github.ref_name }}" steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install Godot + run: | + curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" + unzip ./godot.zip + mv Godot* ${{ env.godot-bin }} + + - name: Install Godot export templates + run: ${{ env.godot-bin }} --headless --editor --install-export-templates --verbose --quit + + - name: Update project imports + run: ${{ env.godot-bin }} --headless --import --verbose + - name: Build project run: ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose From f9168563228c3c47d558e8193ab7658ca869a6fe Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 14 Aug 2026 10:57:03 -0500 Subject: [PATCH 13/37] update template install step --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d53b90f..d77319f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,10 @@ jobs: mv Godot* ${{ env.godot-bin }} - name: Install Godot export templates - run: ${{ env.godot-bin }} --headless --editor --install-export-templates --verbose --quit + run: | + curl -L -o ./godot-templates.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_export_templates.tpz" + unzip godot-templates.zip + mv ./templates/* ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ - name: Update project imports run: ${{ env.godot-bin }} --headless --import --verbose @@ -76,7 +79,10 @@ jobs: mv Godot* ${{ env.godot-bin }} - name: Install Godot export templates - run: ${{ env.godot-bin }} --headless --editor --install-export-templates --verbose --quit + run: | + curl -L -o ./godot-templates.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_export_templates.tpz" + unzip godot-templates.zip + mv ./templates/* ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ - name: Update project imports run: ${{ env.godot-bin }} --headless --import --verbose From cf1709c1dace01046aff5e0fd509504ecaa9dd40 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 14 Aug 2026 10:59:30 -0500 Subject: [PATCH 14/37] make parent directories --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d77319f..87f3e7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,7 @@ jobs: run: | curl -L -o ./godot-templates.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_export_templates.tpz" unzip godot-templates.zip + mkdir -p ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ mv ./templates/* ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ - name: Update project imports @@ -82,6 +83,7 @@ jobs: run: | curl -L -o ./godot-templates.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_export_templates.tpz" unzip godot-templates.zip + mkdir -p ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ mv ./templates/* ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ - name: Update project imports From 59072dff719730f7c1e96e2862e23cfb3528fe67 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 14 Aug 2026 20:01:22 -0500 Subject: [PATCH 15/37] initiate build directory --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87f3e7d..01079a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,9 @@ jobs: run: ${{ env.godot-bin }} --headless --import --verbose - name: Build project - run: ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose + run: | + mkdir build/ + ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose - name: Zip artifacts run: zip build/* ${{ env.artifact-name }} @@ -90,7 +92,9 @@ jobs: run: ${{ env.godot-bin }} --headless --import --verbose - name: Build project - run: ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose + run: | + mkdir build/ + ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose - name: Zip artifacts run: zip build/* ${{ env.artifact-name }} From 6102b4cc67a40fbc6755d80210c0fc5880520bf1 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 14 Aug 2026 21:28:58 -0500 Subject: [PATCH 16/37] refactor with matrix strategy (again) --- .github/workflows/build.yml | 109 ++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 62 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 01079a3..2f50cef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,22 +2,29 @@ name: Build on: push: - branches: [ "main", "build-automation" ] - tags: [ "v*.*.*" ] + branches: [ 'main', 'build-automation' ] + tags: [ 'v*.*.*' ] pull_request: - branches: [ "main" ] + branches: [ 'main' ] env: godot-version: 4.5 - godot-bin: "./Godot" + godot-bin: ./Godot + windows-name: Kintsugi3DViewer-windows-${{ github.ref_name }}.exe + macos-name: Kintsugi3DViewer-macos-${{ github.ref_name }}.zip jobs: - build-windows: - name: "Build for Windows" + build: + name: ${{ matrix.type }} runs-on: ubuntu-latest - env: - project-build: "Windows Desktop (single environment)" - artifact-name: "windows-${{ github.ref_name }}" + strategy: + matrix: + include: + - type: Windows Desktop (single environment) + name: ${{ github.env.windows-name }} + + - type: macOS (single environment) + name: ${{ github.env.macos-name }} steps: - name: Check out repository @@ -42,70 +49,48 @@ jobs: - name: Build project run: | mkdir build/ - ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose - - - name: Zip artifacts - run: zip build/* ${{ env.artifact-name }} + ${{ env.godot-bin }} --headless --path . --export-release "${{ matrix.type }}" build/${{ matrix.name }} --verbose - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: ${{ env.artifact-name }} - path: . - - - name: Install NSIS - if: github.ref_type == 'tag' - run: sudo apt install nsis + name: ${{ matrix.name }} + path: ./build - - name: Make installer - if: github.ref_type == 'tag' - run: makensis installer.nsi + macos: + name: Publish MacOS package + runs-on: ubuntu-latest + if: github.ref_type == 'tag' + needs: [ 'build' ] + steps: + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: ${{ env.macos-name }} - name: Upload release - if: github.ref_type == 'tag' - run: "" - - build-macos: - name: "Build for MacOS" + run: '' + + windows: + name: Publish Windows installer runs-on: ubuntu-latest - env: - project-build: "macOS (single environment)" - artifact-name: "macos-${{ github.ref_name }}" + if: github.ref_type == 'tag' + needs: [ 'build' ] steps: - - name: Check out repository + - name: Checkout repository uses: actions/checkout@v4 - - - name: Install Godot - run: | - curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" - unzip ./godot.zip - mv Godot* ${{ env.godot-bin }} - - - name: Install Godot export templates - run: | - curl -L -o ./godot-templates.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_export_templates.tpz" - unzip godot-templates.zip - mkdir -p ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ - mv ./templates/* ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ - - - name: Update project imports - run: ${{ env.godot-bin }} --headless --import --verbose + + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: ${{ env.windows-name }} - - name: Build project - run: | - mkdir build/ - ${{ env.godot-bin }} --headless --path . --export-release "${{ env.project-build }}" build/ --verbose - - - name: Zip artifacts - run: zip build/* ${{ env.artifact-name }} + - name: Install NSIS + run: sudo apt install nsis - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ env.artifact-name }} - path: . + - name: Make installer + run: makensis installer.nsi - name: Upload release - if: github.ref_type == 'tag' - run: "" - + run: '' + From 0296b4d3933baa4666e7839affe25aeb91426f15 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 14 Aug 2026 22:54:15 -0500 Subject: [PATCH 17/37] adjust export directory and add the rest of the release scripts for windows and mac --- .github/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f50cef..56d62d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,14 +48,14 @@ jobs: - name: Build project run: | - mkdir build/ - ${{ env.godot-bin }} --headless --path . --export-release "${{ matrix.type }}" build/${{ matrix.name }} --verbose + mkdir export/ + ${{ env.godot-bin }} --headless --path . --export-release "${{ matrix.type }}" export/${{ matrix.name }} --verbose - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: ${{ matrix.name }} - path: ./build + path: export/* macos: name: Publish MacOS package @@ -63,13 +63,28 @@ jobs: if: github.ref_type == 'tag' needs: [ 'build' ] steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Download build artifact uses: actions/download-artifact@v4 with: name: ${{ env.macos-name }} + - name: Unpack artifact + run: | + unzip ${{ env.macos-name }} + - name: Upload release - run: '' + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then + gh release upload ${{ github.ref_name }} ${{ env.macos-name }} --clobber + else + gh release create ${{ github.ref_name }} ${{ env.macos-name }} -t "${{ github.ref_name }}" -F RELEASE.md + fi windows: name: Publish Windows installer @@ -84,6 +99,12 @@ jobs: uses: actions/download-artifact@v4 with: name: ${{ env.windows-name }} + + - name: Unpack artifact + run: | + mkdir export + unzip ${{ env.windows-name }} -d export/ + mv export/${{ env.windows-name }} export/Kintsugi3DViewer.exe - name: Install NSIS run: sudo apt install nsis @@ -92,5 +113,14 @@ jobs: run: makensis installer.nsi - name: Upload release - run: '' + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mv export/Kintsugi3DViewer-setup.exe ${{ env.windows-name }} + if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then + gh release upload ${{ github.ref_name }} ${{ env.windows-name }} --clobber + else + gh release create ${{ github.ref_name }} ${{ env.windows-name }} -t "${{ github.ref_name }}" -F RELEASE.md + fi From 6b560be359234dcc8019518455e00b6dd866c743 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 14 Aug 2026 23:57:11 -0500 Subject: [PATCH 18/37] fix matrix error --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 56d62d3..0625f0e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,10 @@ jobs: matrix: include: - type: Windows Desktop (single environment) - name: ${{ github.env.windows-name }} + name: Kintsugi3DViewer-windows-${{ github.ref_name }}.exe - type: macOS (single environment) - name: ${{ github.env.macos-name }} + name: Kintsugi3DViewer-macos-${{ github.ref_name }}.zip steps: - name: Check out repository @@ -49,7 +49,7 @@ jobs: - name: Build project run: | mkdir export/ - ${{ env.godot-bin }} --headless --path . --export-release "${{ matrix.type }}" export/${{ matrix.name }} --verbose + ${{ env.godot-bin }} --headless --path . --export-release "${{ matrix.type }}" "export/${{ matrix.name }}" --verbose - name: Upload artifacts uses: actions/upload-artifact@v4 From a8934ba3570e71348d374faf28ca5659ad2735d3 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Sat, 15 Aug 2026 00:37:49 -0500 Subject: [PATCH 19/37] add RELEASE.md for automation --- RELEASE.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..92ad9c0 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1 @@ +## Kintsugi3DViewer From e138984c79d640f37993457f82fc8caacc1528ba Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Sat, 15 Aug 2026 01:32:05 -0500 Subject: [PATCH 20/37] fix publishing permissions --- .github/workflows/build.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0625f0e..efa12b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,10 +20,10 @@ jobs: strategy: matrix: include: - - type: Windows Desktop (single environment) + - type: Windows Desktop (with environments) name: Kintsugi3DViewer-windows-${{ github.ref_name }}.exe - - type: macOS (single environment) + - type: macOS (all environments) name: Kintsugi3DViewer-macos-${{ github.ref_name }}.zip steps: @@ -62,6 +62,8 @@ jobs: runs-on: ubuntu-latest if: github.ref_type == 'tag' needs: [ 'build' ] + permissions: + contents: write steps: - name: Checkout repository uses: actions/checkout@v4 @@ -71,10 +73,6 @@ jobs: with: name: ${{ env.macos-name }} - - name: Unpack artifact - run: | - unzip ${{ env.macos-name }} - - name: Upload release shell: bash env: @@ -91,6 +89,8 @@ jobs: runs-on: ubuntu-latest if: github.ref_type == 'tag' needs: [ 'build' ] + permissions: + contents: write steps: - name: Checkout repository uses: actions/checkout@v4 @@ -100,11 +100,10 @@ jobs: with: name: ${{ env.windows-name }} - - name: Unpack artifact + - name: Stage artifact run: | mkdir export - unzip ${{ env.windows-name }} -d export/ - mv export/${{ env.windows-name }} export/Kintsugi3DViewer.exe + mv ${{ env.windows-name }} export/Kintsugi3DViewer.exe - name: Install NSIS run: sudo apt install nsis From 1ff74c6a5bcd991d7c79c8eb3711c4faec96a417 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Sat, 15 Aug 2026 02:19:53 -0500 Subject: [PATCH 21/37] make Kintsugi3DViewer.console.exe optional for build automation --- installer.nsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/installer.nsi b/installer.nsi index 8d887fc..86e7964 100644 --- a/installer.nsi +++ b/installer.nsi @@ -50,7 +50,8 @@ Section "Kintsugi 3D Viewer (required)" SectionApp SetOutPath $INSTDIR File "export\Kintsugi3DViewer.exe" - File "export\Kintsugi3DViewer.console.exe" + IfFileExists "export\Kintsugi3DViewer.console.exe" 0 +2 + File "export\Kintsugi3DViewer.console.exe" ;File "export\Kintsugi3DViewer.pck" File "README.md" @@ -163,4 +164,4 @@ LangString DESC_SectionDesktop ${LANG_ENGLISH} "Add a shortcut to Kintsugi 3D Vi !insertmacro MUI_DESCRIPTION_TEXT ${SectionAssociation} $(DESC_SectionAssociation) !insertmacro MUI_DESCRIPTION_TEXT ${SectionShortcut} $(DESC_SectionShortcut) !insertmacro MUI_DESCRIPTION_TEXT ${SectionDesktop} $(DESC_SectionDesktop) -!insertmacro MUI_FUNCTION_DESCRIPTION_END \ No newline at end of file +!insertmacro MUI_FUNCTION_DESCRIPTION_END From 937888fdf812440b153cc6cfb439ef7de83ecbe2 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Sat, 15 Aug 2026 03:07:22 -0500 Subject: [PATCH 22/37] cleanup for main --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efa12b5..bcae6cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build on: push: - branches: [ 'main', 'build-automation' ] + branches: [ 'main' ] tags: [ 'v*.*.*' ] pull_request: branches: [ 'main' ] @@ -109,7 +109,7 @@ jobs: run: sudo apt install nsis - name: Make installer - run: makensis installer.nsi + run: makensis -V3 installer.nsi - name: Upload release shell: bash From 1272ce086e07331c6ff1e9452fb184f2a3323887 Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Sat, 15 Aug 2026 03:08:02 -0500 Subject: [PATCH 23/37] remove console export --- installer.nsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/installer.nsi b/installer.nsi index 86e7964..a7eeb9c 100644 --- a/installer.nsi +++ b/installer.nsi @@ -50,8 +50,7 @@ Section "Kintsugi 3D Viewer (required)" SectionApp SetOutPath $INSTDIR File "export\Kintsugi3DViewer.exe" - IfFileExists "export\Kintsugi3DViewer.console.exe" 0 +2 - File "export\Kintsugi3DViewer.console.exe" + ;File "export\Kintsugi3DViewer.console.exe" ;File "export\Kintsugi3DViewer.pck" File "README.md" From caa150080278cb6da69341f9724d70d43b0bc89b Mon Sep 17 00:00:00 2001 From: Nathan Sunday <61068696+PoctorDepper@users.noreply.github.com> Date: Fri, 21 Aug 2026 11:56:07 -0500 Subject: [PATCH 24/37] adjust build expression for pull requests --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bcae6cc..034fbb3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,8 +10,8 @@ on: env: godot-version: 4.5 godot-bin: ./Godot - windows-name: Kintsugi3DViewer-windows-${{ github.ref_name }}.exe - macos-name: Kintsugi3DViewer-macos-${{ github.ref_name }}.zip + windows-name: Kintsugi3DViewer-windows-${{ github.head_ref || github.ref_name }}.exe + macos-name: Kintsugi3DViewer-macos-${{ github.head_ref || github.ref_name }}.zip jobs: build: @@ -21,10 +21,10 @@ jobs: matrix: include: - type: Windows Desktop (with environments) - name: Kintsugi3DViewer-windows-${{ github.ref_name }}.exe + name: Kintsugi3DViewer-windows-${{ github.head_ref || github.ref_name }}.exe - type: macOS (all environments) - name: Kintsugi3DViewer-macos-${{ github.ref_name }}.zip + name: Kintsugi3DViewer-macos-${{ github.head_ref || github.ref_name }}.zip steps: - name: Check out repository From 9087e0704aa3904654ddb1cb28c5cabf8f2363e7 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Mon, 19 Oct 2026 16:16:07 -0500 Subject: [PATCH 25/37] Trying to adjust build script to align with what Kintsugi 3D Builder is expecting to be able to download for bundling Kintsugi 3D Viewer. --- .github/workflows/build.yml | 43 ++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 034fbb3..af50e84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,8 +10,9 @@ on: env: godot-version: 4.5 godot-bin: ./Godot - windows-name: Kintsugi3DViewer-windows-${{ github.head_ref || github.ref_name }}.exe - macos-name: Kintsugi3DViewer-macos-${{ github.head_ref || github.ref_name }}.zip + windows-installer-name: Kintsugi3DViewer-windows-installer.exe + windows-name: Kintsugi3DViewer-windows.zip + macos-name: Kintsugi3DViewer-macos.zip jobs: build: @@ -21,10 +22,10 @@ jobs: matrix: include: - type: Windows Desktop (with environments) - name: Kintsugi3DViewer-windows-${{ github.head_ref || github.ref_name }}.exe + name: Kintsugi3DViewer-windows.zip - type: macOS (all environments) - name: Kintsugi3DViewer-macos-${{ github.head_ref || github.ref_name }}.zip + name: Kintsugi3DViewer-macos.zip steps: - name: Check out repository @@ -85,6 +86,33 @@ jobs: fi windows: + name: Publish Windows package + runs-on: ubuntu-latest + if: github.ref_type == 'tag' + needs: [ 'build' ] + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: ${{ env.windows-name }} + + - name: Upload release + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then + gh release upload ${{ github.ref_name }} ${{ env.windows-name }} --clobber + else + gh release create ${{ github.ref_name }} ${{ env.windows-name }} -t "${{ github.ref_name }}" -F RELEASE.md + fi + + windows-installer: name: Publish Windows installer runs-on: ubuntu-latest if: github.ref_type == 'tag' @@ -116,10 +144,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - mv export/Kintsugi3DViewer-setup.exe ${{ env.windows-name }} + mv export/Kintsugi3DViewer-setup.exe ${{ env.windows-installer-name }} if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then - gh release upload ${{ github.ref_name }} ${{ env.windows-name }} --clobber + gh release upload ${{ github.ref_name }} ${{ env.windows-installer-name }} --clobber else - gh release create ${{ github.ref_name }} ${{ env.windows-name }} -t "${{ github.ref_name }}" -F RELEASE.md + gh release create ${{ github.ref_name }} ${{ env.windows-installer-name }} -t "${{ github.ref_name }}" -F RELEASE.md fi - From c3300a84b8f847c508e4967b6c17e1b66527d0e4 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 09:15:25 -0500 Subject: [PATCH 26/37] Change releases to draft rather than published on tag push, and (hopefully) fixed issues with Windows packaging (zip vs. exe). --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af50e84..4a1fb8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: matrix: include: - type: Windows Desktop (with environments) - name: Kintsugi3DViewer-windows.zip + name: Kintsugi3DViewer.exe - type: macOS (all environments) name: Kintsugi3DViewer-macos.zip @@ -82,7 +82,7 @@ jobs: if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then gh release upload ${{ github.ref_name }} ${{ env.macos-name }} --clobber else - gh release create ${{ github.ref_name }} ${{ env.macos-name }} -t "${{ github.ref_name }}" -F RELEASE.md + gh release create ${{ github.ref_name }} ${{ env.macos-name }} -t "${{ github.ref_name }}" -F RELEASE.md --draft fi windows: @@ -99,7 +99,11 @@ jobs: - name: Download build artifact uses: actions/download-artifact@v4 with: - name: ${{ env.windows-name }} + name: Kintsugi3DViewer.exe + + + - name: Create ZIP package + run: zip "${{ env.windows-name }}" Kintsugi3DViewer.exe - name: Upload release shell: bash @@ -109,7 +113,7 @@ jobs: if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then gh release upload ${{ github.ref_name }} ${{ env.windows-name }} --clobber else - gh release create ${{ github.ref_name }} ${{ env.windows-name }} -t "${{ github.ref_name }}" -F RELEASE.md + gh release create ${{ github.ref_name }} ${{ env.windows-name }} -t "${{ github.ref_name }}" -F RELEASE.md --draft fi windows-installer: @@ -126,12 +130,8 @@ jobs: - name: Download build artifact uses: actions/download-artifact@v4 with: - name: ${{ env.windows-name }} - - - name: Stage artifact - run: | - mkdir export - mv ${{ env.windows-name }} export/Kintsugi3DViewer.exe + name: Kintsugi3DViewer.exe + path: export - name: Install NSIS run: sudo apt install nsis @@ -148,5 +148,5 @@ jobs: if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then gh release upload ${{ github.ref_name }} ${{ env.windows-installer-name }} --clobber else - gh release create ${{ github.ref_name }} ${{ env.windows-installer-name }} -t "${{ github.ref_name }}" -F RELEASE.md + gh release create ${{ github.ref_name }} ${{ env.windows-installer-name }} -t "${{ github.ref_name }}" -F RELEASE.md --draft fi From b691afa03bdd86d6881059bb16c3370269cab77d Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 16:40:08 -0500 Subject: [PATCH 27/37] Slight tweaks to language in uninstaller script. --- installer.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer.nsi b/installer.nsi index e873e8c..f6cb841 100644 --- a/installer.nsi +++ b/installer.nsi @@ -165,12 +165,12 @@ Function un.CachePageCreate ; Set Page Header Text !insertmacro MUI_HEADER_TEXT "Additional Directories" "Choose which additional software directories to remove." - ${NSD_CreateCheckbox} 10u 10u 100% 12u "Clear Kinstugi3D Viewer Preferences" + ${NSD_CreateCheckbox} 10u 10u 100% 12u "Clear Kintsugi 3D Viewer preferences, logs, and local files list" Pop $Checkbox_ClearViewerPreferences ${NSD_Check} $Checkbox_ClearViewerPreferences ${NSD_OnClick} $Checkbox_ClearViewerPreferences un.OnViewerPreferences - ${NSD_CreateCheckbox} 10u 25u 100% 12u "Clear Kinstugi3D Viewer Cache" + ${NSD_CreateCheckbox} 10u 25u 100% 12u "Clear Kintsugi 3D Viewer cache" Pop $Checkbox_ClearViewerCache ${NSD_Check} $Checkbox_ClearViewerCache From 5d8de6cf1d65eada4e4e465a7269d484a56c6a95 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 18:25:58 -0500 Subject: [PATCH 28/37] Try to add some basic smoke tests for MacOS and Windows --- .github/workflows/build.yml | 267 +++++++++++++++++++++++++++++------- installer.nsi | 2 +- 2 files changed, 215 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a1fb8a..b28bd03 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,95 +58,256 @@ jobs: name: ${{ matrix.name }} path: export/* - macos: - name: Publish MacOS package + package-windows: + name: Package Windows ZIP runs-on: ubuntu-latest - if: github.ref_type == 'tag' needs: [ 'build' ] - permissions: - contents: write steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download build artifact + - name: Download Windows executable uses: actions/download-artifact@v4 with: - name: ${{ env.macos-name }} + name: Kintsugi3DViewer.exe - - name: Upload release - shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create ZIP package run: | - if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then - gh release upload ${{ github.ref_name }} ${{ env.macos-name }} --clobber - else - gh release create ${{ github.ref_name }} ${{ env.macos-name }} -t "${{ github.ref_name }}" -F RELEASE.md --draft - fi + zip ${{ env.windows-name }} Kintsugi3DViewer.exe + + - name: Upload Windows ZIP + uses: actions/upload-artifact@v4 + with: + name: ${{ env.windows-name }} + path: ${{ env.windows-name }} - windows: - name: Publish Windows package + package-windows-installer: + name: Build NSIS installer runs-on: ubuntu-latest - if: github.ref_type == 'tag' needs: [ 'build' ] - permissions: - contents: write steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download build artifact + - name: Download Windows executable uses: actions/download-artifact@v4 with: name: Kintsugi3DViewer.exe + path: export + - name: Install NSIS + run: sudo apt-get update && sudo apt-get install -y nsis - - name: Create ZIP package - run: zip "${{ env.windows-name }}" Kintsugi3DViewer.exe + - name: Make installer + run: makensis -V3 installer.nsi + + - name: Upload installer + uses: actions/upload-artifact@v4 + with: + name: ${{ env.windows-installer-name }} + path: export/${{ env.windows-installer-name }} + + smoke-test-windows: + name: Smoke test Windows ZIP + runs-on: windows-latest + needs: [ 'package-windows' ] + steps: + - name: Download Windows ZIP + uses: actions/download-artifact@v4 + with: + name: ${{ env.windows-name }} + + - name: Extract ZIP + shell: pwsh + run: Expand-Archive ${{ env.windows-name }} -DestinationPath extracted + + - name: Launch and check for immediate crash + shell: pwsh + run: | + # Generated by ChatGPT + $exe = Join-Path $PWD "extracted/Kintsugi3DViewer.exe" + if (!(Test-Path $exe)) { + throw "Executable missing from ZIP." + } + + $p = Start-Process -FilePath $exe -WorkingDirectory (Split-Path $exe) -PassThru + Start-Sleep -Seconds 30 + $p.Refresh() + + if ($p.HasExited) { + throw "Application exited within 30 seconds with code $($p.ExitCode)." + } + + Stop-Process -Id $p.Id -Force + + smoke-test-macos: + name: Smoke test macOS ZIP + runs-on: macos-latest + needs: [ 'build' ] + steps: + - name: Download macOS ZIP + uses: actions/download-artifact@v4 + with: + name: ${{ env.macos-name }} + + - name: Extract macOS ZIP + run: unzip ${{ env.macos-name }} - - name: Upload release + - name: Install timeout + run: brew install coreutils + + - name: Smoke-test macOS app shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then - gh release upload ${{ github.ref_name }} ${{ env.windows-name }} --clobber + # Generated by ChatGPT + APP="Kintsugi 3D Viewer.app" + EXE="$APP/Contents/MacOS/Kintsugi 3D Viewer" + + # Test 1: Run the executable directly and check whether it exits early. + "$EXE" & + PID=$! + sleep 30 + + if kill -0 "$PID" 2>/dev/null; then + kill "$PID" + wait "$PID" 2>/dev/null || true else - gh release create ${{ github.ref_name }} ${{ env.windows-name }} -t "${{ github.ref_name }}" -F RELEASE.md --draft + if wait "$PID"; then + STATUS=0 + else + STATUS=$? + fi + echo "Application exited within 30 seconds with code $STATUS." + exit 1 fi - windows-installer: - name: Publish Windows installer + # Test 2: Launch as a user would and require it to remain open for 30 seconds. + Gtimeout="$(brew --prefix coreutils)/bin/gtimeout" + set +e + "$Gtimeout" --kill-after=5s 30s open -W -n "$APP" + STATUS=$? + set -e + + if [ "$STATUS" -eq 124 ]; then + echo "App remained open for 30 seconds." + else + echo "App exited early or failed to launch (status $STATUS)" + exit 1 + fi + + smoke-test-windows-installer: + name: Smoke test NSIS installer + runs-on: windows-latest + needs: [ 'package-windows-installer' ] + steps: + - name: Download installer + uses: actions/download-artifact@v4 + with: + name: ${{ env.windows-installer-name }} + path: package + + - name: Install application + shell: pwsh + run: | + # Generated by ChatGPT + $installer = Join-Path $PWD "package/${{ env.windows-installer-name }}" + if (!(Test-Path $installer)) { + throw "Installer artifact missing." + } + + $installDir = Join-Path $env:RUNNER_TEMP "Kintsugi3DViewer" + $p = Start-Process -FilePath $installer ` + -ArgumentList "/S", "/D=$installDir" -Wait -PassThru + + if ($p.ExitCode -ne 0) { + throw "Installer exited with code $($p.ExitCode)." + } + + $exe = Join-Path $installDir "Kintsugi3DViewer.exe" + if (!(Test-Path $exe)) { + throw "Installed executable missing." + } + + $uninstaller = Join-Path $installDir "uninstall.exe" + if (!(Test-Path $uninstaller)) { + throw "Uninstaller missing." + } + + echo "INSTALL_DIR=$installDir" >> $env:GITHUB_ENV + + - name: Smoke test installed executable + shell: pwsh + run: | + # Generated by ChatGPT + $exe = Join-Path $env:INSTALL_DIR "Kintsugi3DViewer.exe" + $p = Start-Process -FilePath $exe ` + -WorkingDirectory $env:INSTALL_DIR -PassThru + + Start-Sleep -Seconds 5 + $p.Refresh() + + if ($p.HasExited) { + throw "Installed application exited early with code $($p.ExitCode)." + } + + Stop-Process -Id $p.Id -Force + + - name: Uninstall application + shell: pwsh + run: | + # Generated by ChatGPT + $uninstaller = Join-Path $env:INSTALL_DIR "uninstall.exe" + $p = Start-Process -FilePath $uninstaller ` + -ArgumentList "/S" -Wait -PassThru + + if ($p.ExitCode -ne 0) { + throw "Uninstaller exited with code $($p.ExitCode)." + } + + if (Test-Path (Join-Path $env:INSTALL_DIR "Kintsugi3DViewer.exe")) { + throw "Application executable still exists after uninstall." + } + + publish-release-draft: + name: Publish release draft runs-on: ubuntu-latest if: github.ref_type == 'tag' - needs: [ 'build' ] + needs: + - smoke-test-windows + - smoke-test-macos + - smoke-test-windows-installer permissions: contents: write steps: - - name: Checkout repository + - name: Check out repository uses: actions/checkout@v4 - - - name: Download build artifact + + - name: Download Windows ZIP uses: actions/download-artifact@v4 with: - name: Kintsugi3DViewer.exe - path: export - - - name: Install NSIS - run: sudo apt install nsis + name: ${{ env.windows-name }} - - name: Make installer - run: makensis -V3 installer.nsi + - name: Download macOS ZIP + uses: actions/download-artifact@v4 + with: + name: ${{ env.macos-name }} + + - name: Download NSIS installer + uses: actions/download-artifact@v4 + with: + name: ${{ env.windows-installer-name }} - - name: Upload release + - name: Create or update draft release shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - mv export/Kintsugi3DViewer-setup.exe ${{ env.windows-installer-name }} if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then - gh release upload ${{ github.ref_name }} ${{ env.windows-installer-name }} --clobber + gh release upload "${{ github.ref_name }}" \ + ${{ env.windows-name }} \ + ${{ env.macos-name }} \ + ${{ env.windows-installer-name }} \ + --clobber else - gh release create ${{ github.ref_name }} ${{ env.windows-installer-name }} -t "${{ github.ref_name }}" -F RELEASE.md --draft + gh release create "${{ github.ref_name }}" \ + ${{ env.windows-name }} \ + ${{ env.macos-name }} \ + ${{ env.windows-installer-name }} \ + --title "${{ github.ref_name }}" \ + --notes-file RELEASE.md \ + --draft fi diff --git a/installer.nsi b/installer.nsi index f6cb841..5695967 100644 --- a/installer.nsi +++ b/installer.nsi @@ -9,7 +9,7 @@ Name "Kintsugi 3D Viewer" RequestExecutionLevel admin Unicode True ManifestDPIAware True -OutFile "export/Kintsugi3DViewer-setup.exe" +OutFile "export/Kintsugi3DViewer-windows-installer.exe" InstallDir $PROGRAMFILES64\Kintsugi3DViewer From ce24b46d7629f59011b50e5d869034a28b546769 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 21:36:32 -0500 Subject: [PATCH 29/37] NSIS installer needs to check out repository, also improved output messages for better clarity and consistency. --- .github/workflows/build.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b28bd03..10fb4ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -83,6 +83,9 @@ jobs: runs-on: ubuntu-latest needs: [ 'build' ] steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Download Windows executable uses: actions/download-artifact@v4 with: @@ -102,7 +105,7 @@ jobs: path: export/${{ env.windows-installer-name }} smoke-test-windows: - name: Smoke test Windows ZIP + name: Smoke test Windows runs-on: windows-latest needs: [ 'package-windows' ] steps: @@ -129,13 +132,15 @@ jobs: $p.Refresh() if ($p.HasExited) { - throw "Application exited within 30 seconds with code $($p.ExitCode)." + throw "App failed to launch or exited within 30 seconds with code $($p.ExitCode)." } + Write-Host "App remained open for 30 seconds." + Stop-Process -Id $p.Id -Force smoke-test-macos: - name: Smoke test macOS ZIP + name: Smoke test macOS runs-on: macos-latest needs: [ 'build' ] steps: @@ -147,7 +152,7 @@ jobs: - name: Extract macOS ZIP run: unzip ${{ env.macos-name }} - - name: Install timeout + - name: Install timeout utility run: brew install coreutils - name: Smoke-test macOS app @@ -165,13 +170,14 @@ jobs: if kill -0 "$PID" 2>/dev/null; then kill "$PID" wait "$PID" 2>/dev/null || true + echo "App remained open for 30 seconds (direct executable launch)." else if wait "$PID"; then STATUS=0 else STATUS=$? fi - echo "Application exited within 30 seconds with code $STATUS." + echo "App failed to launch or exited within 30 seconds with code $STATUS (direct executable launch)." exit 1 fi @@ -183,9 +189,9 @@ jobs: set -e if [ "$STATUS" -eq 124 ]; then - echo "App remained open for 30 seconds." + echo "App remained open for 30 seconds (app launched with "open")." else - echo "App exited early or failed to launch (status $STATUS)" + echo "App failed to launch or exited within 30 seconds with code $STATUS (app launched with 'open')." exit 1 fi @@ -237,15 +243,17 @@ jobs: $p = Start-Process -FilePath $exe ` -WorkingDirectory $env:INSTALL_DIR -PassThru - Start-Sleep -Seconds 5 + Start-Sleep -Seconds 30 $p.Refresh() if ($p.HasExited) { - throw "Installed application exited early with code $($p.ExitCode)." + throw "App failed to launch or exited within 30 seconds with code $($p.ExitCode)." } Stop-Process -Id $p.Id -Force + Write-Host "App remained open for 30 seconds." + - name: Uninstall application shell: pwsh run: | @@ -262,6 +270,8 @@ jobs: throw "Application executable still exists after uninstall." } + Write-Host "App successfully uninstalled." + publish-release-draft: name: Publish release draft runs-on: ubuntu-latest From 2c1079106ea61cc44b9d4f081c9477e24333fa01 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 22:43:41 -0500 Subject: [PATCH 30/37] Try to remove overhead of build artifacts that are stored between jobs. --- .github/workflows/build.yml | 335 +++++++++++++++--------------------- 1 file changed, 137 insertions(+), 198 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10fb4ff..4047372 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,119 +9,87 @@ on: env: godot-version: 4.5 - godot-bin: ./Godot windows-installer-name: Kintsugi3DViewer-windows-installer.exe windows-name: Kintsugi3DViewer-windows.zip macos-name: Kintsugi3DViewer-macos.zip -jobs: - build: - name: ${{ matrix.type }} +jobs: + prepare-release: + name: Prepare draft release runs-on: ubuntu-latest - strategy: - matrix: - include: - - type: Windows Desktop (with environments) - name: Kintsugi3DViewer.exe - - - type: macOS (all environments) - name: Kintsugi3DViewer-macos.zip - + permissions: + contents: write + steps: + - name: Check out repository + if: github.ref_type == 'tag' + uses: actions/checkout@v4 + + - name: Create draft release if needed + if: github.ref_type == 'tag' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if ! gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then + gh release create "${{ github.ref_name }}" \ + --title "${{ github.ref_name }}" \ + --notes-file RELEASE.md \ + --draft + fi + + windows: + name: Windows build and tests + runs-on: windows-latest + needs: [ 'prepare-release'] + permissions: + contents: write steps: - name: Check out repository uses: actions/checkout@v4 - name: Install Godot + shell: pwsh run: | - curl -L -o ./godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_linux.x86_64.zip" - unzip ./godot.zip - mv Godot* ${{ env.godot-bin }} + curl.exe -L -o godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_win64.exe.zip" + Expand-Archive godot.zip -DestinationPath godot + Move-Item "godot/Godot_v${{ env.godot-version }}-stable_win64.exe" Godot.exe - name: Install Godot export templates + shell: pwsh run: | - curl -L -o ./godot-templates.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_export_templates.tpz" - unzip godot-templates.zip - mkdir -p ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ - mv ./templates/* ~/.local/share/godot/export_templates/${{ env.godot-version }}.stable/ - - - name: Update project imports - run: ${{ env.godot-bin }} --headless --import --verbose - - - name: Build project - run: | - mkdir export/ - ${{ env.godot-bin }} --headless --path . --export-release "${{ matrix.type }}" "export/${{ matrix.name }}" --verbose + curl.exe -L -o godot-templates.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_export_templates.tpz" + Expand-Archive godot-templates.zip -DestinationPath godot-templates - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.name }} - path: export/* + $templateDir = "$env:APPDATA/Godot/export_templates/${{ env.godot-version }}.stable" + New-Item -ItemType Directory -Force -Path $templateDir | Out-Null + Copy-Item godot-templates/templates/* $templateDir -Recurse -Force - package-windows: - name: Package Windows ZIP - runs-on: ubuntu-latest - needs: [ 'build' ] - steps: - - name: Download Windows executable - uses: actions/download-artifact@v4 - with: - name: Kintsugi3DViewer.exe + - name: Update project imports + run: ./Godot.exe --headless --import --verbose - - name: Create ZIP package + - name: Build project + shell: pwsh run: | - zip ${{ env.windows-name }} Kintsugi3DViewer.exe + New-Item -ItemType Directory -Force export | Out-Null + ./Godot.exe --headless --path . --export-release "Windows Desktop (with environments)" "export/Kintsugi3DViewer.exe" --verbose - - name: Upload Windows ZIP - uses: actions/upload-artifact@v4 - with: - name: ${{ env.windows-name }} - path: ${{ env.windows-name }} - - package-windows-installer: - name: Build NSIS installer - runs-on: ubuntu-latest - needs: [ 'build' ] - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Download Windows executable - uses: actions/download-artifact@v4 - with: - name: Kintsugi3DViewer.exe - path: export + - name: Package Windows ZIP + shell: pwsh + run: Compress-Archive -Path export/Kintsugi3DViewer.exe -DestinationPath "${{ env.windows-name }}" - name: Install NSIS - run: sudo apt-get update && sudo apt-get install -y nsis + shell: pwsh + run: | + choco install nsis --yes --no-progress + "C:\Program Files (x86)\NSIS" >> $env:GITHUB_PATH - - name: Make installer + - name: Build NSIS installer run: makensis -V3 installer.nsi - - name: Upload installer - uses: actions/upload-artifact@v4 - with: - name: ${{ env.windows-installer-name }} - path: export/${{ env.windows-installer-name }} - - smoke-test-windows: - name: Smoke test Windows - runs-on: windows-latest - needs: [ 'package-windows' ] - steps: - - name: Download Windows ZIP - uses: actions/download-artifact@v4 - with: - name: ${{ env.windows-name }} - - - name: Extract ZIP - shell: pwsh - run: Expand-Archive ${{ env.windows-name }} -DestinationPath extracted - - - name: Launch and check for immediate crash + - name: Smoke test Windows ZIP shell: pwsh run: | - # Generated by ChatGPT + Expand-Archive "${{ env.windows-name }}" -DestinationPath extracted + $exe = Join-Path $PWD "extracted/Kintsugi3DViewer.exe" if (!(Test-Path $exe)) { throw "Executable missing from ZIP." @@ -136,83 +104,14 @@ jobs: } Write-Host "App remained open for 30 seconds." - Stop-Process -Id $p.Id -Force - smoke-test-macos: - name: Smoke test macOS - runs-on: macos-latest - needs: [ 'build' ] - steps: - - name: Download macOS ZIP - uses: actions/download-artifact@v4 - with: - name: ${{ env.macos-name }} - - - name: Extract macOS ZIP - run: unzip ${{ env.macos-name }} - - - name: Install timeout utility - run: brew install coreutils - - - name: Smoke-test macOS app - shell: bash - run: | - # Generated by ChatGPT - APP="Kintsugi 3D Viewer.app" - EXE="$APP/Contents/MacOS/Kintsugi 3D Viewer" - - # Test 1: Run the executable directly and check whether it exits early. - "$EXE" & - PID=$! - sleep 30 - - if kill -0 "$PID" 2>/dev/null; then - kill "$PID" - wait "$PID" 2>/dev/null || true - echo "App remained open for 30 seconds (direct executable launch)." - else - if wait "$PID"; then - STATUS=0 - else - STATUS=$? - fi - echo "App failed to launch or exited within 30 seconds with code $STATUS (direct executable launch)." - exit 1 - fi - - # Test 2: Launch as a user would and require it to remain open for 30 seconds. - Gtimeout="$(brew --prefix coreutils)/bin/gtimeout" - set +e - "$Gtimeout" --kill-after=5s 30s open -W -n "$APP" - STATUS=$? - set -e - - if [ "$STATUS" -eq 124 ]; then - echo "App remained open for 30 seconds (app launched with "open")." - else - echo "App failed to launch or exited within 30 seconds with code $STATUS (app launched with 'open')." - exit 1 - fi - - smoke-test-windows-installer: - name: Smoke test NSIS installer - runs-on: windows-latest - needs: [ 'package-windows-installer' ] - steps: - - name: Download installer - uses: actions/download-artifact@v4 - with: - name: ${{ env.windows-installer-name }} - path: package - - name: Install application shell: pwsh run: | - # Generated by ChatGPT - $installer = Join-Path $PWD "package/${{ env.windows-installer-name }}" + $installer = Join-Path $PWD "export/${{ env.windows-installer-name }}" if (!(Test-Path $installer)) { - throw "Installer artifact missing." + throw "Installer missing: $installer" } $installDir = Join-Path $env:RUNNER_TEMP "Kintsugi3DViewer" @@ -233,12 +132,11 @@ jobs: throw "Uninstaller missing." } - echo "INSTALL_DIR=$installDir" >> $env:GITHUB_ENV + "INSTALL_DIR=$installDir" >> $env:GITHUB_ENV - name: Smoke test installed executable shell: pwsh run: | - # Generated by ChatGPT $exe = Join-Path $env:INSTALL_DIR "Kintsugi3DViewer.exe" $p = Start-Process -FilePath $exe ` -WorkingDirectory $env:INSTALL_DIR -PassThru @@ -251,13 +149,11 @@ jobs: } Stop-Process -Id $p.Id -Force - Write-Host "App remained open for 30 seconds." - name: Uninstall application shell: pwsh run: | - # Generated by ChatGPT $uninstaller = Join-Path $env:INSTALL_DIR "uninstall.exe" $p = Start-Process -FilePath $uninstaller ` -ArgumentList "/S" -Wait -PassThru @@ -272,52 +168,95 @@ jobs: Write-Host "App successfully uninstalled." - publish-release-draft: - name: Publish release draft - runs-on: ubuntu-latest - if: github.ref_type == 'tag' - needs: - - smoke-test-windows - - smoke-test-macos - - smoke-test-windows-installer + - name: Upload Windows release assets + if: github.ref_type == 'tag' + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload "${{ github.ref_name }}" \ + "${{ env.windows-name }}" \ + "export/${{ env.windows-installer-name }}" \ + --clobber + + macos: + name: macOS build and tests + runs-on: macos-latest + needs: [ 'prepare-release' ] permissions: contents: write steps: - name: Check out repository uses: actions/checkout@v4 - - name: Download Windows ZIP - uses: actions/download-artifact@v4 - with: - name: ${{ env.windows-name }} + - name: Install Godot + run: | + curl -L -o godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_macos.universal.zip" + unzip -q godot.zip + mv Godot.app ./Godot.app - - name: Download macOS ZIP - uses: actions/download-artifact@v4 - with: - name: ${{ env.macos-name }} + - name: Install Godot export templates + run: | + curl -L -o godot-templates.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_export_templates.tpz" + unzip -q godot-templates.zip + mkdir -p ~/Library/Application\ Support/Godot/export_templates/${{ env.godot-version }}.stable/ + mv ./templates/* ~/Library/Application\ Support/Godot/export_templates/${{ env.godot-version }}.stable/ - - name: Download NSIS installer - uses: actions/download-artifact@v4 - with: - name: ${{ env.windows-installer-name }} + - name: Update project imports + run: ./Godot.app/Contents/MacOS/Godot --headless --import --verbose - - name: Create or update draft release + - name: Build project + run: | + mkdir -p export + ./Godot.app/Contents/MacOS/Godot --headless --path . --export-release "macOS (all environments)" "export/${{ env.macos-name }}" --verbose + + - name: Extract macOS ZIP + run: unzip -q "export/${{ env.macos-name }}" -d extracted + + - name: Install timeout utility + run: brew install coreutils + + - name: Smoke-test macOS app shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then - gh release upload "${{ github.ref_name }}" \ - ${{ env.windows-name }} \ - ${{ env.macos-name }} \ - ${{ env.windows-installer-name }} \ - --clobber + APP="extracted/Kintsugi 3D Viewer.app" + EXE="$APP/Contents/MacOS/Kintsugi 3D Viewer" + + # Test 1: Run the executable directly and check whether it exits early. + "$EXE" & + PID=$! + sleep 30 + + if kill -0 "$PID" 2>/dev/null; then + kill "$PID" + wait "$PID" 2>/dev/null || true + echo "App remained open for 30 seconds (direct executable launch)." else - gh release create "${{ github.ref_name }}" \ - ${{ env.windows-name }} \ - ${{ env.macos-name }} \ - ${{ env.windows-installer-name }} \ - --title "${{ github.ref_name }}" \ - --notes-file RELEASE.md \ - --draft + if wait "$PID"; then + STATUS=0 + else + STATUS=$? + fi + echo "App failed to launch or exited within 30 seconds with code $STATUS (direct executable launch)." + exit 1 + fi + + # Test 2: Launch as a user would and require it to remain open for 30 seconds. + Gtimeout="$(brew --prefix coreutils)/bin/gtimeout" + set +e + "$Gtimeout" --kill-after=5s 30s open -W -n "$APP" + STATUS=$? + set -e + + if [ "$STATUS" -eq 124 ]; then + echo "App remained open for 30 seconds (app launched with 'open')." + else + echo "App failed to launch or exited within 30 seconds with code $STATUS (app launched with 'open')." + exit 1 fi + + - name: Upload macOS release asset + if: github.ref_type == 'tag' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload "${{ github.ref_name }}" "export/${{ env.macos-name }}" --clobber \ No newline at end of file From 0cfacedea19be74f11b0435d2400b938559689b4 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 22:51:32 -0500 Subject: [PATCH 31/37] Attempt to fix build errors --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4047372..24958e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,13 +69,14 @@ jobs: - name: Build project shell: pwsh run: | + $output = Join-Path $PWD "export/Kintsugi3DViewer.exe" New-Item -ItemType Directory -Force export | Out-Null - ./Godot.exe --headless --path . --export-release "Windows Desktop (with environments)" "export/Kintsugi3DViewer.exe" --verbose + ./Godot.exe --headless --path . --export-release "Windows Desktop (with environments)" "$output" --verbose - name: Package Windows ZIP shell: pwsh - run: Compress-Archive -Path export/Kintsugi3DViewer.exe -DestinationPath "${{ env.windows-name }}" - + run: Compress-Archive -Path "export/Kintsugi3DViewer.exe" -DestinationPath "${{ env.windows-name }}" + - name: Install NSIS shell: pwsh run: | @@ -193,7 +194,6 @@ jobs: run: | curl -L -o godot.zip "https://github.com/godotengine/godot/releases/download/${{ env.godot-version }}-stable/Godot_v${{ env.godot-version }}-stable_macos.universal.zip" unzip -q godot.zip - mv Godot.app ./Godot.app - name: Install Godot export templates run: | From 3e5faccb56a90a4391cb2d3807f4894753705591 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 23:23:47 -0500 Subject: [PATCH 32/37] Debugging Windows builds. --- .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 24958e0..d7f7ead 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,6 +72,14 @@ jobs: $output = Join-Path $PWD "export/Kintsugi3DViewer.exe" New-Item -ItemType Directory -Force export | Out-Null ./Godot.exe --headless --path . --export-release "Windows Desktop (with environments)" "$output" --verbose + $code = $LASTEXITCODE + Write-Host "Godot exit code: $code" + if (!(Test-Path $output -PathType Leaf)) { + throw "Godot did not create the executable at: $output" + } + if ($code -ne 0) { + throw "Godot export failed with exit code $code" + } - name: Package Windows ZIP shell: pwsh @@ -259,4 +267,4 @@ jobs: if: github.ref_type == 'tag' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release upload "${{ github.ref_name }}" "export/${{ env.macos-name }}" --clobber \ No newline at end of file + run: gh release upload "${{ github.ref_name }}" "export/${{ env.macos-name }}" --clobber From f54887d146726a1ab30499fcbe3e61232a6a10a9 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 23:32:02 -0500 Subject: [PATCH 33/37] Try to make Windows wait for Godot to finish executing. --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7f7ead..30d230d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,15 +64,25 @@ jobs: Copy-Item godot-templates/templates/* $templateDir -Recurse -Force - name: Update project imports - run: ./Godot.exe --headless --import --verbose + run: | + $process = Start-Process -FilePath "$PWD/Godot.exe" ` + -ArgumentList '--headless --import --verbose' ` + -Wait -PassThru + + Write-Host "Godot import exit code: $($process.ExitCode)" + if ($process.ExitCode -ne 0) { + throw "Godot import failed with exit code $($process.ExitCode)" + } - name: Build project shell: pwsh run: | $output = Join-Path $PWD "export/Kintsugi3DViewer.exe" New-Item -ItemType Directory -Force export | Out-Null - ./Godot.exe --headless --path . --export-release "Windows Desktop (with environments)" "$output" --verbose - $code = $LASTEXITCODE + + $arguments = '--headless --path . --export-release "Windows Desktop (with environments)" "' + $output + '" --verbose' + $process = Start-Process -FilePath "$PWD/Godot.exe" -ArgumentList $arguments -Wait -PassThru + Write-Host "Godot exit code: $code" if (!(Test-Path $output -PathType Leaf)) { throw "Godot did not create the executable at: $output" From c9918b8cbb1efbfd84ba37cc148656cbff6cf8d2 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Tue, 20 Oct 2026 23:40:21 -0500 Subject: [PATCH 34/37] Attempt to make Windows wait for Godot to finish without losing output logging --- .github/workflows/build.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30d230d..d07e504 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,25 +64,15 @@ jobs: Copy-Item godot-templates/templates/* $templateDir -Recurse -Force - name: Update project imports - run: | - $process = Start-Process -FilePath "$PWD/Godot.exe" ` - -ArgumentList '--headless --import --verbose' ` - -Wait -PassThru - - Write-Host "Godot import exit code: $($process.ExitCode)" - if ($process.ExitCode -ne 0) { - throw "Godot import failed with exit code $($process.ExitCode)" - } + run: ./Godot.exe --headless --import --verbose | Out-Host - name: Build project shell: pwsh run: | $output = Join-Path $PWD "export/Kintsugi3DViewer.exe" New-Item -ItemType Directory -Force export | Out-Null - - $arguments = '--headless --path . --export-release "Windows Desktop (with environments)" "' + $output + '" --verbose' - $process = Start-Process -FilePath "$PWD/Godot.exe" -ArgumentList $arguments -Wait -PassThru - + ./Godot.exe --headless --path . --export-release "Windows Desktop (with environments)" "$output" --verbose | Out-Host + $code = $LASTEXITCODE Write-Host "Godot exit code: $code" if (!(Test-Path $output -PathType Leaf)) { throw "Godot did not create the executable at: $output" From d8a468347330cfc780b34b9ae4ce56849acaf198 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Wed, 21 Oct 2026 14:19:55 -0500 Subject: [PATCH 35/37] Check out a specific revision in the build script. --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d07e504..8b09efe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,8 @@ jobs: - name: Check out repository if: github.ref_type == 'tag' uses: actions/checkout@v4 + with: + ref: ${{ github.sha }} - name: Create draft release if needed if: github.ref_type == 'tag' @@ -45,6 +47,8 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 + with: + ref: ${{ github.sha }} - name: Install Godot shell: pwsh @@ -197,6 +201,8 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 + with: + ref: ${{ github.sha }} - name: Install Godot run: | From 42dcfdb649c087f3fc213ef6e7a7014d96dd5740 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Wed, 21 Oct 2026 14:31:06 -0500 Subject: [PATCH 36/37] Allow manual workflow dispatch for build automation. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b09efe..b739fa4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,7 @@ name: Build on: + workflow_dispatch: push: branches: [ 'main' ] tags: [ 'v*.*.*' ] From f9134e877baa80deba5b50c14bbae4e7332f6309 Mon Sep 17 00:00:00 2001 From: Michael Tetzlaff Date: Wed, 21 Oct 2026 23:21:08 -0500 Subject: [PATCH 37/37] Run build automation on pushes to all branches. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b739fa4..505492a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: Build on: workflow_dispatch: push: - branches: [ 'main' ] + branches: [ '**' ] tags: [ 'v*.*.*' ] pull_request: branches: [ 'main' ]