feat: ship an Inno Setup installer from the windows release job
This commit is contained in:
parent
6bb850b9af
commit
433573693c
4 changed files with 90 additions and 10 deletions
31
windows/installer.sh
Normal file
31
windows/installer.sh
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
# Pack the dist/ bundle into carrier-windows-<version>-setup.exe.
|
||||
#
|
||||
# Run from the carrier checkout after windows/bundle.sh has produced
|
||||
# dist/. Requires Inno Setup 7 (per-user install, which its own
|
||||
# installer's "just me" option produces).
|
||||
set -euo pipefail
|
||||
|
||||
say() { printf '\n==> %s\n' "$*"; }
|
||||
die() { printf '\n!! %s\n' "$*" >&2; exit 1; }
|
||||
|
||||
# MSYS2's login shells prune LOCALAPPDATA from the environment, so fall
|
||||
# back to cygpath (CSIDL 28 = local AppData of the current user).
|
||||
if [ -n "${LOCALAPPDATA:-}" ]; then
|
||||
appdata=$(cygpath -u "$LOCALAPPDATA")
|
||||
else
|
||||
appdata=$(cygpath -F 28)
|
||||
fi
|
||||
ISCC="$appdata/Programs/Inno Setup 7/ISCC.exe"
|
||||
[ -f "$ISCC" ] || die "Inno Setup not found at $ISCC — install it from https://jrsoftware.org/isdl.php"
|
||||
|
||||
[ -d dist ] || die "no dist/ bundle — run windows/bundle.sh first"
|
||||
|
||||
version=$(sed -n 's/^version = "\(.*\)"$/\1/p' Cargo.toml | head -1)
|
||||
|
||||
say "compiling the installer"
|
||||
# MSYS2_ARG_CONV_EXCL stops MSYS2 mangling /DVersion into a path.
|
||||
MSYS2_ARG_CONV_EXCL="*" "$ISCC" /DVersion="$version" windows/carrier.iss \
|
||||
|| die "ISCC failed"
|
||||
|
||||
say "done — carrier-windows-$version-setup.exe (in the checkout root)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue