mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
feat(release): ship a Windows Inno Setup installer alongside the portable zip
bundle-windows.ps1 now compiles windows-installer.iss (ISCC is preinstalled on windows-latest) from the same staged payload as the zip, producing tty7-<version>-windows-x86_64-setup.exe: per-user install by default with an all-users option, Start Menu shortcut, Apps uninstall entry, optional desktop icon. Release workflow uploads the new artifact; READMEs and CHANGELOG updated.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
# Usage: bundle-windows.ps1 <target-triple> <arch-label>
|
||||
# Package the release binary into a zip:
|
||||
# dist/tty7-<version>-windows-<arch>.zip
|
||||
# Package the release binary twice from one staged payload:
|
||||
# dist/tty7-<version>-windows-<arch>.zip portable (unzip anywhere)
|
||||
# dist/tty7-<version>-windows-<arch>-setup.exe Inno Setup installer
|
||||
# (Program Files or per-user, Start Menu shortcut, "Apps" uninstall entry)
|
||||
#
|
||||
# Fonts are embedded via include_bytes! and the app icon is compiled into the
|
||||
# executable as a resource (see build.rs). So the archive is tty7.exe plus a
|
||||
# executable as a resource (see build.rs). So the payload is tty7.exe plus a
|
||||
# sibling completions\ dir (loaded at runtime — see terminal::signature) and the
|
||||
# license/readme. This is an unsigned build — SmartScreen will
|
||||
# license/readme. Both artifacts are unsigned builds — SmartScreen will
|
||||
# warn on first launch.
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
@@ -25,5 +27,19 @@ Copy-Item LICENSE "$Stage/LICENSE.txt"
|
||||
Copy-Item README.md "$Stage/README.md"
|
||||
|
||||
Compress-Archive -Path "$Stage/*" -DestinationPath "dist/$Name.zip" -Force
|
||||
|
||||
# Installer, built from the same staged payload. ISCC is on PATH on GitHub's
|
||||
# windows-latest image; fall back to the default install location.
|
||||
$Iscc = (Get-Command ISCC.exe -ErrorAction SilentlyContinue).Source
|
||||
if (-not $Iscc) { $Iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" }
|
||||
& $Iscc `
|
||||
"/DAppVersion=$Version" `
|
||||
"/DStageDir=$((Resolve-Path $Stage).Path)" `
|
||||
"/DOutputDir=$((Resolve-Path dist).Path)" `
|
||||
"/DOutputName=$Name-setup" `
|
||||
.github/scripts/windows-installer.iss
|
||||
if ($LASTEXITCODE -ne 0) { throw "ISCC exited with $LASTEXITCODE" }
|
||||
|
||||
Remove-Item -Recurse -Force $Stage
|
||||
Write-Host "OK dist/$Name.zip"
|
||||
Write-Host "OK dist/$Name-setup.exe"
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
; tty7 Windows installer (Inno Setup 6 — preinstalled on GitHub's
|
||||
; windows-latest runners). Compiled by bundle-windows.ps1, which stages the
|
||||
; payload and passes every path in via /D defines:
|
||||
;
|
||||
; /DAppVersion=<semver> version parsed from Cargo.toml
|
||||
; /DStageDir=<abs path> staged payload (tty7.exe, completions\, LICENSE.txt, README.md)
|
||||
; /DOutputDir=<abs path> where the setup exe is written
|
||||
; /DOutputName=<basename> setup exe filename, without ".exe"
|
||||
;
|
||||
; Defaults to a per-user install ({localappdata}\Programs\tty7 — no UAC
|
||||
; prompt), with an "install for all users" escape hatch in the dialog. The
|
||||
; build is unsigned, so SmartScreen warns on first launch either way — same as
|
||||
; the portable zip.
|
||||
|
||||
#ifndef AppVersion
|
||||
#error Missing /DAppVersion — this script is meant to be compiled via bundle-windows.ps1
|
||||
#endif
|
||||
|
||||
[Setup]
|
||||
; Never change AppId: it is how Windows ties upgrades + the uninstall entry
|
||||
; to previous installs of tty7.
|
||||
AppId={{9A3F6C1E-4B7D-4E2A-8C5F-D01B92E64A37}
|
||||
AppName=tty7
|
||||
AppVersion={#AppVersion}
|
||||
AppPublisher=tty7 contributors
|
||||
AppPublisherURL=https://github.com/l0ng-ai/tty7
|
||||
AppSupportURL=https://github.com/l0ng-ai/tty7/issues
|
||||
AppUpdatesURL=https://github.com/l0ng-ai/tty7/releases
|
||||
DefaultDirName={autopf}\tty7
|
||||
DisableProgramGroupPage=yes
|
||||
PrivilegesRequired=lowest
|
||||
PrivilegesRequiredOverridesAllowed=dialog
|
||||
ArchitecturesAllowed=x64compatible
|
||||
ArchitecturesInstallIn64BitMode=x64compatible
|
||||
MinVersion=10.0
|
||||
LicenseFile={#StageDir}\LICENSE.txt
|
||||
SetupIconFile=..\..\assets\favicon.ico
|
||||
UninstallDisplayIcon={app}\tty7.exe
|
||||
OutputDir={#OutputDir}
|
||||
OutputBaseFilename={#OutputName}
|
||||
Compression=lzma2
|
||||
SolidCompression=yes
|
||||
WizardStyle=modern
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "{#StageDir}\tty7.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "{#StageDir}\completions\*"; DestDir: "{app}\completions"; Flags: ignoreversion recursesubdirs
|
||||
Source: "{#StageDir}\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "{#StageDir}\README.md"; DestDir: "{app}"; Flags: ignoreversion
|
||||
|
||||
[Icons]
|
||||
Name: "{autoprograms}\tty7"; Filename: "{app}\tty7.exe"
|
||||
Name: "{autodesktop}\tty7"; Filename: "{app}\tty7.exe"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\tty7.exe"; Description: "{cm:LaunchProgram,tty7}"; Flags: nowait postinstall skipifsilent
|
||||
Reference in New Issue
Block a user