feat: begin macOS support

This commit is contained in:
LukeGus
2025-10-11 01:21:43 -05:00
parent 2e5cba73a4
commit 83f59c8692
8 changed files with 294 additions and 26 deletions

31
build/notarize.js Normal file
View File

@@ -0,0 +1,31 @@
const { notarize } = require('@electron/notarize');
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}
const appName = context.packager.appInfo.productFilename;
const appPath = `${appOutDir}/${appName}.app`;
const appleId = process.env.APPLE_ID;
const appleIdPassword = process.env.APPLE_APP_SPECIFIC_PASSWORD;
const teamId = process.env.APPLE_TEAM_ID;
if (!appleId || !appleIdPassword || !teamId) {
return;
}
try {
await notarize({
appPath: appPath,
appleId: appleId,
appleIdPassword: appleIdPassword,
teamId: teamId,
});
} catch (error) {
throw error;
}
};