Compare commits

..
1 Commits
Author SHA1 Message Date
David KayaandCopilot d7d1b33a53 fix: fix CI installer creation for all platforms
- Windows: add NSIS installation step via Chocolatey in CI workflow
- macOS: fix create-dmg CLI invocation to match sindresorhus package
  API (--overwrite, --no-version-in-filename, --no-code-sign) and
  rename output to expected asset name
- Add rename import to create-installer.ts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 13:35:20 +01:00
2 changed files with 24 additions and 22 deletions
+5
View File
@@ -131,6 +131,11 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install -y libsecret-1-dev sudo apt-get install -y libsecret-1-dev
- name: Install NSIS
if: runner.os == 'Windows'
shell: pwsh
run: choco install nsis -y --no-progress
- name: Install dependencies - name: Install dependencies
run: bun install --frozen-lockfile run: bun install --frozen-lockfile
+19 -22
View File
@@ -5,6 +5,7 @@ import {
cp, cp,
mkdir, mkdir,
readFile, readFile,
rename,
symlink, symlink,
writeFile, writeFile,
} from 'node:fs/promises'; } from 'node:fs/promises';
@@ -107,29 +108,25 @@ async function createMacInstaller(): Promise<void> {
const appBundlePath = join(packagedAppDirectory, appBundleName); const appBundlePath = join(packagedAppDirectory, appBundleName);
const createDmg = join(repositoryRoot, 'node_modules', '.bin', 'create-dmg'); const createDmg = join(repositoryRoot, 'node_modules', '.bin', 'create-dmg');
try { // create-dmg outputs to the destination directory with a generated filename.
await runCommand( // We use --no-version-in-filename so the output is "<AppName>.dmg", then
createDmg, // rename it to the expected installer asset name.
[ await runCommand(
'--overwrite', createDmg,
'--window-size', '600', '400', [
'--icon-size', '100', '--overwrite',
'--icon', appBundleName, '150', '200', '--no-version-in-filename',
'--app-drop-link', '450', '200', '--no-code-sign',
installerOutputPath, appBundlePath,
appBundlePath, releaseRootDirectory,
], ],
repositoryRoot, repositoryRoot,
); );
} catch {
// create-dmg exits with code 2 when code signing fails (expected without
// a Developer ID certificate) but still produces a valid DMG. Check
// whether the output file was created before treating this as an error.
if (!(await pathExists(installerOutputPath))) {
throw new Error('Failed to create DMG — output file was not produced.');
}
console.log('DMG created (code signing skipped — ad-hoc only).'); // Rename from the generated name ("Aryx.dmg") to the platform-specific asset name
const generatedDmgPath = join(releaseRootDirectory, `${productName}.dmg`);
if (generatedDmgPath !== installerOutputPath) {
await rename(generatedDmgPath, installerOutputPath);
} }
} }