726a5b922b
The window now starts Luminary.ps1 through a hidden PowerShell process instead of relying on the VBS entry point, and the installer defaults to Luminary.cmd. Bump the beta to 0.5.1.
91 lines
3.5 KiB
Plaintext
91 lines
3.5 KiB
Plaintext
; Optional per-user installer for the Luminary Windows bundle.
|
|
;
|
|
; Build the bundle first: node windows/build.mjs
|
|
; Then, from the output directory:
|
|
; iscc /DAppVersion=0.5.1 /DSourceDir="<abs path to stage\Luminary>" \
|
|
; <repo>\windows\installer.iss
|
|
;
|
|
; The default SourceDir is relative to this script and only works when iscc is
|
|
; run with the bundle's stage folder in reach. Inno Setup 6 is required:
|
|
; https://jrsoftware.org/isinfo.php
|
|
;
|
|
; Per-user install: no UAC, no Program Files, data stays in
|
|
; %LOCALAPPDATA%\Luminary\data and is kept on uninstall.
|
|
|
|
#ifndef AppVersion
|
|
#define AppVersion "0.5.1"
|
|
#endif
|
|
#ifndef Launcher
|
|
; Luminary.cmd works even when Windows Script Host is disabled; Luminary.exe
|
|
; for the Go launcher build.
|
|
#define Launcher "Luminary.cmd"
|
|
#endif
|
|
#ifndef SourceDir
|
|
#define SourceDir "stage\Luminary"
|
|
#endif
|
|
|
|
#define AppName "Luminary"
|
|
#define AppPublisher "Maple Street"
|
|
#define AppURL "https://git.maple-street.net/bhursey/luminary"
|
|
|
|
[Setup]
|
|
AppId={{6E1B4C1E-8D6B-4F2E-9E3B-2C7A5D9F4A11}
|
|
AppName={#AppName}
|
|
AppVersion={#AppVersion}
|
|
AppPublisher={#AppPublisher}
|
|
AppPublisherURL={#AppURL}
|
|
DefaultDirName={localappdata}\Programs\{#AppName}
|
|
DefaultGroupName={#AppName}
|
|
DisableProgramGroupPage=yes
|
|
PrivilegesRequired=lowest
|
|
ArchitecturesAllowed=x64compatible
|
|
ArchitecturesInstallIn64BitMode=x64compatible
|
|
OutputDir=installer-output
|
|
OutputBaseFilename=Luminary-{#AppVersion}-win-x64-setup
|
|
Compression=lzma2/max
|
|
SolidCompression=yes
|
|
WizardStyle=modern
|
|
UninstallDisplayName={#AppName}
|
|
SetupIconFile={#SourceDir}\Luminary.ico
|
|
; The uninstaller must not delete the catalog in %LOCALAPPDATA%\Luminary\data;
|
|
; the data folder lives outside {app} on purpose.
|
|
|
|
[Tasks]
|
|
Name: "desktopicon"; Description: "Create a desktop shortcut"; GroupDescription: "Shortcuts:"; Flags: checkedonce
|
|
Name: "startup"; Description: "Start Luminary when I sign in"; GroupDescription: "Startup:"; Flags: unchecked
|
|
|
|
[Files]
|
|
; recurses into app\, node_modules\, logs placeholders and the launcher files.
|
|
Source: "{#SourceDir}\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs ignoreversion
|
|
|
|
[Icons]
|
|
Name: "{group}\{#AppName}"; Filename: "{app}\{#Launcher}"; WorkingDir: "{app}"; IconFilename: "{app}\Luminary.ico"
|
|
Name: "{group}\Stop {#AppName}"; Filename: "{app}\Stop Luminary.cmd"; WorkingDir: "{app}"; IconFilename: "{app}\Luminary.ico"
|
|
Name: "{group}\{#AppName} data folder"; Filename: "%LOCALAPPDATA%\Luminary\data"
|
|
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#Launcher}"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: "{app}\Luminary.ico"
|
|
|
|
[Registry]
|
|
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; \
|
|
ValueName: "Luminary"; ValueData: """{app}\{#Launcher}"""; Flags: uninsdeletevalue; Tasks: startup
|
|
|
|
[Run]
|
|
Filename: "{app}\{#Launcher}"; Description: "Start Luminary now"; Flags: nowait postinstall skipifsilent
|
|
|
|
[UninstallDelete]
|
|
; Remove the program folder and its logs/runtime file. Never the data folder.
|
|
Type: filesandordirs; Name: "{app}"
|
|
|
|
[Code]
|
|
procedure CurStepChanged(CurStep: TSetupStep);
|
|
begin
|
|
if CurStep = ssPostInstall then
|
|
begin
|
|
// The data folder is created by the launcher on first start; tell the user
|
|
// where it is so the "uninstall keeps my catalog" promise is obvious.
|
|
MsgBox('Luminary stores its catalog in:' + #13#10 +
|
|
ExpandConstant('{localappdata}') + '\Luminary\data' + #13#10#13#10 +
|
|
'It is not removed when you uninstall. Back it up by copying that folder '
|
|
+ 'while Luminary is stopped.', mbInformation, MB_OK);
|
|
end;
|
|
end;
|