From ca08074686a82e3e487d58aa4583943c1ae9d031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Forment?= Date: Sat, 28 Feb 2026 03:33:54 +0100 Subject: [PATCH] Feat: produce an .msi for windows CI --- .github/workflows/release.yml | 17 ++++ scripts/build-all.sh | 7 ++ wix/License.rtf | 20 +++++ wix/main.wxs | 146 ++++++++++++++++++++++++++++++++++ 4 files changed, 190 insertions(+) create mode 100644 wix/License.rtf create mode 100644 wix/main.wxs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26137b9..96ca212 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -141,6 +141,21 @@ jobs: name: ${{ matrix.artifact }}-desktop path: target/${{ matrix.target }}/release/cagire-desktop.exe + - name: Install cargo-wix (Windows) + if: runner.os == 'Windows' + run: cargo install cargo-wix + + - name: Build MSI installer (Windows) + if: runner.os == 'Windows' + run: cargo wix --no-build --nocapture -C -p -C x64 + + - name: Upload MSI installer (Windows) + if: runner.os == 'Windows' + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact }}-msi + path: target/wix/*.msi + - name: Upload CLAP artifact uses: actions/upload-artifact@v4 with: @@ -364,6 +379,8 @@ jobs: elif [[ "$name" == *-vst3 ]]; then base="${name%-vst3}" cd "$dir" && zip -r "../../release/${base}-vst3.zip" cagire-plugins.vst3 && cd ../.. + elif [[ "$name" == *-msi ]]; then + cp "$dir"/*.msi release/ elif [[ "$name" == *-appimage ]]; then cp "$dir"/*.AppImage release/ elif [[ "$name" == *-desktop ]]; then diff --git a/scripts/build-all.sh b/scripts/build-all.sh index d6e8880..cee18d3 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -322,6 +322,13 @@ copy_artifacts() { fi fi + # MSI installer for Windows targets + if [[ "$os" == "windows" ]] && command -v cargo-wix &>/dev/null; then + echo " Building MSI installer..." + cargo wix --no-build --nocapture -C -p -C x64 + cp target/wix/*.msi "$OUT/" 2>/dev/null && echo " MSI -> $OUT/" || true + fi + # AppImage for Linux targets if [[ "$os" == "linux" ]]; then if $build_cagire; then diff --git a/wix/License.rtf b/wix/License.rtf new file mode 100644 index 0000000..25bdad5 --- /dev/null +++ b/wix/License.rtf @@ -0,0 +1,20 @@ +{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fswiss\fcharset0 Helvetica;}} +{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1 +\pard\sa200\sl276\slmult1\f0\fs20\lang9 + +CAGIRE - Forth-based Music Sequencer\par +Copyright (c) 2025 Rapha\"el Forment\par +\par +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version.\par +\par +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details.\par +\par +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see https://www.gnu.org/licenses/.\par +} diff --git a/wix/main.wxs b/wix/main.wxs new file mode 100644 index 0000000..3ddac0d --- /dev/null +++ b/wix/main.wxs @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + + + + + + +