Skip to content

Windows packaging and installer

Build the per-user installer, validate it, then publish its download entry.

Build a release

Prepare the Windows runtime bundle, then build the installer on Windows:

python packaging/windows/build_installer.py --version 0.1.0

This produces Graffitty-0.1.0-windows-x64-setup.exe and adds its SHA-256 checksum to SHA256SUMS in the output directory. Existing entries for other release assets are retained. Build assets sequentially when sharing that directory.

Upload the installer and the combined SHA256SUMS to the same GitHub release, with tag v0.1.0. A missing, duplicate or mismatched checksum stops the bootstrap before it runs the downloaded executable. Use GRAFFITTY_VERSION to select a tag; otherwise it resolves the latest release once and downloads both files from that release.

$env:GRAFFITTY_VERSION = 'v0.1.0'
powershell -NoProfile -ExecutionPolicy Bypass -File packaging/install.ps1

The script requires PowerShell 5.1 or later and x64 Windows 10 1809 or later. It does not close running applications or reboot. If files are locked or setup fails, it reports the failure and leaves the Inno Setup log in the Windows temporary folder. A restart-required result is not reported as a completed install.

Publish the download command

The PowerShell bootstrap downloads the existing per-user Inno Setup installer. Both installation methods use %LOCALAPPDATA%\Programs\Graffitty, the same Start menu shortcut and Windows uninstaller. The bootstrap adds the bundled tools directory to the user PATH without replacing existing entries.

Publish packaging/install.ps1 on the repository's main branch before enabling the public command. Match the existing Cloudflare /install.sh redirect with a 302 redirect:

  • Host: graffitty.com
  • Path: /install.ps1
  • Target: https://raw.githubusercontent.com/graffitty/graffitty/main/packaging/install.ps1

The redirect belongs to the website's Cloudflare configuration, not this checkout. Verify that it returns the PowerShell script before publishing the command to users.

Validate

pwsh -NoProfile -File packaging/windows/test_install.ps1
python -m unittest discover -s tests -p test_windows_installer.py -v

The PowerShell checks mock downloads, setup execution and persistent PATH writes. They cover checksum rejection, setup failure, reboot requests, cleanup, version selection and PATH preservation. They do not establish a physical Windows install or upgrade pass. Validate the real installer and the one-line download separately on Windows before publishing a release.

See Windows builds for runtime development and platform checks.