Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
56 changes: 56 additions & 0 deletions installer/snowfall.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#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
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
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

[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;
Loading