fix: Improve macOS support
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,49 +0,0 @@
|
||||
const { notarize } = require('@electron/notarize');
|
||||
|
||||
exports.default = async function notarizing(context) {
|
||||
const { electronPlatformName, appOutDir, packager } = context;
|
||||
|
||||
// Skip notarization for non-macOS platforms
|
||||
if (electronPlatformName !== 'darwin') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Skip notarization for Mac App Store builds (MAS)
|
||||
// MAS builds are notarized by Apple during App Store review
|
||||
const target = packager.platformSpecificBuildOptions.target || [];
|
||||
const isMasBuild = Array.isArray(target)
|
||||
? target.some(t => t.target === 'mas' || t === 'mas')
|
||||
: target === 'mas';
|
||||
|
||||
if (isMasBuild || appOutDir.includes('mas')) {
|
||||
console.log('Skipping notarization for Mac App Store build');
|
||||
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;
|
||||
|
||||
// Skip if credentials not provided (for unsigned builds)
|
||||
if (!appleId || !appleIdPassword || !teamId) {
|
||||
console.log('Skipping notarization: credentials not provided');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Starting notarization process...');
|
||||
try {
|
||||
await notarize({
|
||||
appPath: appPath,
|
||||
appleId: appleId,
|
||||
appleIdPassword: appleIdPassword,
|
||||
teamId: teamId,
|
||||
});
|
||||
console.log('Notarization completed successfully');
|
||||
} catch (error) {
|
||||
console.error('Notarization failed:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user