new build method with Apple notarize, electron-build programatic API
This commit is contained in:
8
app/build/entitlements.mac.plist
Normal file
8
app/build/entitlements.mac.plist
Normal 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>
|
23
app/build/notarize.js
Normal file
23
app/build/notarize.js
Normal file
@@ -0,0 +1,23 @@
|
||||
require('dotenv').config()
|
||||
const { notarize } = require('electron-notarize')
|
||||
|
||||
// Notarizeをしない場合、下のuseNotarizeをtrueからfalseに変更してください。
|
||||
const useNotarize = true
|
||||
|
||||
|
||||
exports.default = async function notarizing(context) {
|
||||
const { electronPlatformName, appOutDir } = context
|
||||
if (electronPlatformName !== 'darwin' || !useNotarize) return
|
||||
const appName = context.packager.appInfo.productFilename
|
||||
console.log(`start notarize: ${appOutDir}/${appName}.app`)
|
||||
try {
|
||||
return await notarize({
|
||||
appBundleId: 'top.thedesk',
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: process.env.APPLEID,
|
||||
appleIdPassword: process.env.APPLEIDPASS,
|
||||
})
|
||||
} catch (e) {
|
||||
throw console.log(e)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user