mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-24 05:28:46 +02:00
refactor: replace NSIS with Inno Setup for Windows installer
Switch from NSIS (early 2000s) to Inno Setup 6 — the modern standard used by VS Code and most Electron apps. Features: - Modern wizard UI (WizardStyle=modern) - LZMA2/ultra64 solid compression (138.9 MB, down from 143 MB with NSIS) - Per-user install to %LOCALAPPDATA%\Programs\Aryx (no admin needed) - Optional desktop shortcut, Start Menu group - Auto-closes running instance before install/uninstall - Proper Add/Remove Programs integration via AppId - Launch-after-install option CI updated to install Inno Setup via Chocolatey on windows-latest. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+15
-11
@@ -62,13 +62,13 @@ async function readVersion(): Promise<string> {
|
||||
return packageJson.version;
|
||||
}
|
||||
|
||||
// --- Windows: NSIS installer ---
|
||||
// --- Windows: Inno Setup installer ---
|
||||
|
||||
async function resolveNsisPath(): Promise<string> {
|
||||
async function resolveInnoSetupCompilerPath(): Promise<string> {
|
||||
const candidates = [
|
||||
'C:\\Program Files (x86)\\NSIS\\makensis.exe',
|
||||
'C:\\Program Files\\NSIS\\makensis.exe',
|
||||
'makensis',
|
||||
'C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe',
|
||||
'C:\\Program Files\\Inno Setup 6\\ISCC.exe',
|
||||
'iscc',
|
||||
];
|
||||
|
||||
for (const candidate of candidates) {
|
||||
@@ -77,21 +77,25 @@ async function resolveNsisPath(): Promise<string> {
|
||||
}
|
||||
}
|
||||
|
||||
return 'makensis';
|
||||
return 'iscc';
|
||||
}
|
||||
|
||||
async function createWindowsInstaller(version: string): Promise<void> {
|
||||
const nsisScript = join(installerAssetsDirectory, 'windows.nsi');
|
||||
const makensisPath = await resolveNsisPath();
|
||||
const issScript = join(installerAssetsDirectory, 'windows.iss');
|
||||
const isccPath = await resolveInnoSetupCompilerPath();
|
||||
const outputFilename = releaseTarget.installerAssetName.replace(/\.exe$/, '');
|
||||
const iconPath = join(repositoryRoot, 'assets', 'icons', 'windows', 'icon.ico');
|
||||
|
||||
await runCommand(
|
||||
makensisPath,
|
||||
isccPath,
|
||||
[
|
||||
`/DPRODUCT_NAME=${productName}`,
|
||||
`/DPRODUCT_VERSION=${version}`,
|
||||
`/DSOURCE_DIR=${packagedAppDirectory}`,
|
||||
`/DOUTPUT_PATH=${installerOutputPath}`,
|
||||
nsisScript,
|
||||
`/DOUTPUT_DIR=${releaseRootDirectory}`,
|
||||
`/DOUTPUT_FILENAME=${outputFilename}`,
|
||||
`/DICON_PATH=${iconPath}`,
|
||||
issScript,
|
||||
],
|
||||
repositoryRoot,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user