|
|
@ -1,6 +1,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
const { notarize } = require('@electron/notarize'); |
|
|
|
const { notarize } = require('@electron/notarize'); |
|
|
|
const fs = require('fs'); |
|
|
|
const fs = require('fs'); |
|
|
|
|
|
|
|
const { exec } = require('child_process'); // Import the exec function
|
|
|
|
exports.default = async function notarizing(context) { |
|
|
|
exports.default = async function notarizing(context) { |
|
|
|
const { electronPlatformName, appOutDir } = context; // Provided by electron-builder
|
|
|
|
const { electronPlatformName, appOutDir } = context; // Provided by electron-builder
|
|
|
|
|
|
|
|
|
|
|
@ -25,6 +26,7 @@ exports.default = async function notarizing(context) { |
|
|
|
teamId: process.env.APPLE_TEAM_ID, // Your Apple Developer team ID (optional)
|
|
|
|
teamId: process.env.APPLE_TEAM_ID, // Your Apple Developer team ID (optional)
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
const r = await notarize({ |
|
|
|
const r = await notarize({ |
|
|
|
appBundleId: 'org.ethereum.remix-ide', // Your app's bundle ID
|
|
|
|
appBundleId: 'org.ethereum.remix-ide', // Your app's bundle ID
|
|
|
|
appPath: `${appOutDir}/${appName}.app`, // Path to your .app
|
|
|
|
appPath: `${appOutDir}/${appName}.app`, // Path to your .app
|
|
|
@ -34,4 +36,19 @@ exports.default = async function notarizing(context) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
console.log(r); |
|
|
|
console.log(r); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Stapling the app
|
|
|
|
|
|
|
|
console.log('STAPLING'); |
|
|
|
|
|
|
|
const appPath = `${appOutDir}/${appName}.app`; |
|
|
|
|
|
|
|
exec(`xcrun stapler staple "${appPath}"`, (error, stdout, stderr) => { |
|
|
|
|
|
|
|
if (error) { |
|
|
|
|
|
|
|
console.error(`exec error: ${error}`); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(`Stapling output: ${stdout}`); |
|
|
|
|
|
|
|
console.error(`Stapling errors: ${stderr}`); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
console.error('Error during notarization:', error); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |