electron osx build improvements: add notarize support, move build assets to build, add osx security entitlements
This commit is contained in:
@@ -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-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
|
||||
const password = `@keychain:WR Notarize`;
|
||||
|
||||
return await notarize({
|
||||
appBundleId: 'net.webrecorder.replayweb.page',
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: 'ikreymer@gmail.com',
|
||||
appleIdPassword: password,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
+10
-6
@@ -20,6 +20,7 @@
|
||||
"css-loader": "^3.5.3",
|
||||
"electron": "^9.0.0",
|
||||
"electron-builder": "^22.6.1",
|
||||
"electron-notarize": "^0.3.0",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"node-sass": "^4.14.0",
|
||||
"raw-loader": "^4.0.1",
|
||||
@@ -41,9 +42,10 @@
|
||||
"build-electron": "yarn run build && yarn run pack"
|
||||
},
|
||||
"build": {
|
||||
"afterSign": "notarize.js",
|
||||
"productName": "ReplayWeb.page",
|
||||
"asar": true,
|
||||
"appId": "org.webrecorder.page.replayweb",
|
||||
"appId": "net.webrecorder.replaywebpage",
|
||||
"artifactName": "${name}-${version}.${ext}",
|
||||
"files": [
|
||||
"!**/node_modules/**/*",
|
||||
@@ -55,12 +57,14 @@
|
||||
"extraResources": [
|
||||
"plugins"
|
||||
],
|
||||
"dmg": {
|
||||
"icon": "assets/icon.icns"
|
||||
},
|
||||
"dmg": {},
|
||||
"mac": {
|
||||
"category": "public.app-category.utilities",
|
||||
"target": "dmg"
|
||||
"target": "dmg",
|
||||
"hardenedRuntime": true,
|
||||
"gatekeeperAssess": false,
|
||||
"entitlements": "build/entitlements.mac.plist",
|
||||
"entitlementsInherit": "build/entitlements.mac.plist"
|
||||
},
|
||||
"linux": {
|
||||
"category": "Archiving;Utility;",
|
||||
@@ -72,7 +76,7 @@
|
||||
"target": "portable"
|
||||
},
|
||||
"directories": {
|
||||
"buildResources": "assets",
|
||||
"buildResources": "build",
|
||||
"output": "dist"
|
||||
},
|
||||
"fileAssociations": [
|
||||
|
||||
@@ -260,7 +260,9 @@ function createWindow () {
|
||||
});
|
||||
|
||||
mainWindow.loadURL(STATIC_PREFIX + "index.html");
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
mainWindow.webContents.openDevTools();
|
||||
}
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
|
||||
@@ -1660,6 +1660,14 @@ electron-builder@^22.6.1:
|
||||
update-notifier "^4.1.0"
|
||||
yargs "^15.3.1"
|
||||
|
||||
electron-notarize@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-0.3.0.tgz#b93c606306eac558b250c78ff95273ddb9fedf0a"
|
||||
integrity sha512-tuDw8H0gcDOalNLv6RM2CwGvUXU60MPGZRDEmd0ppX+yP5XqL8Ec2DuXyz9J7WQSA3aRCfzIgH8C5CAivDYWMw==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
fs-extra "^8.1.0"
|
||||
|
||||
electron-publish@22.6.1:
|
||||
version "22.6.1"
|
||||
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-22.6.1.tgz#d5381220d3e0f3bfa869c5a059fd253a561e0f8a"
|
||||
|
||||
Reference in New Issue
Block a user