- app/shell/installer.nsi with installer.sh: package.sh's folder into Jarvis-Setup-<version>.exe (NSIS, about 10 MB) and its .sha256; models and runtimes still come with the first-run wizard - Program Files with one administrator prompt, Korean pages, components (start menu and desktop shortcuts, the virtual monitor's driver off by default, installed through the app's elevated half), the WebView2 runtime only when missing, a wait for a running Jarvis, /S and /S /RUN for updates, the app started through Explorer so it never runs as administrator - uninstall removes this app's driver, only the files it installed, the shortcuts and its registry keys; the data folder stays - checked on the win-ci VM: silent install, start, update while running and start again, uninstall; and an install with the driver from the pages, whose uninstall leaves no device, driver package or registry key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
1.1 KiB
Bash
Executable File
19 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# The Jarvis installer (admin.spec.md, "Installer"): package.sh's Jarvis/ folder into one NSIS setup.
|
|
# app/shell/installer.sh <output folder> -> <output folder>/Jarvis-Setup-<version>.exe (+ .sha256)
|
|
# Needs makensis 3 (NSISDIR set when it is not installed system-wide) and curl.
|
|
set -eu
|
|
here=$(cd "$(dirname "$0")" && pwd)
|
|
out=$(mkdir -p "${1:?output folder}" && cd "$1" && pwd)
|
|
version=$(sed -n 's/^version = "\(.*\)"/\1/p' "$here/Cargo.toml" | head -1)
|
|
target=${CARGO_TARGET_DIR:-$here/target}
|
|
sh "$here/package.sh" "$out" >/dev/null
|
|
# The WebView2 runtime's bootstrapper (Microsoft, about 2 MB), run only on a PC without the runtime.
|
|
wv2="$target/MicrosoftEdgeWebview2Setup.exe"
|
|
[ -s "$wv2" ] || curl -fsSL -o "$wv2" "https://go.microsoft.com/fwlink/p/?LinkId=2124703"
|
|
setup="$out/Jarvis-Setup-$version.exe"
|
|
makensis -V2 -DVERSION="$version" -DSRC="$out/Jarvis" -DOUT="$setup" -DICON="$here/icons/icon.ico" \
|
|
-DWEBVIEW2="$wv2" "$here/installer.nsi"
|
|
(cd "$out" && sha256sum "Jarvis-Setup-$version.exe" > "Jarvis-Setup-$version.exe.sha256")
|
|
echo "$setup"
|