54 lines
No EOL
1.4 KiB
JavaScript
54 lines
No EOL
1.4 KiB
JavaScript
const sign = require("electron-osx-sign").signAsync;
|
|
const notarize = require("electron-notarize").notarize;
|
|
|
|
const path = __dirname + "/Electron.app/Contents/Resources/app/node_modules";
|
|
|
|
const addons = [
|
|
`${path}/@crimata/nodeaudio/build/Release/libportaudio.dylib`,
|
|
`${path}/@crimata/nodeaudio/build/Release/nodeAudio.node`
|
|
];
|
|
|
|
const signConfig = {
|
|
"app": "Electron.app",
|
|
"platform": "darwin",
|
|
"binaries": addons,
|
|
"hardened-runtime": true,
|
|
"entitlements": "entitlements.plist",
|
|
"entitlements-inherit": "entitlements.plist",
|
|
"signature-flags": "library",
|
|
"gatekeeper-assess": false
|
|
};
|
|
|
|
const notarizeConfig = {
|
|
appBundleId: "com.github.Electron",
|
|
appPath: "Electron.app",
|
|
appleId: "gundersena@crimata.com",
|
|
appleIdPassword: "wdeb-cbcq-rujb-ldgo"
|
|
};
|
|
|
|
(async function () {
|
|
|
|
try
|
|
{
|
|
await sign(signConfig);
|
|
console.log("Notarizing...");
|
|
await notarize(notarizeConfig);
|
|
}
|
|
catch (e)
|
|
{
|
|
console.log(e);
|
|
}
|
|
|
|
})();
|
|
|
|
/* Clear debris from .app before running or it will complain:
|
|
* xattr -cr Electron.app
|
|
*
|
|
* Paste this in terminal to debug electron-osx-sign:
|
|
* export DEBUG=electron-osx-sign*
|
|
*
|
|
* Some important things to note:
|
|
* - In order to notarize, you need a valid Apple Developer ID Application * Certificate.
|
|
* - All flags in current signing config are required for notarization (to
|
|
* my knowledge).
|
|
*/ |