File tree Expand file tree Collapse file tree 4 files changed +262
-195
lines changed
Expand file tree Collapse file tree 4 files changed +262
-195
lines changed Original file line number Diff line number Diff line change 1414 <true />
1515 <key >com.apple.security.print </key >
1616 <true />
17- <key >NSRequiresAquaSystemAppearance </key >
18- <false />
17+ <key >com.apple.security.cs.allow-jit </key >
18+ <true />
19+ <key >com.apple.security.cs.allow-unsigned-executable-memory </key >
20+ <true />
21+ <key >com.apple.security.cs.allow-dyld-environment-variables </key >
22+ <true />
1923 </dict >
2024</plist >
Original file line number Diff line number Diff line change 1+ require ( 'dotenv' ) . config ( ) ;
2+ const fs = require ( 'fs' ) ;
3+ const path = require ( 'path' ) ;
4+ var electron_notarize = require ( 'electron-notarize' ) ;
5+ const { build } = require ( './package.json' ) ;
6+
7+ module . exports = async function ( params ) {
8+ // Only notarize the app on Mac OS only.
9+ if ( process . platform !== 'darwin' ) return ;
10+ console . log ( 'afterSign hook triggered' , params ) ;
11+
12+ // Same appId in electron-builder.
13+ let appId = build . appId
14+
15+ let appPath = path . join ( params . appOutDir , `${ params . packager . appInfo . productFilename } .app` ) ;
16+ if ( ! fs . existsSync ( appPath ) ) {
17+ throw new Error ( `Cannot find application at: ${ appPath } ` ) ;
18+ }
19+
20+ console . log ( `Notarizing ${ appId } found at ${ appPath } ` ) ;
21+ const password = `@keychain:AC_PASSWORD` ;
22+ try {
23+ await electron_notarize . notarize ( {
24+ appBundleId : appId ,
25+ appPath : appPath ,
26+ appleId : process . env . APPLEID ,
27+ appleIdPassword : password ,
28+ } ) ;
29+ } catch ( error ) {
30+ console . error ( error ) ;
31+ }
32+
33+ console . log ( `Done notarizing ${ appId } ` ) ;
34+ } ;
Original file line number Diff line number Diff line change 1616 "url" : " https://github.com/Criptext/Criptext-Email-React-Client.git"
1717 },
1818 "scripts" : {
19+ "build" : " electron-builder" ,
1920 "electron" : " electron ." ,
2021 "start" : " npm run electron ." ,
2122 "start:dev" : " npm run electron . --allow-file-access-from-file" ,
22- "postinstall" : " install-app-deps" ,
23+ "postinstall" : " electron-builder install-app-deps" ,
2324 "test" : " criptext-js-tools test" ,
2425 "integration" : " NODE_ENV=test criptext-js-tools integration" ,
2526 "lint" : " criptext-js-tools lint" ,
3132 "nucleusId" : " 0.0.0" ,
3233 "build" : {
3334 "appId" : " com.criptext.criptextmail" ,
35+ "afterSign" : " notarize.js" ,
3436 "buildVersion" : " 1" ,
3537 "mac" : {
38+ "hardenedRuntime" : true ,
39+ "gatekeeperAssess" : false ,
3640 "target" : [
3741 " mas" ,
3842 " dmg" ,
132136 "devDependencies" : {
133137 "criptext-js-tools" : " 0.5.0" ,
134138 "electron" : " 3.1.10" ,
135- "electron-builder" : " ^20.37.0"
139+ "electron-builder" : " 21.2.0" ,
140+ "electron-notarize" : " ^0.1.1"
136141 },
137142 "dependencies" : {
138143 "@criptext/api" : " ^0.15.22" ,
You can’t perform that action at this time.
0 commit comments