From 7bda52156b42a69e110584df8c01e252d5e61533 Mon Sep 17 00:00:00 2001 From: Tomjerri1 <151880307+Tomjerri1@users.noreply.github.com> Date: Fri, 13 Nov 2026 02:31:06 +0200 Subject: [PATCH 1/2] Add Inno Setup installer and update release workflow --- .github/workflows/release.yml | 21 +++++++++++-- README.md | 7 +++-- installer/snowfall.iss | 55 +++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 installer/snowfall.iss diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a44a45..1d4b694 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: } - run: cargo test --locked --all-targets - run: cargo build --release --locked - - name: Package + - name: Package zip shell: pwsh run: | $name = "snowfall-$env:TAG-windows-x64" @@ -41,12 +41,27 @@ jobs: Compress-Archive -Path $name -DestinationPath "$name.zip" $hash = (Get-FileHash "$name.zip" -Algorithm SHA256).Hash.ToLower() "$hash $name.zip" | Out-File -Encoding ascii "$name.zip.sha256" + - name: Build installer + shell: pwsh + run: | + choco install innosetup --no-progress -y + $version = $env:TAG.TrimStart('v') + $iscc = Join-Path ${env:ProgramFiles(x86)} 'Inno Setup 6\ISCC.exe' + & $iscc "/DAppVersion=$version" "/O$PWD" "/Fsnowfall-$env:TAG-windows-x64-setup" installer\snowfall.iss + if ($LASTEXITCODE -ne 0) { exit 1 } + $setup = "snowfall-$env:TAG-windows-x64-setup.exe" + $hash = (Get-FileHash $setup -Algorithm SHA256).Hash.ToLower() + "$hash $setup" | Out-File -Encoding ascii "$setup.sha256" - name: Publish release shell: pwsh env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - $name = "snowfall-$env:TAG-windows-x64" + $zip = "snowfall-$env:TAG-windows-x64" + $setup = "snowfall-$env:TAG-windows-x64-setup.exe" + $lines = gh api "repos/$env:GITHUB_REPOSITORY/releases/generate-notes" -f tag_name=$env:TAG --jq .body + $notes = ($lines | Where-Object { $_ -notmatch 'Full Changelog' }) -join "`n" + Set-Content -Path notes.md -Value $notes -Encoding utf8 $flags = @() if ($env:TAG -match '-') { $flags += '--prerelease' } - gh release create $env:TAG "$name.zip" "$name.zip.sha256" --generate-notes --title "Snowfall $env:TAG" @flags + gh release create $env:TAG "$zip.zip" "$zip.zip.sha256" $setup "$setup.sha256" --notes-file notes.md --title "Snowfall $env:TAG" @flags diff --git a/README.md b/README.md index 1d5c97e..0e04501 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,12 @@ A lightweight **Windows desktop overlay** that makes snow fall over your screen. ## Download -Get the latest `snowfall-*-windows-x64.zip` from the [Releases](https://github.com/Tomjerri1/Snowfall/releases/latest) page, unzip it and run `snowfall.exe`. No installation needed. +Get the latest version from the [Releases](https://github.com/Tomjerri1/Snowfall/releases/latest) page: -> Windows SmartScreen may show a warning because the executable is not code-signed. Click **More info → Run anyway**. You can verify the download with the `.sha256` file from the release. +- **`snowfall-*-setup.exe`** (recommended): the installer. No administrator rights needed. It can add a desktop shortcut and start Snowfall with Windows. +- **`snowfall-*-windows-x64.zip`**: portable version. Unzip it and run `snowfall.exe`. + +> Windows SmartScreen may show a warning because the files are not code-signed. Click **More info → Run anyway**. You can verify a download with the matching `.sha256` file from the release. ## Usage diff --git a/installer/snowfall.iss b/installer/snowfall.iss new file mode 100644 index 0000000..7e6e489 --- /dev/null +++ b/installer/snowfall.iss @@ -0,0 +1,55 @@ +#ifndef AppVersion + #define AppVersion "0.0.0" +#endif + +[Setup] +AppId={{29BC2D42-1EEB-4D88-A7EA-95A9D4B6FBCC} +AppName=Snowfall +AppVersion={#AppVersion} +AppPublisher=Tomjerri1 +AppPublisherURL=https://github.com/Tomjerri1/Snowfall +AppSupportURL=https://github.com/Tomjerri1/Snowfall/issues +DefaultDirName={autopf}\Snowfall +DefaultGroupName=Snowfall +DisableProgramGroupPage=yes +PrivilegesRequired=lowest +ArchitecturesAllowed=x64compatible +ArchitecturesInstallIn64BitMode=x64compatible +LicenseFile=..\LICENSE +SetupIconFile=..\assets\icon.ico +UninstallDisplayIcon={app}\snowfall.exe +OutputBaseFilename=snowfall-setup +Compression=lzma2 +SolidCompression=yes +WizardStyle=modern + +[Tasks] +Name: "desktopicon"; Description: "Create a &desktop shortcut"; Flags: unchecked +Name: "autostart"; Description: "Start Snowfall when Windows starts"; Flags: unchecked + +[Files] +Source: "..\target\release\snowfall.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\README.md"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\LICENSE"; DestDir: "{app}"; Flags: ignoreversion + +[Icons] +Name: "{autoprograms}\Snowfall"; Filename: "{app}\snowfall.exe" +Name: "{autodesktop}\Snowfall"; Filename: "{app}\snowfall.exe"; Tasks: desktopicon + +[Registry] +Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Snowfall"; ValueData: """{app}\snowfall.exe"""; Flags: uninsdeletevalue; Tasks: autostart + +[Run] +Filename: "{app}\snowfall.exe"; Description: "Launch Snowfall"; Flags: nowait postinstall skipifsilent + +[UninstallRun] +Filename: "{sys}\taskkill.exe"; Parameters: "/F /IM snowfall.exe"; Flags: runhidden; RunOnceId: "KillSnowfall" + +[Code] +function PrepareToInstall(var NeedsRestart: Boolean): String; +var + ResultCode: Integer; +begin + Exec(ExpandConstant('{sys}\taskkill.exe'), '/F /IM snowfall.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); + Result := ''; +end; From 0002431f5263ad78e406a496144f09ddda8f356a Mon Sep 17 00:00:00 2001 From: Tomjerri1 <151880307+Tomjerri1@users.noreply.github.com> Date: Fri, 13 Nov 2026 02:37:30 +0200 Subject: [PATCH 2/2] fix: auto-start --- installer/snowfall.iss | 1 + 1 file changed, 1 insertion(+) diff --git a/installer/snowfall.iss b/installer/snowfall.iss index 7e6e489..d34efe9 100644 --- a/installer/snowfall.iss +++ b/installer/snowfall.iss @@ -38,6 +38,7 @@ Name: "{autodesktop}\Snowfall"; Filename: "{app}\snowfall.exe"; Tasks: desktopic [Registry] Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Snowfall"; ValueData: """{app}\snowfall.exe"""; Flags: uninsdeletevalue; Tasks: autostart +Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueName: "Snowfall"; ValueType: none; Flags: deletevalue; Tasks: not autostart [Run] Filename: "{app}\snowfall.exe"; Description: "Launch Snowfall"; Flags: nowait postinstall skipifsilent