native plist config for code signing and notarization

This commit is contained in:
Martin McKeaveney 2020-05-16 18:19:36 +01:00
parent af4a1635c4
commit 03593259e8
6 changed files with 41 additions and 6 deletions

3
.gitignore vendored
View File

@ -76,3 +76,6 @@ typings/
# Serverless directories # Serverless directories
.serverless .serverless
# Mac files
.DS_Store

BIN
packages/.DS_Store vendored

Binary file not shown.

View File

@ -8,5 +8,7 @@
<true/> <true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key> <key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/> <true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@ -13,7 +13,7 @@
"afterSign": "electron-builder-notarize", "afterSign": "electron-builder-notarize",
"mac": { "mac": {
"category": "public.app-category.developer-tools", "category": "public.app-category.developer-tools",
"hardenedRuntime": true "hardenedRuntime": true
}, },
"linux": { "linux": {
"target": [ "target": [
@ -48,6 +48,7 @@
"bcryptjs": "^2.4.3", "bcryptjs": "^2.4.3",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"electron-is-dev": "^1.2.0", "electron-is-dev": "^1.2.0",
"electron-unhandled": "^3.0.2",
"electron-updater": "^4.3.1", "electron-updater": "^4.3.1",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",

View File

@ -3,22 +3,26 @@ const { join } = require("path");
const { homedir } = require("os"); const { homedir } = require("os");
const isDev = require("electron-is-dev"); const isDev = require("electron-is-dev");
const { autoUpdater } = require("electron-updater"); const { autoUpdater } = require("electron-updater");
const unhandled = require("electron-unhandled");
require("dotenv").config({ path: join(homedir(), ".budibase", ".env") }); require("dotenv").config({ path: join(homedir(), ".budibase", ".env") });
if (isDev) {
unhandled({
showDialog: true
});
}
const APP_URL = "http://localhost:4001/_builder"; const APP_URL = "http://localhost:4001";
const APP_TITLE = "Budibase Builder"; const APP_TITLE = "Budibase Builder";
let win; let win
function createWindow() { function createWindow() {
app.server = require("./app"); app.server = require("./app");
win = new BrowserWindow({ width: 1920, height: 1080 }); win = new BrowserWindow({ width: 1920, height: 1080 });
win.setTitle(APP_TITLE); win.setTitle(APP_TITLE);
win.loadURL(APP_URL); win.loadURL(APP_URL);
win.showInactive();
if (isDev) { if (isDev) {
win.webContents.openDevTools(); win.webContents.openDevTools();
} else { } else {

View File

@ -1280,6 +1280,11 @@ class-utils@^0.3.5:
isobject "^3.0.0" isobject "^3.0.0"
static-extend "^0.1.1" static-extend "^0.1.1"
clean-stack@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
cli-boxes@^2.2.0: cli-boxes@^2.2.0:
version "2.2.0" version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d"
@ -1842,7 +1847,7 @@ electron-builder@^22.6.0:
update-notifier "^4.1.0" update-notifier "^4.1.0"
yargs "^15.3.1" yargs "^15.3.1"
electron-is-dev@^1.2.0: electron-is-dev@^1.0.1, electron-is-dev@^1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-1.2.0.tgz#2e5cea0a1b3ccf1c86f577cee77363ef55deb05e" resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-1.2.0.tgz#2e5cea0a1b3ccf1c86f577cee77363ef55deb05e"
integrity sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw== integrity sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw==
@ -1869,6 +1874,16 @@ electron-publish@22.6.0:
lazy-val "^1.0.4" lazy-val "^1.0.4"
mime "^2.4.4" mime "^2.4.4"
electron-unhandled@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/electron-unhandled/-/electron-unhandled-3.0.2.tgz#e14a19c830ccf7b6e755191c8e78d23094d25112"
integrity sha512-IIqXnM5eNgV7k5sDA/GZ39ygJbpfF3WTArNGQ1TB4AI6ajQuuVztA0M6Mq9uEpmTh5gz4nR+YsTNWYsHLoM5rw==
dependencies:
clean-stack "^2.1.0"
electron-is-dev "^1.0.1"
ensure-error "^2.0.0"
lodash.debounce "^4.0.8"
electron-updater@^4.3.1: electron-updater@^4.3.1:
version "4.3.1" version "4.3.1"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.3.1.tgz#9d485b6262bc56fcf7ee62b1dc1b3b105a3e96a7" resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.3.1.tgz#9d485b6262bc56fcf7ee62b1dc1b3b105a3e96a7"
@ -1930,6 +1945,11 @@ end-stream@~0.1.0:
dependencies: dependencies:
write-stream "~0.4.3" write-stream "~0.4.3"
ensure-error@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ensure-error/-/ensure-error-2.1.0.tgz#f11fbe383c0cf4a54850ac77acceb7bc06e0f99d"
integrity sha512-+BMSJHw9gxiJAAp2ZR1E0TNcL09dD3lOvkl7WVm4+Y6xnes/pMetP/TzCHiDduh8ihNDjbGfuYxl7l4PA1xZ8A==
env-paths@^2.2.0: env-paths@^2.2.0:
version "2.2.0" version "2.2.0"
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43"
@ -4167,6 +4187,11 @@ locate-path@^5.0.0:
dependencies: dependencies:
p-locate "^4.1.0" p-locate "^4.1.0"
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
lodash.includes@^4.3.0: lodash.includes@^4.3.0:
version "4.3.0" version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f"