Skip to content

feat: add Windows installer packaging via Inno Setup#4641

Open
bniler1 wants to merge 1 commit into
ChrisTitusTech:mainfrom
bniler1:main
Open

feat: add Windows installer packaging via Inno Setup#4641
bniler1 wants to merge 1 commit into
ChrisTitusTech:mainfrom
bniler1:main

Conversation

@bniler1

@bniler1 bniler1 commented Jun 5, 2026

Copy link
Copy Markdown

Summary

  • Adds winutil.iss — an Inno Setup 6 script that compiles winutil.ps1 into a standard Windows installer (WinUtil-Setup-<version>.exe)
  • Adds build-installer.ps1 — one-shot build script that runs Compile.ps1, auto-installs Inno Setup via winget if missing, then invokes ISCC.exe to produce the installer under installer\
  • Fixes *.ico binary missing from .gitattributes, which was silently corrupting docs/static/favicon.ico via git line-ending conversion; regenerates the icon as a clean valid ICO (16/32/48 px)
  • Excludes installer/ build output from git via .gitignore

Installer behaviour

  • Installs winutil.ps1 to %ProgramFiles%\WinUtil
  • Creates Start Menu shortcut + optional Desktop shortcut
  • Both shortcuts are patched at install time to Run as Administrator (sets bit 5 of the .lnk header via Pascal [Code]), so launching from the Start Menu triggers UAC directly without a double-launch
  • Offers to launch WinUtil immediately after install
  • Includes a standard uninstaller

Usage

# From repo root — builds installer\WinUtil-Setup-26.06.05.exe
.\build-installer.ps1

# Skip recompiling winutil.ps1 if already built
.\build-installer.ps1 -SkipCompile

# Specify a custom version string
.\build-installer.ps1 -Version "26.06.05"

Test plan

  • Run .\build-installer.ps1 from a clean clone — verify installer\WinUtil-Setup-<date>.exe is produced with no errors or warnings
  • Run the installer as a standard user — verify UAC prompt appears, files land in %ProgramFiles%\WinUtil, and shortcuts appear in Start Menu and Desktop
  • Launch WinUtil from the Start Menu shortcut — verify UAC triggers and the WPF window opens correctly
  • Run the uninstaller — verify all files and shortcuts are removed
  • Verify docs/static/favicon.ico is committed as binary (no line-ending corruption after git checkout)

- winutil.iss: Inno Setup script that installs winutil.ps1 to
  %ProgramFiles%\WinUtil, creates Start Menu + optional Desktop
  shortcuts patched with Run-as-Administrator flag
- build-installer.ps1: one-shot build script (Compile.ps1 ->
  ISCC.exe -> installer\WinUtil-Setup-<version>.exe); auto-installs
  Inno Setup via winget if missing
- .gitattributes: add *.ico binary to prevent git line-ending
  corruption of icon files
- .gitignore: exclude installer/ build output
- docs/static/favicon.ico: regenerated as a clean valid ICO
  (16/32/48 px) after the original was corrupted by missing binary attr
@bniler1 bniler1 requested a review from ChrisTitusTech as a code owner June 5, 2026 08:34
@GabiNun2

GabiNun2 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

if you want a winutil exe without paying just do

class Program {
    static void Main() {
        System.Diagnostics.Process.Start("powershell", "-Command irm christitus.com/win | iex");
    }
}

than you can complie it into an exe

& $Env:SystemRoot\Microsoft.NET\Framework64\v4.0.30319\csc.exe /target:winexe winutil.cs

this is just bloat

@jnsh-rf

jnsh-rf commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Ensure that all dashes are normal, reference #4640

@GabiNun2

GabiNun2 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Ensure that all dashes are normal, reference #4640

?

@jnsh-rf

jnsh-rf commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Ensure that all dashes are normal, reference #4640

?

ps 5 does not like em-dashes, and CodingWonders removes them. It would be counter productive to add them back (if merged)

@GabiNun2

GabiNun2 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Ensure that all dashes are normal, reference #4640

?

ps 5 does not like em-dashes, and CodingWonders removes them. It would be counter productive to add them back (if merged)

ohhh i tought you were the guy who made the pr because you have the same icon my bad

@gepardjaro

Copy link
Copy Markdown
Contributor

Chris already rejected similar PR. People usually run winutil once after the device is built or after some time when want to refresh the system. This would just bloat the script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants