mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-07 04:08:45 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7d1b33a53 |
@@ -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
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user