Skip to content

Commit

Permalink
fix(mac): fix "Contents/Info.plist" don't have identical SHAs when cr…
Browse files Browse the repository at this point in the history
…eating a universal build (#5550)
  • Loading branch information
quanglam2807 committed Jan 20, 2021
1 parent 60f7fe3 commit 0ba839b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/macPackager.ts
Expand Up @@ -100,10 +100,10 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
case Arch.universal: {
const x64Arch = Arch.x64;
const x64AppOutDir = appOutDir + '--' + Arch[x64Arch];
await super.doPack(outDir, x64AppOutDir, platformName, x64Arch, platformSpecificBuildOptions, targets, false);
await super.doPack(outDir, x64AppOutDir, platformName, x64Arch, platformSpecificBuildOptions, targets, false, true);
const arm64Arch = Arch.arm64;
const arm64AppOutPath = appOutDir + '--' + Arch[arm64Arch];
await super.doPack(outDir, arm64AppOutPath, platformName, arm64Arch, platformSpecificBuildOptions, targets, false);
await super.doPack(outDir, arm64AppOutPath, platformName, arm64Arch, platformSpecificBuildOptions, targets, false, true);
const framework = this.info.framework
log.info({
platform: platformName,
Expand Down
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/platformPackager.ts
Expand Up @@ -158,7 +158,7 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
}
}

protected async doPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, arch: Arch, platformSpecificBuildOptions: DC, targets: Array<Target>, sign: boolean = true) {
protected async doPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, arch: Arch, platformSpecificBuildOptions: DC, targets: Array<Target>, sign: boolean = true, disableAsarIntegrity: boolean = false) {
if (this.packagerOptions.prepackaged != null) {
return
}
Expand Down Expand Up @@ -226,7 +226,7 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
await framework.beforeCopyExtraFiles({
packager: this,
appOutDir,
asarIntegrity: asarOptions == null ? null : await computeData(resourcesPath, asarOptions.externalAllowed ? {externalAllowed: true} : null),
asarIntegrity: asarOptions == null || disableAsarIntegrity ? null : await computeData(resourcesPath, asarOptions.externalAllowed ? {externalAllowed: true} : null),
platformName,
})
}
Expand Down

0 comments on commit 0ba839b

Please sign in to comment.