Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow building MAS and dmg targets with different appId #7603

Merged
merged 3 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions packages/app-builder-lib/src/electron/electronMac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ export async function createMacApp(packager: MacPackager, appOutDir: string, asa
if (oldHelperBundleId != null) {
log.warn("build.helper-bundle-id is deprecated, please set as build.mac.helperBundleId")
}
const helperBundleIdentifier = filterCFBundleIdentifier(packager.platformSpecificBuildOptions.helperBundleId || oldHelperBundleId || `${appInfo.macBundleIdentifier}.helper`)

const cfBundleIdentifier = filterCFBundleIdentifier((isMas ? packager.config.mas?.appId : packager.platformSpecificBuildOptions.appId) || appInfo.macBundleIdentifier)
mmaietta marked this conversation as resolved.
Show resolved Hide resolved

const helperBundleIdentifier = filterCFBundleIdentifier(
(isMas ? packager.config.mas?.helperBundleId : packager.platformSpecificBuildOptions.helperBundleId) || oldHelperBundleId || `${cfBundleIdentifier}.helper`
)

appPlist.CFBundleIdentifier = cfBundleIdentifier

await packager.applyCommonInfo(appPlist, contentsPath)

Expand Down Expand Up @@ -168,7 +175,7 @@ export async function createMacApp(packager: MacPackager, appOutDir: string, asa
helperLoginPlist.CFBundleExecutable = `${appFilename} Login Helper`
helperLoginPlist.CFBundleDisplayName = `${appInfo.productName} Login Helper`
// noinspection SpellCheckingInspection
helperLoginPlist.CFBundleIdentifier = `${appInfo.macBundleIdentifier}.loginhelper`
helperLoginPlist.CFBundleIdentifier = `${cfBundleIdentifier}.loginhelper`
helperLoginPlist.CFBundleVersion = appPlist.CFBundleVersion
}

Expand Down
2 changes: 0 additions & 2 deletions packages/app-builder-lib/src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,6 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
appPlist.LSMinimumSystemVersion = minimumSystemVersion
}

appPlist.CFBundleIdentifier = appInfo.macBundleIdentifier

appPlist.CFBundleShortVersionString = this.platformSpecificBuildOptions.bundleShortVersion || appInfo.version
appPlist.CFBundleVersion = appInfo.buildVersion

Expand Down