diff --git a/CHANGELOG.md b/CHANGELOG.md index e1f6e27..3f7eef5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.0.11] - 2026-06-04 +## [1.0.12] - 2026-06-04 ### 新功能 - Windows 客户端改为提供安装程序(Inno Setup 打包的 `jiu-windows-x64-setup.exe`,含中文向导、桌面/开始菜单快捷方式、卸载项),不再是解压版 zip ### 修复 - 修复客户端「无法安全下载」:下载地址从内网 HTTP Forgejo(`http://192.168.3.200:3000`,公网不可达且被浏览器拦截)改为同源 HTTPS `https://jiu.51yanmei.com/downloads/...`,Windows、macOS 均生效 -- 修复 Windows runner 安装 Inno Setup 失败:改用健壮的 `install-innosetup.ps1`(校验下载大小 + 检查安装退出码 + 双 Program Files 目录定位 ISCC),替代会静默成功但实际没装上的内联命令 +- 修复 ISCC 编译报「more than one script filename」:调用 Inno Setup 时关闭 Git Bash 的 MSYS 参数路径转换,避免 `/D` 定义参数被改写 - 部署时将最新安装包发布到 web 服务(`/opt/jiu/downloads/`,nginx `/downloads/` 提供),仅保留最新版本(清旧放新) ## [1.0.9] - 2026-06-04 diff --git a/scripts/ci/compile-windows.sh b/scripts/ci/compile-windows.sh index 826e3ec..a2becf2 100755 --- a/scripts/ci/compile-windows.sh +++ b/scripts/ci/compile-windows.sh @@ -60,7 +60,10 @@ fi cp deploy/windows/jiu-installer.iss "${BUILD_ROOT}/jiu-installer.iss" mkdir -p "${BUILD_ROOT}/dist" echo "==> building installer with Inno Setup (version ${VER})" -"$ISCC" \ +# MSYS_NO_PATHCONV / MSYS2_ARG_CONV_EXCL disable Git Bash's automatic conversion +# of /-leading args into Windows paths, which otherwise mangles ISCC's /D defines +# (turning them into extra "script filenames"). +MSYS_NO_PATHCONV=1 MSYS2_ARG_CONV_EXCL='*' "$ISCC" \ "/DAppVer=${VER}" \ "/DSrcDir=C:\\jiu-build\\client\\build\\windows\\x64\\runner\\Release" \ "/DOutDir=C:\\jiu-build\\dist" \ diff --git a/scripts/ci/install-innosetup.ps1 b/scripts/ci/install-innosetup.ps1 index 11f4f91..f1070e5 100644 --- a/scripts/ci/install-innosetup.ps1 +++ b/scripts/ci/install-innosetup.ps1 @@ -23,9 +23,14 @@ Write-Output "Downloaded $size bytes" if ($size -lt 1000000) { throw "Downloaded file too small ($size bytes) - not a valid installer" } Write-Output "Installing silently..." -$p = Start-Process -FilePath $out -ArgumentList '/VERYSILENT','/SUPPRESSMSGBOXES','/NORESTART','/SP-','/NOICONS' -Wait -PassThru +$log = Join-Path $env:TEMP 'innosetup-install.log' +$p = Start-Process -FilePath $out -ArgumentList '/VERYSILENT','/SUPPRESSMSGBOXES','/NORESTART','/SP-','/NOICONS',"/LOG=$log" -Wait -PassThru Write-Output "Installer exit code: $($p.ExitCode)" -if ($p.ExitCode -ne 0) { throw "Inno Setup installer failed with exit code $($p.ExitCode)" } +if ($p.ExitCode -ne 0) { + Write-Output "----- install log tail -----" + if (Test-Path $log) { Get-Content $log -Tail 40 | ForEach-Object { Write-Output $_ } } + throw "Inno Setup installer failed with exit code $($p.ExitCode)" +} foreach ($c in $candidates) { if (Test-Path $c) { Write-Output "ISCC installed: $c"; exit 0 }