added install wizard

This commit is contained in:
Ebbe Baß
2026-08-19 10:30:41 +02:00
parent 6409132659
commit b10370f8bc
2 changed files with 140 additions and 1 deletions
+32 -1
View File
@@ -77,13 +77,44 @@ dotnet run --project src/EbbesMemeClipboard
# build
dotnet build
# publish self-contained single-file binary -> publish/EbbesMemeClipboard.exe (~78 MB)
# portable single exe -> publish/EbbesMemeClipboard.exe (~75 MB, compressed)
dotnet publish src/EbbesMemeClipboard/EbbesMemeClipboard.csproj -c Release -r win-x64 \
--self-contained true -p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=true \
-o publish
# installer build: NOTE compression deliberately OFF (see below) -> publish-installer/ (~172 MB)
dotnet publish src/EbbesMemeClipboard/EbbesMemeClipboard.csproj -c Release -r win-x64 \
--self-contained true -p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=false \
-o publish-installer
# then compile the wizard -> installer/output/EbbesMemeClipboard-Setup-<version>.exe (~51 MB)
"$LOCALAPPDATA/Programs/Inno Setup 6/ISCC.exe" installer/EbbesMemeClipboard.iss
```
### Installer (Inno Setup)
Script: `installer/EbbesMemeClipboard.iss` (tracked; `installer/output/` is gitignored).
Inno Setup 6 installs **per-user** to `%LocalAppData%\Programs\Inno Setup 6\`, not Program
Files — that tripped up the first attempt to locate `ISCC.exe`.
- Per-user install by default (no UAC), with a wizard page letting the user pick
"just me" vs "all users" (`PrivilegesRequired=lowest` +
`PrivilegesRequiredOverridesAllowed=dialog`).
- Optional unchecked tasks: desktop icon, start-with-Windows.
- **Don't double-compress.** Publishing with `EnableCompressionInSingleFile=false` and
letting Inno's LZMA2 do the work gives a ~51 MB setup vs ~70 MB, and the installed app
starts faster because there's no decompression at launch.
- **Uninstall only removes the autostart entry if it points at the installed copy.** The
app's own Settings toggle writes the same `Run` value name, so an unconditional delete
would wipe out a portable build's autostart. This was a real bug caught in testing.
- User data under `%AppData%\EbbesMemeClipboard` is deliberately preserved on uninstall;
only the re-downloadable `GifCache` is removed.
- Verified end-to-end: silent install → files/shortcut/uninstall-entry present → app runs →
silent uninstall → everything removed, user data and unrelated autostart intact.
- An installer does **not** fix SmartScreen warnings; only code signing does.
Note: the published single-file exe takes **~10 seconds on first launch** before the tray
icon appears (native library self-extraction to TEMP). Not a bug. Subsequent launches are
faster.