mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[Installer] Make the Inno Setup installer the default, with its failure hook.
COCKATRICE_WIN_INSTALLER now defaults to InnoSetup. NSIS stays selectable for one release as the legacy fallback, and the two can still be built from one tree and compared on a real upgrade. The switches question from the previous commit is settled from Inno Setup's source: the setup command line is an if/else-if chain over the switches it knows, with no fallback that rejects the rest, so /R, /PID= and /D= are ignored rather than refused. The client therefore sends one command line that drives either installer: - /R and /PID= for NSIS, which also needs /D= last and unquoted; - /VERYSILENT and the CloseApplications set for Setup, which releases the mapped runtime DLLs through Restart Manager instead of waiting for a pid; - /UPDATER as the client's own mark, read only by the Inno Setup script. An older client that passes only the NSIS switches still installs; it walks the wizard once instead of running silently. The Sentry offer that AbortInstall carried is ported: a silent run the updater launched, which began replacing files and never reached the end, offers to send its log through the same helper. The helper is embedded with a [Files] dontcopy entry and extracted at send time; a repeated [Files] section merges with the generated one instead of being a compile error. Setup prefixes every log line with a timestamp, so the helper's ABORT scan now allows that prefix. CI installs Inno Setup next to NSIS, dumps ISCCOutput.log and the generated script when the installer fails to compile, and --package NSIS|InnoSetup selects the installer through the CMake option instead of adding a second CPack generator to the run.
This commit is contained in:
parent
2c8e47a0a4
commit
0403ac9354
8 changed files with 220 additions and 73 deletions
29
.github/workflows/desktop-build.yml
vendored
29
.github/workflows/desktop-build.yml
vendored
|
|
@ -552,10 +552,13 @@ jobs:
|
|||
modules: ${{ matrix.qt_modules }}
|
||||
version: ${{ matrix.qt_version }}
|
||||
|
||||
- name: "[Windows] Install NSIS"
|
||||
# Inno Setup writes the default Windows installer (COCKATRICE_WIN_INSTALLER=InnoSetup);
|
||||
# NSIS stays installed because the option still selects the old installer, and CI has to
|
||||
# be able to build both to compare them on a real upgrade.
|
||||
- name: "[Windows] Install installer tooling"
|
||||
if: matrix.os == 'Windows'
|
||||
shell: bash
|
||||
run: choco install nsis
|
||||
run: choco install nsis innosetup
|
||||
|
||||
# Ninja invokes cl.exe directly and needs the MSVC environment on PATH.
|
||||
- name: "[Windows] Set up MSVC environment"
|
||||
|
|
@ -745,16 +748,26 @@ jobs:
|
|||
# `debug-files upload` and DIFs are matched by debug ID, not release.
|
||||
sentry-cli debug-files upload --org cockatrice --project cockatrice-desktop "${paths[@]}"
|
||||
|
||||
# CPack reports a failed makensis run as "Problem running NSIS command"
|
||||
# plus a path to NSISOutput.log, and that log lives only on the runner, so
|
||||
# the actual compile error is otherwise nowhere in the workflow output.
|
||||
# Dump it, or a broken installer script is undiagnosable from CI alone.
|
||||
# CPack reports a failed installer compile only as a path to a log that lives on the
|
||||
# runner: NSISOutput.log for makensis, ISCCOutput.log for Inno Setup's compiler. The
|
||||
# Inno Setup error names a line of the script CPack generated, so that script is
|
||||
# dumped too - without them a broken installer script is undiagnosable from CI alone.
|
||||
# shell: bash matters here - the default pwsh resolves `find` to Windows'
|
||||
# text-search find.exe, which errors instead of searching.
|
||||
- name: "Dump NSIS compile log"
|
||||
- name: "Dump installer compile log"
|
||||
if: failure() && matrix.os == 'Windows'
|
||||
shell: bash
|
||||
run: find . -name NSISOutput.log -exec cat {} +
|
||||
run: |
|
||||
find . -name NSISOutput.log -o -name ISCCOutput.log | while read -r log; do
|
||||
echo "::group::$log"
|
||||
cat "$log"
|
||||
echo "::endgroup::"
|
||||
done
|
||||
find . -path '*_CPack_Packages*' -name ISScript.iss | while read -r script; do
|
||||
echo "::group::$script"
|
||||
cat "$script"
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
# A master run hands over the archives it had to build itself so that
|
||||
# vcpkg-cache-import.yml, which runs in the default branch scope, can save them
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue