; ========================================== ; Inno Setup Script for Parts Lookup Program ; ========================================== ; ; Requirements: ; 1. Download and install Inno Setup: https://jrsoftware.org/isdl.php ; 2. Run your "build.bat" script first to compile the app into "dist\PartsLookup" ; 3. Right-click this file ("installer.iss") and select "Compile", or open it in Inno Setup and press Ctrl+F9. ; ; This installer is designed to compile into a single "CSGPackerShipperHelper_Setup.exe" in your project directory. #define MyAppName "CSG Packer Shipper Helper" #define MyAppVersion "1.0.0" #define MyAppPublisher "CollisionStoneGuard" #define MyAppExeName "CSGPackerShipperHelper.exe" #define MyAppAssocName "CSG Packer Shipper Helper Configuration File" #define MyAppAssocExt ".json" #define MyAppAssocKey StringChange(MyAppName, " ", "") + MyAppAssocExt [Setup] ; Unique App ID (generated for this specific application) AppId={{C7EBDD14-06B9-45BA-B0B5-1A9084EE845B} AppName={#MyAppName} AppVersion={#MyAppVersion} AppPublisher={#MyAppPublisher} ; Default installation directory: "C:\Users\\AppData\Local\Programs\CollisionStoneGuard\CSGPackerShipperHelper" ; This path allows users to install the program without needing administrator rights (safer and cleaner). DefaultDirName={localappdata}\{#MyAppPublisher}\{#MyAppName} DisableDirPage=no DefaultGroupName={#MyAppName} DisableProgramGroupPage=yes ; Application icon used in Add/Remove programs and installer wizard SetupIconFile=app\assets\icon.ico ; Output settings OutputDir=. OutputBaseFilename=CSGPackerShipperHelper_Setup Compression=lzma SolidCompression=yes WizardStyle=modern ; Allow modern user installation override dialog (choose all users vs current user) PrivilegesRequired=lowest PrivilegesRequiredOverridesAllowed=dialog [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] ; Source directory is your compiled PyInstaller "dist\CSGPackerShipperHelper" folder. ; Exclude config.json from standard overwrite to preserve user configurations during upgrades. Source: "dist\CSGPackerShipperHelper\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "config.json,_internal\config.json" ; Install the config.json ONLY if it does not already exist inside the _internal folder. ; This ensures that when the user updates the software, their custom paths, database settings, and themes are NOT wiped out. Source: "dist\CSGPackerShipperHelper\_internal\config.json"; DestDir: "{app}\_internal"; Flags: onlyifdoesntexist [Icons] Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\_internal\assets\icon.ico" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{app}\_internal\assets\icon.ico" [Run] Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent; Filename: "{app}\{#MyAppExeName}" [UninstallDelete] ; Clean up runtime files and compiled bytecode on uninstall Type: filesandordirs; Name: "{app}\__pycache__" Type: filesandordirs; Name: "{app}\app\__pycache__" ; NOTE: We intentionally do NOT delete the SQLite parts.db database or cached images in %LOCALAPPDATA% ; during uninstall to ensure user data isn't accidentally lost. If they reinstall, their data will still be there.