; InsightUX Windows installer — Inno Setup script. ; ; Build (requires Inno Setup / ISCC installed locally, and dist/InsightUX/ ; already built via `pyinstaller packaging/InsightUX.spec` first): ; iscc packaging/installer.iss ; Output lands in packaging/dist_installer/InsightUX-Setup-.exe. ; ; AppId is a FIXED GUID, generated once and never changed. It's the whole ; mechanism behind "push updates through the installer": every future build ; keeps this same AppId + a higher AppVersion, so re-running a new installer ; upgrades the existing install in place (same folder, same shortcuts) ; instead of creating a second copy. Do not regenerate this GUID. ; ; Installs per-user (PrivilegesRequired=lowest) to %LocalAppData%\InsightUX — ; no admin/UAC prompt, and critically, no Program Files write-permission ; problems for calibration.pkl/sessions/, which the running app writes ; directly into its own install folder (see browser_session.py's DATA_DIR). ; ; calibration.pkl, baseline_pose.pkl, and sessions/ are deliberately NOT ; listed under [Files] below. Inno Setup only ever touches files it tracked ; as having installed — so upgrades overwrite app files without touching ; those, and a normal uninstall leaves them behind too (the [Code] section ; below tells the user this explicitly on uninstall, rather than silently). #define MyAppName "InsightUX" #define MyAppVersion "1.0.0" #define MyAppPublisher "InsightUX" #define MyAppExeName "InsightUX.exe" #define MyBuildDir "..\dist\InsightUX" [Setup] AppId={{6DE35CE2-05CB-4375-BFFE-D63E9181F1B9} AppName={#MyAppName} AppVersion={#MyAppVersion} AppPublisher={#MyAppPublisher} DefaultDirName={localappdata}\InsightUX DefaultGroupName=InsightUX DisableProgramGroupPage=yes PrivilegesRequired=lowest ArchitecturesInstallIn64BitMode=x64compatible OutputDir=dist_installer OutputBaseFilename=InsightUX-Setup-{#MyAppVersion} Compression=lzma2 SolidCompression=yes WizardStyle=modern ; A ~1.5-2.5GB installer (torch is bundled deliberately, see README) needs ; the larger internal chunk size or ISCC can fail to build at all. DiskSpanning=no [Tasks] Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:" [Files] Source: "{#MyBuildDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; Microsoft's WebView2 bootstrapper is NOT part of this repo (an external ; download — see packaging/README.md for the official link). If you've ; placed it next to this .iss before compiling, it gets bundled and ; silently run below as a safety net for machines missing the runtime. ; Harmless to (re-)run even if WebView2 is already installed. #ifexist "MicrosoftEdgeWebview2Setup.exe" Source: "MicrosoftEdgeWebview2Setup.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall #endif [Icons] Name: "{group}\InsightUX"; Filename: "{app}\{#MyAppExeName}"; WorkingDir: "{app}" Name: "{group}\Uninstall InsightUX"; Filename: "{uninstallexe}" Name: "{commondesktop}\InsightUX"; Filename: "{app}\{#MyAppExeName}"; WorkingDir: "{app}"; Tasks: desktopicon [Run] #ifexist "MicrosoftEdgeWebview2Setup.exe" Filename: "{tmp}\MicrosoftEdgeWebview2Setup.exe"; Parameters: "/silent /install"; StatusMsg: "Checking Microsoft Edge WebView2 Runtime..."; Flags: waituntilterminated #endif Filename: "{app}\{#MyAppExeName}"; Description: "Launch InsightUX"; Flags: nowait postinstall skipifsilent [Code] procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin if CurUninstallStep = usPostUninstall then begin if FileExists(ExpandConstant('{app}\calibration.pkl')) or DirExists(ExpandConstant('{app}\sessions')) then MsgBox('Your calibration profile and saved sessions were kept in:' + #13#10 + ExpandConstant('{app}') + #13#10 + 'Delete that folder yourself if you want a completely clean removal.', mbInformation, MB_OK); end; end;