Skip to content

Commit

Permalink
Fix macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
ecnepsnai committed Aug 12, 2024
1 parent f15ead2 commit 594c53b
Show file tree
Hide file tree
Showing 5 changed files with 1,363 additions and 644 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
dist/
package/
package/
.DS_Store
11 changes: 9 additions & 2 deletions src/desktop/build.darwin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const packager = require('./build.package.js');
const createDMG = require('electron-installer-dmg');
const { createDMG } = require('electron-installer-dmg');

async function build(arch) {
await packager.app('darwin', arch);
Expand All @@ -9,7 +9,14 @@ async function build(arch) {
title: 'Certbox',
icon: 'src/icons/certbox.icns',
format: 'ULFO',
out: 'package/artifacts'
out: 'package/artifacts',
background: 'src/icons/dmg_bg.png',
contents: (opts) => {
return [
{ x: 469, y: 239, type: 'link', path: '/Applications'},
{ x: 185, y: 239, type: 'file', path: opts.appPath}
];
}
});
await packager.exec('mv', ['package/artifacts/Certbox.dmg', 'package/artifacts/certbox_macOS_' + arch + '.dmg']);
}
Expand Down
Loading

0 comments on commit 594c53b

Please sign in to comment.