Changeset View
Changeset View
Standalone View
Standalone View
desktop/forge.config.cjs
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | async startLogic() { | ||||
// object. Electron Forge (package which handles bundling, packaging and | // object. Electron Forge (package which handles bundling, packaging and | ||||
// running dev mode) will then watch it instead of spawing electron by | // running dev mode) will then watch it instead of spawing electron by | ||||
// itself. But we are fine with the default behaviour (Electron Forge | // itself. But we are fine with the default behaviour (Electron Forge | ||||
// spawning electron) so we return false. | // spawning electron) so we return false. | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
const optionsForFile = filePath => { | |||||
const entitlements = | |||||
process.env?.ENV === 'dev' | |||||
? 'entitlements-dev.plist' | |||||
: 'entitlements.plist'; | |||||
const basename = path.basename(filePath); | |||||
if (basename === 'Comm' || basename === 'Comm.app') { | |||||
return { entitlements }; | |||||
} | |||||
return {}; | |||||
}; | |||||
const signingOptions = { | const signingOptions = { | ||||
packagerMacos: {}, | packagerMacos: {}, | ||||
makerMacos: {}, | makerMacos: {}, | ||||
makerWindows: {}, | makerWindows: {}, | ||||
}; | }; | ||||
if (process.env?.ENV !== 'dev') { | if (process.env?.ENV === 'dev') { | ||||
if (fs.existsSync('macOS_App_Development_Profile.provisionprofile')) { | |||||
signingOptions.packagerMacos = { | signingOptions.packagerMacos = { | ||||
osxSign: { identity: 'Developer ID Application' }, | osxSign: { | ||||
identity: 'Development', | |||||
preEmbedProvisioningProfile: true, | |||||
provisioningProfile: 'macOS_App_Development_Profile.provisionprofile', | |||||
optionsForFile, | |||||
}, | |||||
}; | |||||
} | |||||
} else { | |||||
signingOptions.packagerMacos = { | |||||
osxSign: { | |||||
identity: 'Developer ID Application', | |||||
preEmbedProvisioningProfile: true, | |||||
provisioningProfile: 'macOS_App_Provisioning_Profile.provisionprofile', | |||||
optionsForFile, | |||||
}, | |||||
osxNotarize: { | osxNotarize: { | ||||
tool: 'notarytool', | tool: 'notarytool', | ||||
appleId: process.env?.APPLE_USER_NAME, | appleId: process.env?.APPLE_USER_NAME, | ||||
appleIdPassword: process.env?.APPLE_APP_SPECIFIC_PASSWORD, | appleIdPassword: process.env?.APPLE_APP_SPECIFIC_PASSWORD, | ||||
teamId: process.env?.TEAM_ID, | teamId: process.env?.TEAM_ID, | ||||
}, | }, | ||||
}; | }; | ||||
signingOptions.makerMacos = { | signingOptions.makerMacos = { | ||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |