Skip to content

Commit

Permalink
add: mac notarize
Browse files Browse the repository at this point in the history
  • Loading branch information
darakuneko committed Mar 29, 2024
1 parent cf6cb07 commit 85659d9
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.env
/.idea
node_modules
/dist
Expand Down
12 changes: 12 additions & 0 deletions entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?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-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>
16 changes: 16 additions & 0 deletions notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { notarize } = require("@electron/notarize")
require('dotenv').config()

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context
if (electronPlatformName !== 'darwin') return
const appName = context.packager.appInfo.productFilename

return await notarize({
appBundleId: "app.darakuneko.gpk_fwbuilder",
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
teamId: process.env.TEAM_ID,
})
}
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"email": "tvkids@gmail.com"
},
"devDependencies": {
"@electron/rebuild": "3.6.0",
"electron": "29.0.0",
"electron-builder": "24.12.0",
"webpack-cli": "5.1.4"
Expand All @@ -27,6 +26,7 @@
"@babel/core": "7.23.9",
"@babel/preset-env": "7.23.9",
"@babel/preset-react": "7.23.3",
"@electron/notarize": "^2.3.0",
"@emotion/babel-preset-css-prop": "11.11.0",
"@emotion/react": "11.11.3",
"@emotion/styled": "11.11.0",
Expand All @@ -35,6 +35,7 @@
"ansi-to-html": "0.7.2",
"axios": "1.6.7",
"babel-loader": "9.1.3",
"dotenv": "^16.4.5",
"electron-store": "8.1.0",
"form-data": "4.0.0",
"html-react-parser": "5.1.7",
Expand All @@ -46,6 +47,7 @@
"build": {
"productName": "GPK FWBuilder",
"appId": "app.darakuneko.gpk_fwbuilder",
"afterSign": "notarize.js",
"npmRebuild": false,
"files": [
"public/**/*",
Expand All @@ -64,7 +66,12 @@
},
"mac": {
"target": "dmg",
"icon": "icons/512x512.png"
"icon": "icons/512x512.png",
"hardenedRuntime": true,
"gatekeeperAssess": false,
"category": "public.app-category.productivity",
"entitlements": "entitlements.mac.plist",
"entitlementsInherit": "entitlements.mac.plist"
},
"linux": {
"target": [
Expand Down

0 comments on commit 85659d9

Please sign in to comment.