diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | build/entitlements.mac.plist | 20 | ||||
| -rw-r--r-- | config.xml | 2 | ||||
| -rw-r--r-- | electron_js/notarize.js | 18 | ||||
| -rw-r--r-- | package.json | 25 |
5 files changed, 58 insertions, 8 deletions
@@ -21,5 +21,6 @@ package-lock.json dist/ .gradle/ **/docgen/ +.env diff --git a/build/entitlements.mac.plist b/build/entitlements.mac.plist new file mode 100644 index 00000000..8a7e0f5a --- /dev/null +++ b/build/entitlements.mac.plist @@ -0,0 +1,20 @@ +<?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/> + <key>com.apple.security.files.downloads.read-write</key> + <true/> + <key>com.apple.security.files.user-selected.read-write</key> + <true/> + <key>com.apple.security.network.client</key> + <true/> + <key>com.apple.security.network.server</key> + <true/> + </dict> +</plist> @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninja_pro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.3.089" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninja_pro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.3.090" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>zmNinja</name> <description> High performance ZoneMinder client diff --git a/electron_js/notarize.js b/electron_js/notarize.js new file mode 100644 index 00000000..b173095a --- /dev/null +++ b/electron_js/notarize.js @@ -0,0 +1,18 @@ +require('dotenv').config(); +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: 'com.pliablepixels.zmninja-pro', + appPath: `${appOutDir}/${appName}.app`, + appleId: process.env.APPLEID, + appleIdPassword: process.env.APPLEIDPASS, + }); +}; diff --git a/package.json b/package.json index 0e105823..e328d149 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zmninjapro", "description": "Home security mobile app for ZoneMinder", - "version": "1.3.089", + "version":"1.3.089", "displayName": "zmNinja", "author": "Pliable Pixels", "license": "custom see LICENSE.md", @@ -66,7 +66,6 @@ } }, "dependencies": { - "app-builder-lib": "^22.1.0", "clivas": "^0.2.0", "cordova-android": "8.0.0", "cordova-custom-config": "^5.1.0", @@ -104,6 +103,7 @@ "deep-equal": "^1.0.1", "define-properties": "^1.1.3", "dialog": "^0.3.1", + "electron-osx-sign": "^0.4.15", "electron-window-state": "^4.1.1", "es-abstract": "^1.17.0", "es6-promise-plugin": "^4.2.2", @@ -127,9 +127,11 @@ "devDependencies": { "@ionic/v1-toolkit": "^1.0.14", "bower": "^1.8.4", + "dotenv": "^8.2.0", "electron": "^3.1.3", - "electron-builder": "^21.2.0", + "electron-builder": "^22.4.0", "electron-cli": "^0.2.8", + "electron-notarize": "^0.2.1", "gulp": "^3.9.1", "gulp-concat": "^2.6.1", "gulp-minify-css": "^1.2.4", @@ -147,10 +149,11 @@ "main": "electron_js/main.js", "build": { "artifactName": "${productName}-${version}-${os}-${arch}.${ext}", - "appId": "com.pliablepixels.zmninjapro", - "productName": "zmninjapro", + "appId": "com.pliablepixels.zmninja-pro", + "productName": "zmninja-pro", "compression": "normal", "asar": true, + "afterSign":"electron_js/notarize.js", "directories": { "buildResources": "electron_js/icons" }, @@ -181,10 +184,18 @@ "node_modules/object-keys/**/*", "node_modules/regexp.prototype.flags/**/*" ], + "dmg": { + "sign": false + }, "mac": { "category": "productivity", "target": "dmg", - "icon": "icon.png" + "icon": "icon.png", + "identity": "Pliable Pixels, LLC (EN3PJ8YF59)", + "entitlements": "build/entitlements.mac.plist", + "entitlementsInherit": "build/entitlements.mac.plist", + "hardenedRuntime": true, + "gatekeeperAssess": false }, "win": { "icon": "icon.ico", @@ -215,4 +226,4 @@ ] } } -}
\ No newline at end of file +} |
