Merge pull request #2257 from h3poteto/iss-2254

refs #2254 Notarize app in dmg build
This commit is contained in:
AkiraFukushima 2021-03-19 17:54:19 +09:00 committed by GitHub
commit fc7da74a3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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>