; ipswap installer. ; ; Compile with Inno Setup 6: ; ISCC.exe /DAppVersion=0.1.0 Inno-compile.iss ; or from the repo root on Linux: ; make installer VERSION=0.1.0 ; ; This is a per-user install. Nothing here needs administrator rights, which is ; deliberate and matches the application: ipswap ships an asInvoker manifest and ; degrades to offering "Relaunch as administrator" rather than demanding ; elevation up front. An installer that popped UAC would undo that. #define AppName "ipswap" #define AppExeName "ipswap.exe" #define AppPublisher "apointless.space" #define AppURL "https://gitea.apointless.space/bsncubed/ipswap" ; Overridden by the Makefile with /DAppVersion=... #ifndef AppVersion #define AppVersion "0.0.0-dev" #endif [Setup] ; Never change AppId: it is what lets a new version upgrade an old one in place ; rather than installing alongside it. AppId={{17223C0B-73DA-457E-9AF7-22220467538A} AppName={#AppName} AppVersion={#AppVersion} AppVerName={#AppName} {#AppVersion} AppPublisher={#AppPublisher} AppPublisherURL={#AppURL} AppSupportURL={#AppURL} AppUpdatesURL={#AppURL}/releases ; The app installs into its own data directory under %APPDATA%, so the binary ; sits beside presets.json, config.json and the log. That keeps the whole ; installation inside the user profile — no Program Files, no admin, and the ; in-app updater can replace the .exe without a privilege prompt. DefaultDirName={userappdata}\{#AppName} DisableDirPage=auto DefaultGroupName={#AppName} DisableProgramGroupPage=yes ; lowest, not admin: see the header. PrivilegesRequiredOverridesAllowed is ; deliberately not set, so there is no path to a machine-wide install that ; would break the updater's ability to swap the binary. PrivilegesRequired=lowest ; ipswap holds this mutex for its lifetime. Inno uses it to notice a running ; copy and ask the user to close it, which matters because a running .exe on ; Windows cannot be overwritten. AppMutex=Local\ipswap-single-instance ArchitecturesAllowed=x64compatible ArchitecturesInstallIn64BitMode=x64compatible OutputDir=Output OutputBaseFilename={#AppName}-{#AppVersion}-setup SetupIconFile=internal\tray\icon.ico UninstallDisplayIcon={app}\{#AppExeName} UninstallDisplayName={#AppName} {#AppVersion} Compression=lzma2/max SolidCompression=yes WizardStyle=modern ShowLanguageDialog=no [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription: "Shortcuts:" Name: "startup"; Description: "Start {#AppName} when Windows starts"; GroupDescription: "Startup:"; Flags: unchecked [Files] Source: "bin\{#AppExeName}"; DestDir: "{app}"; Flags: ignoreversion [Icons] Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}" Name: "{group}\Uninstall {#AppName}"; Filename: "{uninstallexe}" Name: "{userdesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon [Registry] ; --background suppresses the browser tab at login. A launch from a shortcut ; has no flag and does open the editor, which is the behaviour the shortcuts ; above rely on. Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; \ ValueType: string; ValueName: "{#AppName}"; \ ValueData: """{app}\{#AppExeName}"" --background"; \ Flags: uninsdeletevalue; Tasks: startup ; Even when the startup task is not chosen, remove any Run entry the app itself ; wrote from its settings screen — otherwise uninstalling leaves Windows trying ; to launch a binary that is gone. Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; \ ValueType: none; ValueName: "{#AppName}"; \ Flags: uninsdeletevalue; Tasks: not startup [Run] ; No --background here: finishing setup should show the user the editor, which ; is also what starts the tray. Filename: "{app}\{#AppExeName}"; Description: "Start {#AppName} and open the preset editor"; \ Flags: nowait postinstall skipifsilent [UninstallDelete] ; The control channel's session file is runtime state, not user data. Type: files; Name: "{app}\session.json" ; presets.json, config.json and ipswap.log are deliberately NOT listed. They are ; the user's data — preset packs represent real work — and Inno only removes ; files it installed, so {app} survives uninstall with that data intact.