2021-04-13 18:17:12 +00:00
|
|
|
/** ./node_modules/.bin/electron-packager .
|
|
|
|
--overwrite
|
|
|
|
--platform=darwin
|
|
|
|
--arch=x64
|
|
|
|
--icon=assets/icons/icon.icns
|
|
|
|
--prune=true
|
|
|
|
--out=../dist **/
|
|
|
|
|
|
|
|
const packager = require('electron-packager');
|
|
|
|
const { readFileSync } = require('fs');
|
|
|
|
|
|
|
|
const appleId = (readFileSync('.appleId', 'utf8') ).trim();
|
|
|
|
const appleIdPassword = (readFileSync('.applePwd', 'utf8') ).trim();
|
|
|
|
// security find-identity to find exact string
|
|
|
|
const appleIdentity = (readFileSync('.appleIdentity', 'utf8') ).trim();
|
|
|
|
|
2022-04-30 22:51:33 +00:00
|
|
|
const pkg = require('../package.json');
|
|
|
|
|
2021-04-13 18:17:12 +00:00
|
|
|
const config = {
|
|
|
|
dir : '.',
|
|
|
|
platform : 'darwin',
|
|
|
|
arch : 'x64',
|
|
|
|
prune : true,
|
2022-04-30 22:51:33 +00:00
|
|
|
appBundleId : pkg.build.appId,
|
2021-04-13 18:17:12 +00:00
|
|
|
icon : './assets/icons/icon.icns',
|
|
|
|
overwrite : true,
|
|
|
|
out : '../dist',
|
|
|
|
osxSign : {
|
|
|
|
identity : appleIdentity,
|
|
|
|
'hardened-runtime' : true,
|
|
|
|
entitlements : './entitlements.plist',
|
|
|
|
'entitlements-inherit': './entitlements.plist',
|
|
|
|
'signature-flags' : 'library'
|
|
|
|
},
|
|
|
|
osxNotarize : {
|
|
|
|
appleId,
|
|
|
|
appleIdPassword
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
packager(config);
|