-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAC x64 dmg is no longer generated #190
Try to package x64 mac MAC x64 dmg is no longer generated #190 MAC x64 dmg is no longer generated #190 MAC x64 dmg is no longer generated #190 MAC x64 dmg is no longer generated #190 Update notarization tool #191 Double click doesn't work in macOS #183 Use notarytool Add appleApiKeyId for notarize Add appleApiKeyId for notarize Add appleApiKeyId for notarize Add appleApiKeyId for notarize Update notarization tool #191 Update notarization tool #191 Double click doesn't work in macOS #183 Update notarization tool #191
- Loading branch information
1 parent
eac0cc2
commit 82021b8
Showing
6 changed files
with
67 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,43 @@ | ||
// See: https://medium.com/@TwitterArchiveEraser/notarize-electron-apps-7a5f988406db | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
var electron_notarize = require('electron-notarize'); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const electron_notarize = require("electron-notarize"); | ||
|
||
module.exports = async function (params) { | ||
console.log("----------------------------------", params); | ||
var platform = params.packager.platform.name; | ||
// Only notarize the app on Mac OS only. | ||
if (platform === 'linux' || platform === 'windows') { | ||
return; | ||
} | ||
console.log('afterSign hook triggered', params); | ||
console.log("----------------------------------", params); | ||
const platform = params.packager.platform.name; | ||
// Only notarize the app on Mac OS only. | ||
if (platform === "linux" || platform === "windows") { | ||
return; | ||
} | ||
console.log("afterSign hook triggered", params); | ||
|
||
// Same appId in electron-builder. | ||
let appId = 'com.khiops.visualization'; | ||
// Same appId in electron-builder. | ||
let appId = "com.khiops.visualization"; | ||
|
||
let appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`); | ||
if (!fs.existsSync(appPath)) { | ||
throw new Error(`Cannot find application at: ${appPath}`); | ||
} | ||
let appPath = path.join( | ||
params.appOutDir, | ||
`${params.packager.appInfo.productFilename}.app` | ||
); | ||
if (!fs.existsSync(appPath)) { | ||
throw new Error(`Cannot find application at: ${appPath}`); | ||
} | ||
|
||
console.log(`Notarizing ${appId} found at ${appPath}`); | ||
console.log(`Notarizing ${appId} found at ${appPath}`); | ||
|
||
try { | ||
await electron_notarize.notarize({ | ||
appBundleId: appId, | ||
appPath: appPath, | ||
appleApiKey: process.env.API_KEY_ID, | ||
appleApiIssuer: process.env.API_KEY_ISSUER_ID | ||
}); | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
try { | ||
await electron_notarize.notarize({ | ||
tool: "notarytool", | ||
appBundleId: appId, | ||
appPath: appPath, | ||
appleApiKeyId: process.env.API_KEY_ID, | ||
appleApiKey: "~/private_keys/AuthKey_" + process.env.API_KEY_ID + ".p8", | ||
appleApiIssuer: process.env.API_KEY_ISSUER_ID, | ||
}); | ||
} catch (error) { | ||
console.error("ERROR during Notarization", error); | ||
} | ||
|
||
console.log(`Done notarizing ${appId}`); | ||
console.log(`Done notarizing ${appId}`); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1405,6 +1405,15 @@ | |
fs-extra "^9.0.1" | ||
promise-retry "^2.0.1" | ||
|
||
"@electron/[email protected]": | ||
version "2.3.2" | ||
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.3.2.tgz#20a52a961747be8542a35003380988a0d3fe15e6" | ||
integrity sha512-zfayxCe19euNwRycCty1C7lF7snk9YwfRpB5M8GLr1a4ICH63znxaPNAubrMvj0yDvVozqfgsdYpXVUnpWBDpg== | ||
dependencies: | ||
debug "^4.1.1" | ||
fs-extra "^9.0.1" | ||
promise-retry "^2.0.1" | ||
|
||
"@electron/[email protected]": | ||
version "1.0.5" | ||
resolved "https://registry.yarnpkg.com/@electron/osx-sign/-/osx-sign-1.0.5.tgz#0af7149f2fce44d1a8215660fd25a9fb610454d8" | ||
|