Windows: signed installer without the SmartScreen warning, and winget, Scoop and Chocolatey #76
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today
revue.exeand…-setup.exeare unsigned. SmartScreen shows "Windows protected your PC / Unknown publisher" and some antivirus tools flag the download. There's also no way to install Revue with a Windows package manager.Part 1: Code signing
Which certificate
Since 2023 every publicly trusted code-signing key must live in an HSM (a cloud service or a token), so a .pfx in a CI secret is no longer an option. EV certificates no longer skip SmartScreen either (since 2024), so a cheaper OV certificate is enough: reputation builds up with downloads either way. The options for us:
Recommendation: Certum Open Source if its cloud signing can run headless (check it with jsign or osslsigncode with PKCS#11). Otherwise Azure if we have a company, otherwise SSL.com eSigner.
Where to sign (all on Linux, in the existing
windowsjob)osslsigncodein thecargo-xwincontainer, with an RFC 3161 timestamp.task package PLATFORM=windows: signrevue.exebefore it goes into the zip and the NSIS installer, sign the uninstaller from inside NSIS (!uninstfinalize, NSIS 3.08+), then sign…-setup.exe. Skip all of it when the secrets are missing, so local builds keep working.Part 2: Package managers
First, the updater must keep the installed version in step
NSIS writes
DisplayVersiontoHKCU\…\Uninstall\Revue(packaging/revue.nsi:54), but the self-updater (src/update.rs:342) only swaps the exe. winget and Chocolatey read that version, so after a self-update they think an old version is installed and offer an upgrade. Fix this in one of two ways:…-setup.exeand run it silently (/S), so the installer handles the files, the registry and the shortcuts in one place; orDisplayVersion(andInstallLocationif it changed) after swapping the exe.winget (first)
InstallerType: nullsoft,Scope: user, silent/S,UpgradeBehavior: install, and the Forgejo release asset URL (the repo is public).komac update <Id> --version X.Y.Z --urls … --submitfromrelease.yml, with a GitHub token (WINGET_GITHUB_TOKEN) that opens the PR onmicrosoft/winget-pkgs. The first submission is by hand.Scoop (cheap, fits the portable zip)
scoop-revuewithrevue.json: the zip,bin: revue.exe, a shortcut, pluscheckver/autoupdatepointing at the Forgejo releases API. Scoop installs into~/scoop/apps. That folder is writable, but the updater should leave it to Scoop: detect a Scoop install from the exe's path (…\scoop\apps\…) the same way the Linux issue generalizesmanaged_by_nix.Chocolatey (last)
revuepackage (nuspec +chocolateyInstall.ps1running the setup with/Sand the checksum).choco packandpushrun in thechocolatey/chocoLinux image. Every version goes through community moderation (days), so it's the slowest channel. Do it if users ask.Docs
Add winget, Scoop and Chocolatey to
docs/getting-started.md(Install on Windows), the README table, anddocs/updates.md(which installs update themselves and which update with their package manager).Decisions for you
Order
Updater (DisplayVersion) → signing → winget → Scoop → docs → Chocolatey.
Package managers, done ahead of signing (
7a82743):thatrichan.Revue0.42.0 submitted, https://github.com/microsoft/winget-pkgs/pull/478503 (CLA signed). Later versions: release.yml'spackage-managersjob runs Komac, which needs the secretWINGET_GITHUB_TOKEN.thatrichan/scoop-revueis filled in frompackaging/scoop/revue.jsonat each release. The repository still has to be created.DisplayVersionin Installed apps after updating itself.Signing is still open.