diff --git a/package.json b/package.json index 71a6575..e791924 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,13 @@ "repo": "ove-electron", "owner": "tnrich" }, + "afterSign": "src/misc/notarize.js", + "mac": { + "hardenedRuntime": true, + "gatekeeperAssess": false, + "/entitlements": "src/misc/entitlements.mac.plist", + "/entitlementsInherit": "src/misc/entitlements.mac.plist" + }, "appId": "com.teselagen.openVectorEditor", "fileAssociations": [ { diff --git a/src/misc/entitlements.mac.plist b/src/misc/entitlements.mac.plist new file mode 100644 index 0000000..bb87459 --- /dev/null +++ b/src/misc/entitlements.mac.plist @@ -0,0 +1,8 @@ + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + + \ No newline at end of file diff --git a/src/misc/notarize.js b/src/misc/notarize.js new file mode 100644 index 0000000..fb53c27 --- /dev/null +++ b/src/misc/notarize.js @@ -0,0 +1,17 @@ +const { notarize } = require('electron-notarize'); + +exports.default = async function notarizing(context) { + const { electronPlatformName, appOutDir } = context; + if (electronPlatformName !== 'darwin') { + return; + } + + const appName = context.packager.appInfo.productFilename; + + return await notarize({ + appBundleId: 'com.teselagen.yourAppId', + appPath: `${appOutDir}/${appName}.app`, + appleId: process.env.APPLEID, + appleIdPassword: process.env.APPLEIDPASS, + }); +}; \ No newline at end of file