Update the notarization process for installing mcopy

This commit is contained in:
Matt McWilliams 2022-04-30 18:51:33 -04:00
parent 8b5faaa1a4
commit 22bed4632b
4 changed files with 128 additions and 29 deletions

134
app/package-lock.json generated
View File

@ -53,7 +53,7 @@
"electron": "^11.3.0",
"electron-installer-common": "^0.10.3",
"electron-installer-dmg": "^3.0.0",
"electron-packager": "^15.2.0",
"electron-packager": "^15.4.0",
"electron-rebuild": "^2.3.5",
"electron-wix-msi": "^3.0.6",
"gulp": "^4.0.2",
@ -1397,9 +1397,9 @@
"optional": true
},
"node_modules/asar": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.0.3.tgz",
"integrity": "sha512-k7zd+KoR+n8pl71PvgElcoKHrVNiSXtw7odKbyNpmgKe7EGRF9Pnu3uLOukD37EvavKwVFxOUpqXTIZC5B5Pmw==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.1.0.tgz",
"integrity": "sha512-vyxPxP5arcAqN4F/ebHd/HhwnAiZtwhglvdmc7BR2f0ywbVNTOpSeyhLDbGXtE/y58hv1oC75TaNIXutnsOZsQ==",
"devOptional": true,
"dependencies": {
"chromium-pickle-js": "^0.2.0",
@ -2489,6 +2489,45 @@
"node": ">= 8"
}
},
"node_modules/cross-spawn-windows-exe": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/cross-spawn-windows-exe/-/cross-spawn-windows-exe-1.2.0.tgz",
"integrity": "sha512-mkLtJJcYbDCxEG7Js6eUnUNndWjyUZwJ3H7bErmmtOYU/Zb99DyUkpamuIZE0b3bhmJyZ7D90uS6f+CGxRRjOw==",
"dev": true,
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/malept"
},
{
"type": "tidelift",
"url": "https://tidelift.com/subscription/pkg/npm-cross-spawn-windows-exe?utm_medium=referral&utm_source=npm_fund"
}
],
"dependencies": {
"@malept/cross-spawn-promise": "^1.1.0",
"is-wsl": "^2.2.0",
"which": "^2.0.2"
},
"engines": {
"node": ">= 10"
}
},
"node_modules/cross-spawn-windows-exe/node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/cross-spawn/node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
@ -3031,9 +3070,9 @@
}
},
"node_modules/electron-notarize": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.0.0.tgz",
"integrity": "sha512-dsib1IAquMn0onCrNMJ6gtEIZn/azG8hZMCYOuZIMVMUeRMgBYHK1s5TK9P8xAcrAjh/2aN5WYHzgVSWX314og==",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.2.1.tgz",
"integrity": "sha512-u/ECWhIrhkSQpZM4cJzVZ5TsmkaqrRo5LDC/KMbGF0sPkm53Ng59+M0zp8QVaql0obfJy9vlVT+4iOkAi2UDlA==",
"dev": true,
"dependencies": {
"debug": "^4.1.1",
@ -3080,15 +3119,16 @@
"dev": true
},
"node_modules/electron-packager": {
"version": "15.2.0",
"resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-15.2.0.tgz",
"integrity": "sha512-BaklTBRQy1JTijR3hi8XxHf/uo76rHbDCNM/eQHSblzE9C0NoNfOe86nPxB7y1u2jwlqoEJ4zFiHpTFioKGGRA==",
"version": "15.4.0",
"resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-15.4.0.tgz",
"integrity": "sha512-JrrLcBP15KGrPj0cZ/ALKGmaQ4gJkn3mocf0E3bRKdR3kxKWYcDRpCvdhksYDXw/r3I6tMEcZ7XzyApWFXdVpw==",
"dev": true,
"dependencies": {
"@electron/get": "^1.6.0",
"asar": "^3.0.0",
"asar": "^3.1.0",
"cross-spawn-windows-exe": "^1.2.0",
"debug": "^4.0.1",
"electron-notarize": "^1.0.0",
"electron-notarize": "^1.1.1",
"electron-osx-sign": "^0.5.0",
"extract-zip": "^2.0.0",
"filenamify": "^4.1.0",
@ -3098,7 +3138,7 @@
"junk": "^3.1.0",
"parse-author": "^2.0.0",
"plist": "^3.0.0",
"rcedit": "^2.0.0",
"rcedit": "^3.0.1",
"resolve": "^1.1.6",
"semver": "^7.1.3",
"yargs-parser": "^20.0.0"
@ -3145,6 +3185,18 @@
"node": ">=8"
}
},
"node_modules/electron-packager/node_modules/rcedit": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/rcedit/-/rcedit-3.0.1.tgz",
"integrity": "sha512-XM0Jv40/y4hVAqj/MO70o/IWs4uOsaSoo2mLyk3klFDW+SStLnCtzuQu+1OBTIMGlM8CvaK9ftlYCp6DJ+cMsw==",
"dev": true,
"dependencies": {
"cross-spawn-windows-exe": "^1.1.0"
},
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/electron-packager/node_modules/semver": {
"version": "7.3.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
@ -12549,9 +12601,9 @@
"optional": true
},
"asar": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.0.3.tgz",
"integrity": "sha512-k7zd+KoR+n8pl71PvgElcoKHrVNiSXtw7odKbyNpmgKe7EGRF9Pnu3uLOukD37EvavKwVFxOUpqXTIZC5B5Pmw==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.1.0.tgz",
"integrity": "sha512-vyxPxP5arcAqN4F/ebHd/HhwnAiZtwhglvdmc7BR2f0ywbVNTOpSeyhLDbGXtE/y58hv1oC75TaNIXutnsOZsQ==",
"devOptional": true,
"requires": {
"@types/glob": "^7.1.1",
@ -13482,6 +13534,28 @@
}
}
},
"cross-spawn-windows-exe": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/cross-spawn-windows-exe/-/cross-spawn-windows-exe-1.2.0.tgz",
"integrity": "sha512-mkLtJJcYbDCxEG7Js6eUnUNndWjyUZwJ3H7bErmmtOYU/Zb99DyUkpamuIZE0b3bhmJyZ7D90uS6f+CGxRRjOw==",
"dev": true,
"requires": {
"@malept/cross-spawn-promise": "^1.1.0",
"is-wsl": "^2.2.0",
"which": "^2.0.2"
},
"dependencies": {
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
@ -13876,9 +13950,9 @@
}
},
"electron-notarize": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.0.0.tgz",
"integrity": "sha512-dsib1IAquMn0onCrNMJ6gtEIZn/azG8hZMCYOuZIMVMUeRMgBYHK1s5TK9P8xAcrAjh/2aN5WYHzgVSWX314og==",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.2.1.tgz",
"integrity": "sha512-u/ECWhIrhkSQpZM4cJzVZ5TsmkaqrRo5LDC/KMbGF0sPkm53Ng59+M0zp8QVaql0obfJy9vlVT+4iOkAi2UDlA==",
"dev": true,
"requires": {
"debug": "^4.1.1",
@ -13917,15 +13991,16 @@
}
},
"electron-packager": {
"version": "15.2.0",
"resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-15.2.0.tgz",
"integrity": "sha512-BaklTBRQy1JTijR3hi8XxHf/uo76rHbDCNM/eQHSblzE9C0NoNfOe86nPxB7y1u2jwlqoEJ4zFiHpTFioKGGRA==",
"version": "15.4.0",
"resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-15.4.0.tgz",
"integrity": "sha512-JrrLcBP15KGrPj0cZ/ALKGmaQ4gJkn3mocf0E3bRKdR3kxKWYcDRpCvdhksYDXw/r3I6tMEcZ7XzyApWFXdVpw==",
"dev": true,
"requires": {
"@electron/get": "^1.6.0",
"asar": "^3.0.0",
"asar": "^3.1.0",
"cross-spawn-windows-exe": "^1.2.0",
"debug": "^4.0.1",
"electron-notarize": "^1.0.0",
"electron-notarize": "^1.1.1",
"electron-osx-sign": "^0.5.0",
"extract-zip": "^2.0.0",
"filenamify": "^4.1.0",
@ -13935,7 +14010,7 @@
"junk": "^3.1.0",
"parse-author": "^2.0.0",
"plist": "^3.0.0",
"rcedit": "^2.0.0",
"rcedit": "^3.0.1",
"resolve": "^1.1.6",
"semver": "^7.1.3",
"yargs-parser": "^20.0.0"
@ -13962,6 +14037,15 @@
"pump": "^3.0.0"
}
},
"rcedit": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/rcedit/-/rcedit-3.0.1.tgz",
"integrity": "sha512-XM0Jv40/y4hVAqj/MO70o/IWs4uOsaSoo2mLyk3klFDW+SStLnCtzuQu+1OBTIMGlM8CvaK9ftlYCp6DJ+cMsw==",
"dev": true,
"requires": {
"cross-spawn-windows-exe": "^1.1.0"
}
},
"semver": {
"version": "7.3.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",

View File

@ -40,7 +40,7 @@
"electron": "^11.3.0",
"electron-installer-common": "^0.10.3",
"electron-installer-dmg": "^3.0.0",
"electron-packager": "^15.2.0",
"electron-packager": "^15.4.0",
"electron-rebuild": "^2.3.5",
"electron-wix-msi": "^3.0.6",
"gulp": "^4.0.2",
@ -75,8 +75,8 @@
"moment": "^2.29.1",
"mscript": "file:lib/mscript",
"node-notifier": "^9.0.0",
"proj": "file:lib/proj",
"processing": "file:lib/processing",
"proj": "file:lib/proj",
"request": "^2.88.2",
"sequencer": "file:lib/sequencer",
"serialport": "^9.0.7",

View File

@ -14,11 +14,14 @@
// security find-identity to find exact string
const appleIdentity = (readFileSync('.appleIdentity', 'utf8') ).trim();
const pkg = require('../package.json');
const config = {
dir : '.',
platform : 'darwin',
arch : 'x64',
prune : true,
appBundleId : pkg.build.appId,
icon : './assets/icons/icon.icns',
overwrite : true,
out : '../dist',

View File

@ -2,12 +2,24 @@
version=$(jq -r '.version' ./package.json)
mkdir -p ../dist
if [ -f "./.appleIdentity" ]; then
echo "Building, signing and notarizing application..."
node ./scripts/build_and_sign_mac.js
else
echo "Building application..."
./node_modules/.bin/electron-packager . --overwrite --platform=darwin --ignore=^../dist --arch=x64 --prune=true --out=../dist/installers
fi
sleep 5s
mkdir -p ../dist/installers
echo "Building dmg installer..."
./node_modules/.bin/electron-installer-dmg ../dist/mcopy-app-darwin-x64/mcopy-app.app mcopy-app --out=../dist/installers --icon=assets/icons/icon.icns --overwrite
mv "../dist/installers/mcopy-app.dmg" "../dist/installers/mcopy-app_${version}.dmg"
echo "Built installer of version ${version}"