feat(setup): one setup for Chronos Desktop and Chronos Uploader

Chronos Server now ships as a Docker image only, so the Windows setup no
longer offers it and the separate Uploader setup goes: one setup installs,
updates, adds and removes Chronos Desktop and Chronos Uploader in place.

- Install log format 2 records each component's files, shortcuts, version
  and SHA-256; format 1 logs (1.0) are still read. A file of a removed
  program that changed since setup installed it is kept, never deleted.
- A Chronos Server 1.0 for Windows installed by 1.0 is retained as "no
  longer offered": its files and service are untouched until the user
  unticks it or explicit /COMPONENTS leave it out; then it is removed with
  its service. A format 1 log keeps every file the payload does not know.
- The separate 1.0 Chronos Uploader product is replaced: the Uploader is
  preselected, its sign-in entry moves to the new copy (Task Manager state
  kept), its shortcut is handed over and the old product is uninstalled.
  An all-users copy under a per-user install stays and is said so.
- The setup window shows the dry-run plan (Changes: adds, removes,
  replaces) before Update; with every program unticked the primary action
  becomes Uninstall. /COMPONENTS=Desktop names the desktop app.
- pack-installer refuses Server (--legacy packs a 1.0 one for the CI test);
  release.yml publishes only Chronos-Setup-<v>.exe and the portable zip;
  the installer test covers add/remove in place, the Uploader replacement
  and the retained Server.

Refs #64

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-15 13:13:54 +01:00
1 parent 58ed737310
commit 7d0c6554a4
58 files changed
+1401 -233

No files matched your search

+22 -7
View File
@@ -1,7 +1,7 @@
name: Release
# A tag vMAJOR.MINOR.PATCH[-PRERELEASE] builds, tests and publishes everything (BRIEF §19.3, amended 2026-10-26, R1)
# on the Linux runner: the Windows programs cross-compiled (installers, portable and server zips), SHA256SUMS and
# on the Linux runner: the Windows programs cross-compiled (the one setup and the portable zip), SHA256SUMS and
# release notes on the Gitea release, then the server image in the Gitea container registry. The image's :latest
# follows the highest stable release, or the highest pre-release while no stable one exists; the public releases
# repository and the in-app update check follow stable releases only.
@@ -111,7 +111,6 @@ jobs:
common="-c Release -r win-x64 --self-contained -p:ChronosVersion=$VERSION -p:ChronosReleasesUrl=$CHRONOS_RELEASES_URL -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=none -m:$BUILD_CPUS"
dotnet publish src/Chronos.App/Chronos.App.csproj $common -p:PublishReadyToRun=true -o out/publish/app
dotnet publish src/Chronos.Uploader/Chronos.Uploader.csproj $common -p:PublishReadyToRun=true -o out/publish/uploader
dotnet publish src/Chronos.Server/Chronos.Server.csproj $common -o out/publish/server
dotnet publish src/Chronos.Setup/Chronos.Setup.csproj $common -p:PublishReadyToRun=true -o out/publish/setup
dotnet "$TOOLS" pe-check out/publish/app/Chronos.exe out/publish/uploader/Chronos.Uploader.exe out/publish/setup/Chronos.Setup.exe
@@ -131,15 +130,14 @@ jobs:
mv "$exe.signed" "$exe"
done
- name: Package installers and archives
# One setup installs, updates, adds and removes Chronos Desktop and Chronos Uploader; Chronos Server ships only as
# the Docker image. The portable zip stays beside it: portable copies update through it.
- name: Package the setup and the portable zip
run: |
mkdir -p out/release
dotnet "$TOOLS" pack-installer --setup out/publish/setup/Chronos.Setup.exe --product Chronos \
--component "Chronos=out/publish/app" --component "Uploader=out/publish/uploader" --component "Server=out/publish/server" \
--component "Chronos=out/publish/app" --component "Uploader=out/publish/uploader" \
--version "$VERSION" --out "out/release/Chronos-Setup-$VERSION.exe"
dotnet "$TOOLS" pack-installer --setup out/publish/setup/Chronos.Setup.exe --product "Chronos Uploader" \
--component "Uploader=out/publish/uploader" --version "$VERSION" --out "out/release/Chronos-Uploader-Setup-$VERSION.exe"
dotnet "$TOOLS" zip out/publish/server --out "out/release/Chronos-Server-win-x64-$VERSION.zip"
# The portable build keeps its data next to Chronos.exe because of portable.txt (never inside the installer).
cp -R out/publish/app out/portable
printf 'Chronos portable mode: settings, index and logs are kept in the data folder next to Chronos.exe.\r\n' > out/portable/portable.txt
@@ -147,6 +145,23 @@ jobs:
dotnet "$TOOLS" pe-check out/release/*.exe
ls -l out/release
# The release holds exactly the setup and the portable zip (SHA256SUMS follows): an Uploader-only setup or a
# Windows server package must never be published again.
- name: Check the release assets
working-directory: out/release
run: |
if ls | grep -E 'Uploader-Setup|Server-win' ; then
echo "::error title=Release assets::an Uploader-only setup or a Windows server package was produced"
exit 1
fi
expected="$(printf '%s\n' "Chronos-Setup-$VERSION.exe" "Chronos-win-x64-portable-$VERSION.zip" | sort)"
actual="$(ls -1 | sort)"
if [ "$actual" != "$expected" ]; then
echo "::error title=Release assets::expected:"; echo "$expected"; echo "found:"; echo "$actual"
exit 1
fi
echo "Release assets: $(echo "$actual" | tr '\n' ' ')"
- name: Sign installers
if: env.HAS_SIGNING == 'true'
env: