diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c94f3a6..51a51a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -114,13 +114,18 @@ jobs: - uses: Swatinem/rust-cache@v2.9.1 - # mingw-w64 for the cross compile, wixl for the .msi — Debian and Ubuntu - # ship it apart from `msitools`, which has only the msi* tools — and - # p7zip for the mpv-dev archive. + # mingw-w64 for the cross compile and p7zip for the mpv-dev archive. - name: Install the cross toolchain run: | sudo apt-get update - sudo apt-get install -y mingw-w64 wixl zip p7zip-full + sudo apt-get install -y mingw-w64 zip p7zip-full + + # Not `apt install wixl`: noble has msitools 0.103, and — + # the PATH entry for pstr.exe — arrived in 0.105. An older wixl core dumps + # on the .wxs rather than declining it. 0.106 is in 25.10 but its .deb + # wants a libxml2 noble does not have, so this builds from source (~2 min). + - name: Install wixl >= 0.105 + run: scripts/install-wixl.sh - name: Build the portable .zip and the .msi env: diff --git a/packaging/windows/proton-stream.wixl.wxs b/packaging/windows/proton-stream.wixl.wxs index cfd7092..94b7e74 100644 --- a/packaging/windows/proton-stream.wixl.wxs +++ b/packaging/windows/proton-stream.wixl.wxs @@ -36,7 +36,9 @@ Keep in sync with proton-stream.wxs =================================== - UpgradeCode and every Component Guid are shared with that file, deliberately. + One attribute deliberately disagrees — Environment/@Permanent, because wixl + reads it backwards; see the comment on that element. UpgradeCode and every + Component Guid are shared with that file, deliberately. They are what lets an .msi built here upgrade one built on Windows (and the reverse) instead of the two stacking up or corrupting each other's component reference counts. Never regenerate them; a new *payload file* gets a new @@ -108,11 +110,23 @@ + it. + + Permanent="yes" here against Permanent="no" in the WiX file, and + the two mean the same thing. wixl has the attribute inverted: it + appends the Environment table's "-" prefix — "remove this value + on uninstall" — when Permanent is *true*, so Permanent="no" + builds an .msi whose uninstall leaves the PATH entry behind. + Verify with `msiinfo export out.msi Environment`; the Name must + come out "=-*PATH". + + itself needs msitools >= 0.105. Older wixl aborts + on this element with a core dump rather than an error, which is + why scripts/build-windows.sh checks the version first. --> + Part="last" Action="set" System="yes" Permanent="yes" />