Skip to content
Closed
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
85 changes: 49 additions & 36 deletions installer/InstallerClean.iss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; InstallerClean Inno Setup script.
; InstallerClean Inno Setup script.
;
; AppId stays constant across versions ("InstallerClean") so Windows
; treats every shipped version as the same product; the uninstall
Expand All @@ -11,13 +11,25 @@
; for ad-hoc local builds; it tracks the current shipping target so a
; from-source install doesn't claim an older version on the Add/Remove
; Programs entry.

#define MyAppName "InstallerClean"
#define MyAppAuthor "No Faff"
#define MyAppPublisherURL "https://github.com/no-faff/InstallerClean"
#define MyAppSupportURL "https://github.com/no-faff/InstallerClean/discussions"
#define CurrentYear GetDateTimeString('yyyy','','')
#define SourcePath "..\publish\cli"
#define AppVersion() GetVersionComponents(SourcePath + "\InstallerClean.exe", Local[0], Local[1], Local[2], Local[3]), str(Local[0]) + "." + str(Local[1]) + "." + str(Local[2])

[Setup]
#ifndef AppVersion
#define AppVersion "1.9.0"
#endif
AppId=InstallerClean
AppName=InstallerClean

AppId={#MyAppName}
AppName={#MyAppName}
AppVersion={#AppVersion}
AppVerName={#MyAppName} {#AppVersion}

; Mutex name matches App.xaml.cs and Cli/Program.cs. Setup pauses with
; a "close the running app" prompt when the user upgrades while
; InstallerClean.exe or installerclean-cli.exe is holding it.
Expand All @@ -26,23 +38,25 @@ AppMutex=Global\InstallerClean_SingleInstance
; last-run.json, settings.json.bad on a corrupt-and-recovered run,
; crash.log) survives uninstall by design: the saved move destination
; and the lifetime result-log lock carry across upgrades.
AppPublisher=No Faff
AppPublisher={#MyAppAuthor}
AppPublisherURL=https://github.com/no-faff/InstallerClean
AppSupportURL=https://github.com/no-faff/InstallerClean/discussions
AppCopyright=Copyright (c) 2026 No Faff
AppCopyright=(c) {#CurrentYear} {#MyAppAuthor}
; Win32 VS_FIXEDFILEINFO is a four-part version; AppVersion is three,
; so VersionInfoVersion / VersionInfoProductVersion pad with .0.
VersionInfoVersion={#AppVersion}.0
VersionInfoProductVersion={#AppVersion}.0
VersionInfoProductName=InstallerClean
VersionInfoCompany=No Faff
VersionInfoCopyright=Copyright (c) 2026 No Faff
VersionInfoDescription=InstallerClean Setup
DefaultDirName={autopf}\InstallerClean
DefaultGroupName=InstallerClean
UninstallDisplayIcon={app}\InstallerClean.exe

VersionInfoVersion={#AppVersion}
VersionInfoProductVersion={#AppVersion}
VersionInfoProductName={#MyAppName}
VersionInfoCompany={#MyAppAuthor}
VersionInfoCopyright=(c) {#CurrentYear} {#MyAppAuthor}
VersionInfoDescription={#MyAppName} Setup

DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
UninstallDisplayIcon={app}\{#MyAppName}.exe
OutputDir=..\publish
OutputBaseFilename=InstallerClean-setup
OutputBaseFilename={#MyAppName}-setup
; Compression=bzip; SolidCompression=no. Every other Inno
; compression combination tested on this project has tripped a
; static-ML false positive on the setup hash: lzma2 trips
Expand All @@ -62,47 +76,46 @@ ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
PrivilegesRequired=admin
SetupIconFile=..\src\InstallerClean\Assets\app.ico
WizardStyle=modern dynamic
DisableProgramGroupPage=yes

WizardStyle=modern dynamic
WizardImageFile=wizard-image.bmp
WizardImageFileDynamicDark=wizard-image-dark.bmp
WizardSmallImageFile=wizard-small.png
WizardSmallImageFileDynamicDark=wizard-small.png
WizardImageAlphaFormat=defined

ShowLanguageDialog=yes
UsePreviousLanguage=no
LanguageDetectionMethod=uilanguage

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"

; Welcome/Finished are standard Inno [Messages], overridden per language with
; the language-name prefix. They must live here, NOT in [CustomMessages]:
; [CustomMessages] entries are only reachable via {cm:Name} and would not
; override the wizard's own text. Italian.isl supplies the rest of the wizard.
[Messages]
english.WelcomeLabel1=Welcome to InstallerClean setup
english.WelcomeLabel2=This will install InstallerClean on your computer.
[CustomMessages]
english.WelcomeLabel1=Welcome to {#MyAppName} setup
english.WelcomeLabel2=This will install {#MyAppName} on your computer.
english.FinishedHeadingLabel=Setup complete
english.FinishedLabel=InstallerClean has been installed on your computer.
english.FinishedLabel={#MyAppName} has been installed on your computer.
english.ClickFinish=Click Finish to close setup.
italian.WelcomeLabel1=Benvenuto nell'installazione di InstallerClean
italian.WelcomeLabel2=Questo installerà InstallerClean nel computer.
english.UninstallApp=Uninstall {#MyAppName}
english.LaunchApp=Launch {#MyAppName}

italian.WelcomeLabel1=Benvenuto nell'installazione di {#MyAppName}
italian.WelcomeLabel2=Questo installerà {#MyAppName} nel computer.
italian.FinishedHeadingLabel=Installazione completata
italian.FinishedLabel=InstallerClean è stato installato nel computer.
italian.FinishedLabel={#MyAppName} è stato installato nel computer.
italian.ClickFinish=Per chiudere l'installazione seleziona 'Fine'.

[CustomMessages]
english.UninstallApp=Uninstall InstallerClean
english.LaunchApp=Launch InstallerClean
italian.UninstallApp=Disinstalla InstallerClean
italian.LaunchApp=Esegui InstallerClean
italian.UninstallApp=Disinstalla {#MyAppName}
italian.LaunchApp=Esegui {#MyAppName}

[Files]
Source: "..\publish\self-contained\InstallerClean.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}\InstallerClean.exe"; DestDir: "{app}"; Flags: ignoreversion
; CLI is a .NET console exe published from src/InstallerClean.Cli;
; ships alongside the GUI so PowerShell and cmd block on the process
; subsystem naturally.
Source: "..\publish\cli\installerclean-cli.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourcePath}\installerclean-cli.exe"; DestDir: "{app}"; Flags: ignoreversion
; pad.xml's Distribution_Permissions requires the MIT licence text to
; travel alongside any redistributed binary, so Setup installs it too.
; DestName gives the installed copy a .txt extension so a double-click opens it
Expand All @@ -111,7 +124,7 @@ Source: "..\publish\cli\installerclean-cli.exe"; DestDir: "{app}"; Flags: ignore
Source: "..\LICENSE"; DestDir: "{app}"; DestName: "LICENSE.txt"; Flags: ignoreversion

[Icons]
Name: "{group}\InstallerClean"; Filename: "{app}\InstallerClean.exe"; IconFilename: "{app}\InstallerClean.exe"
Name: "{group}\{#MyAppName}"; Filename: "{app}\InstallerClean.exe"; IconFilename: "{app}\InstallerClean.exe"
Name: "{group}\{cm:UninstallApp}"; Filename: "{uninstallexe}"

[Run]
Expand Down
Loading