refs #2254 Notarize app in dmg build

This commit is contained in:
AkiraFukushima 2021-03-19 17:51:08 +09:00
parent 226f4e1df8
commit 30ad8150a9
3 changed files with 32 additions and 1 deletions

17
build/notarize.js Normal file
View File

@ -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: 'org.whalebird.desktop',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_PASSWORD
})
}

View File

@ -56,7 +56,9 @@
"dist/electron/**/*",
"build/icons/*"
],
"afterSign": "build/notarize.js",
"dmg": {
"sign": false,
"contents": [
{
"x": 410,
@ -81,7 +83,11 @@
]
}
],
"category": "public.app-category.social-networking"
"category": "public.app-category.social-networking",
"entitlements": "plist/entitlements.mac.plist",
"entitlementsInherit": "plist/entitlements.mac.plist",
"hardenedRuntime" : true,
"gatekeeperAssess": false
},
"win": {
"icon": "build/icons/icon.ico",

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>