From ff56cd96019b274e090ce6c673be966929b531b4 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 1 May 2026 00:23:24 +0300 Subject: [PATCH] Add installer/installer.iss (Inno Setup 6 minimal) Produces drover-vX.Y.Z-setup.exe via `iscc /DMyAppVersion=X.Y.Z installer/installer.iss`. - Stable AppId UUID for upgrade compatibility - Bundles drover.exe, WinDivert.dll/sys, LICENSE, README, WinDivert-LGPL - English + Russian wizard languages - Optional desktop icon and Windows autostart tasks - HKCU registry entry for updater install-path discovery - Best-effort service stop/uninstall on uninstall - ARM64 refusal in [Code] InitializeSetup (WinDivert has no ARM64 build) - Requires admin (kernel driver install), x64-compatible only, Win10 1809+ Co-Authored-By: Claude Opus 4.7 (1M context) --- installer/installer.iss | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 installer/installer.iss diff --git a/installer/installer.iss b/installer/installer.iss new file mode 100644 index 0000000..00e999e --- /dev/null +++ b/installer/installer.iss @@ -0,0 +1,75 @@ +; Drover-Go Inno Setup 6 installer script. +; Compile from repo root: iscc /DMyAppVersion=0.1.0 installer/installer.iss + +#ifndef MyAppVersion + #define MyAppVersion "0.0.0-dev" +#endif + +[Setup] +AppId={{B5F4D8A7-3C2E-4F18-9B6A-8E7C5D1F0A23} +AppName=Drover-Go +AppVersion={#MyAppVersion} +AppVerName=Drover-Go {#MyAppVersion} +AppPublisher=okcu.io +AppPublisherURL=https://git.okcu.io/root/drover-go +AppSupportURL=https://git.okcu.io/root/drover-go/issues +AppUpdatesURL=https://git.okcu.io/root/drover-go/releases +DefaultDirName={autopf}\Drover-Go +DefaultGroupName=Drover-Go +OutputDir=Output +OutputBaseFilename=drover-{#MyAppVersion}-setup +Compression=lzma2 +SolidCompression=yes +WizardStyle=modern +PrivilegesRequired=admin +ArchitecturesAllowed=x64compatible +ArchitecturesInstallIn64BitMode=x64compatible +LicenseFile=..\LICENSE +MinVersion=10.0.17763 +UninstallDisplayName=Drover-Go {#MyAppVersion} +UninstallDisplayIcon={app}\drover.exe +CloseApplications=yes +RestartIfNeededByRun=no + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "autostart"; Description: "Start Drover-Go automatically with Windows"; GroupDescription: "Startup:"; Flags: unchecked + +[Files] +Source: "..\drover.exe"; DestDir: "{app}"; DestName: "drover.exe"; Flags: ignoreversion +Source: "..\LICENSE"; DestDir: "{app}"; DestName: "LICENSE.txt"; Flags: ignoreversion +Source: "..\README.md"; DestDir: "{app}"; DestName: "README.md"; Flags: ignoreversion +Source: "..\third_party\windivert\WinDivert.dll"; DestDir: "{app}"; DestName: "WinDivert.dll"; Flags: ignoreversion +Source: "..\third_party\windivert\WinDivert64.sys"; DestDir: "{app}"; DestName: "WinDivert64.sys"; Flags: ignoreversion +Source: "..\third_party\windivert\LICENSE-LGPL"; DestDir: "{app}"; DestName: "WinDivert-LICENSE.txt"; Flags: ignoreversion + +[Icons] +Name: "{group}\Drover-Go"; Filename: "{app}\drover.exe" +Name: "{group}\{cm:UninstallProgram,Drover-Go}"; Filename: "{uninstallexe}" +Name: "{commondesktop}\Drover-Go"; Filename: "{app}\drover.exe"; Tasks: desktopicon +Name: "{userstartup}\Drover-Go"; Filename: "{app}\drover.exe"; Parameters: "service start"; Tasks: autostart + +[Registry] +Root: HKCU; Subkey: "Software\Drover-Go"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"; Flags: uninsdeletevalue + +[Run] +Filename: "{app}\drover.exe"; Description: "{cm:LaunchProgram,Drover-Go}"; Flags: postinstall skipifsilent nowait + +[UninstallRun] +Filename: "{app}\drover.exe"; Parameters: "service stop"; Flags: runhidden skipifdoesntexist; RunOnceId: "StopService" +Filename: "{app}\drover.exe"; Parameters: "service uninstall"; Flags: runhidden skipifdoesntexist; RunOnceId: "UninstallService" + +[Code] +function InitializeSetup(): Boolean; +begin + Result := True; + if ProcessorArchitecture = paArm64 then + begin + MsgBox('Drover-Go requires a native x64 Windows installation. ARM64 is not supported because WinDivert (the underlying packet capture driver) does not have an ARM64 build.', mbCriticalError, MB_OK); + Result := False; + end; +end;