feat(client): Windows 提供 Inno Setup 安装程序 + 下载改同源 HTTPS
Deploy / build-windows (push) Failing after 22s
Deploy / build-linux-web (push) Failing after 14m4s
Deploy / build-macos (push) Has been skipped
Deploy / release-deploy (push) Has been skipped

- Windows 客户端打成 jiu-windows-x64-setup.exe(Inno Setup,中文向导、
  桌面/开始菜单快捷方式、卸载项),替代解压版 zip
- provision-windows.sh 自动静默安装 Inno Setup(缺则装)
- 下载 URL 从内网 HTTP Forgejo 改为 https://jiu.51yanmei.com/downloads/,
  修复 HTTPS 页面下发 http 内网地址被浏览器拦截(无法安全下载),win/mac 均生效
- deploy.sh 将安装包发布到 EC2 /opt/jiu/downloads/,nginx 新增 /downloads/ 路由

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-04 07:46:41 +08:00
parent f039bd0c61
commit c001f0e8e6
7 changed files with 131 additions and 11 deletions
+22 -3
View File
@@ -2,8 +2,10 @@
# provision-windows.sh — idempotent provisioning for the Windows host runner.
#
# Pre-warms what compile-windows.sh would download at runtime: Flutter Windows
# engine artifacts and pub packages. Short-circuits via a stamp file keyed to
# the installed Flutter version, so repeat runs return immediately.
# engine artifacts, pub packages, and the Inno Setup compiler (ISCC) used to
# build the installer. The Flutter part short-circuits via a stamp keyed to the
# installed Flutter version; Inno Setup is ensured on every run (cheap when
# already present) so it self-heals independently of the Flutter stamp.
set -euo pipefail
SCRIPT_DIR="$(dirname "$0")"
@@ -15,7 +17,24 @@ STAMP="${STAMP_DIR}/provisioned-windows"
CUR="${STAMP_DIR}/.flutter-version-win.cur"
mkdir -p "$STAMP_DIR"
# --- detection ---
# --- ensure Inno Setup (ISCC) for building the installer (always checked) ---
ISCC="/c/Program Files (x86)/Inno Setup 6/ISCC.exe"
if [ ! -f "$ISCC" ]; then
echo "==> installing Inno Setup 6 (silent)"
# Canonical "latest stable" entry point (redirects to the GitHub release asset).
INNO_URL="https://jrsoftware.org/download.php/is.exe"
powershell -NoProfile -Command \
"Invoke-WebRequest -Uri '${INNO_URL}' -OutFile \"\$env:TEMP\\innosetup.exe\""
powershell -NoProfile -Command \
"Start-Process -Wait -FilePath \"\$env:TEMP\\innosetup.exe\" -ArgumentList '/VERYSILENT','/SUPPRESSMSGBOXES','/NORESTART','/SP-'"
if [ ! -f "$ISCC" ]; then
echo "ERROR: Inno Setup install failed — ISCC not found at '$ISCC'." >&2
exit 1
fi
echo "==> Inno Setup installed."
fi
# --- detection (Flutter) ---
if ! command -v flutter >/dev/null 2>&1; then
echo "ERROR: flutter not found on PATH. Install Flutter on this runner first." >&2
exit 1