igneum/packaging/windows/Igneum-Miner.iss
2026-10-07 09:35:42 +00:00

146 lines
7.3 KiB
Text

; Igneum Miner installer for Windows, Inno Setup 6.3 or newer. Compiled by build-installer.ps1, which passes
; /DPayload=<assembled payload folder> and /DArtDir=<brand\icons>. The defaults below are for a run from the repo.
; 0.3.0 (4 October 2026): the app (igneum-app.exe engine, "Igneum Miner.exe" window host when BUILD-APP.bat made it,
; igneumd.exe, igneum-miner.exe, the prebuilt GPU workers when present, the worker sources for the fallback build).
#ifndef Payload
#define Payload "igneum-windows-app"
#endif
#ifndef ArtDir
#define ArtDir "..\..\brand\icons"
#endif
#ifndef AppVersion
#define AppVersion "0.3.20"
#endif
#define AppName "Igneum Miner"
#define Publisher "Igneum"
#define Url "https://igneum.network"
[Setup]
AppId={{A4C1F0E2-6B8D-4E7A-9F31-2C5D8E7B9A01}
AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}
AppPublisher={#Publisher}
AppPublisherURL={#Url}
AppSupportURL={#Url}
AppUpdatesURL={#Url}
AppCopyright=Igneum. Nothing is bought or sold.
VersionInfoVersion={#AppVersion}.0
VersionInfoCompany={#Publisher}
VersionInfoProductName={#AppName}
VersionInfoDescription={#AppName} Setup
DefaultDirName={localappdata}\Programs\{#AppName}
DefaultGroupName={#AppName}
DisableProgramGroupPage=yes
LicenseFile=LICENSE.txt
OutputDir=dist
OutputBaseFilename=Igneum-Miner-Setup-{#AppVersion}
SetupIconFile={#ArtDir}\igneum.ico
UninstallDisplayIcon={app}\igneum.ico
UninstallDisplayName={#AppName}
WizardStyle=modern
WizardImageFile={#ArtDir}\inno-wizard-164x314.bmp
WizardSmallImageFile={#ArtDir}\inno-wizard-small-55x58.bmp
Compression=lzma2/max
SolidCompression=yes
ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
; Per user since 0.3.3 (4 October 2026): no administrator prompt, so the app's own updater can install unattended
; (two PCs sat stopped at a UAC prompt for an hour). The firewall rule moved to the app's first run (src/ota.rs).
PrivilegesRequired=lowest
MinVersion=10.0
CloseApplications=yes
RestartApplications=no
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Messages]
english.WelcomeLabel2=This will install [name/ver] on your computer.%n%nOne window runs your node and the GPU miner, and shows your hash rate, your blocks and the chain. Nothing is bought or sold on this network.
english.FinishedHeadingLabel=Igneum Miner is installed
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
;; No [Dirs] entry: {app} stays read-only for users (R4.3.3). The engine writes under %LOCALAPPDATA%\igneum, and
;; the fallback worker build copies the sources there first.
[Files]
Source: "{#Payload}\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs ignoreversion; Excludes: "*.log,*.seeds,*.DS_Store,packs\*,build\*,dist\*"
Source: "{#ArtDir}\igneum.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#Payload}\stop-igneum.ps1"; Flags: dontcopy
Source: "wrappers\Stop Igneum Miner.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
; igneum-app.exe --launch hands over to "Igneum Miner.exe" (the window) when it is installed, else opens the dashboard in the browser.
Name: "{group}\Igneum Miner"; Filename: "{app}\igneum-app.exe"; Parameters: "--launch"; WorkingDir: "{app}"; IconFilename: "{app}\igneum.ico"; Comment: "Start the node and mine"
Name: "{group}\Stop Igneum Miner"; Filename: "{app}\Stop Igneum Miner.cmd"; WorkingDir: "{app}"; IconFilename: "{app}\igneum.ico"; Comment: "Stop the miner and the node"
Name: "{group}\Igneum Miner logs"; Filename: "{localappdata}\igneum\logs"; IconFilename: "{app}\igneum.ico"; Comment: "The folder the log files land in"
Name: "{group}\Uninstall Igneum Miner"; Filename: "{uninstallexe}"; IconFilename: "{app}\igneum.ico"
Name: "{autodesktop}\Igneum Miner"; Filename: "{app}\igneum-app.exe"; Parameters: "--launch"; WorkingDir: "{app}"; IconFilename: "{app}\igneum.ico"; Tasks: desktopicon
[Run]
; The inbound firewall rule needs an administrator and is asked for once by the app on its first run (declined = the node dials out and mines without it).
; Started as the signed-in user, not as administrator (the data lands in that user's %LOCALAPPDATA%).
Filename: "{app}\igneum-app.exe"; Parameters: "--launch"; Description: "Start Igneum Miner now"; Flags: postinstall nowait skipifsilent runasoriginaluser
; The over-the-air updater (packaging/ota, src/ota.rs) runs this installer /VERYSILENT /IGNOTA=1 and the app must come back by itself.
Filename: "{app}\igneum-app.exe"; Parameters: "--launch"; Flags: nowait runasoriginaluser; Check: OtaRelaunch
[UninstallRun]
Filename: "powershell.exe"; Parameters: "-NoProfile -ExecutionPolicy Bypass -File ""{app}\stop-igneum.ps1"""; Flags: runhidden waituntilterminated; RunOnceId: "StopIgneum"
[UninstallDelete]
; The GPU workers built on this PC and the WebView2 cache are not in the install log; remove them with the folder.
Type: filesandordirs; Name: "{app}"
[Code]
// /IGNOTA=1: the app's own updater started this install; relaunch the app when the files are in.
function OtaRelaunch: Boolean;
begin
Result := ExpandConstant('{param:IGNOTA|0}') = '1';
end;
// The 0.3.2-and-earlier install in Program Files (administrator), when this per-user install lands on top of it.
function OldAdminInstallDir: String;
begin
Result := ExpandConstant('{commonpf}\Igneum Miner');
if not FileExists(Result + '\igneum-app.exe') then
Result := '';
end;
// Stops a running copy before the files are replaced (an upgrade over a running miner): the old copy's own
// stop-igneum.ps1 when one is installed (Program Files or here), else ours from the payload. Then, when someone is at
// the keyboard, offers to remove the Program Files copy (its uninstaller needs one administrator prompt; the data in
// %LOCALAPPDATA%\igneum is the same for both, nothing to copy). A silent (over-the-air) install never asks.
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
StopScript, OldDir: String;
ResultCode: Integer;
begin
Result := '';
OldDir := OldAdminInstallDir;
StopScript := ExpandConstant('{app}\stop-igneum.ps1');
if (not FileExists(StopScript)) and (OldDir <> '') then
StopScript := OldDir + '\stop-igneum.ps1';
if not FileExists(StopScript) then
StopScript := ExpandConstant('{tmp}\stop-igneum.ps1');
if not FileExists(StopScript) then
ExtractTemporaryFile('stop-igneum.ps1');
if FileExists(StopScript) then
Exec('powershell.exe', '-NoProfile -ExecutionPolicy Bypass -File "' + StopScript + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
if (OldDir <> '') and (not WizardSilent) and FileExists(OldDir + '\unins000.exe') then
begin
if MsgBox('Igneum Miner now installs in your user folder, so updates need no administrator prompt.' + #13#10#13#10 +
'An older copy is still in ' + OldDir + '. Remove it now? (one administrator prompt; your chain data, address and settings stay)',
mbConfirmation, MB_YESNO) = IDYES then
ShellExec('runas', OldDir + '\unins000.exe', '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpFinished then
WizardForm.FinishedLabel.Caption := WizardForm.FinishedLabel.Caption + #13#10#13#10 +
'Nobody from Igneum will ever ask for your seed.';
end;