Skip to content

Commit

Permalink
fix(appx): Invalid code signing tool path when building for windows 1…
Browse files Browse the repository at this point in the history
…0 arm64 (#4879)
  • Loading branch information
shibayan committed Apr 29, 2020
1 parent 5129266 commit d898c4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/app-builder-lib/src/targets/AppxTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ export default class AppXTarget extends Target {
await packager.info.callAppxManifestCreated(manifestFile)
mappingList.push(assetInfo.mappings)
mappingList.push([`"${vm.toVmFile(manifestFile)}" "AppxManifest.xml"`])
const signToolArch = (arch === Arch.arm64 ? "x64" : Arch[arch])

if (isScaledAssetsProvided(userAssets)) {
const outFile = vm.toVmFile(stageDir.getTempFile("resources.pri"))
const makePriPath = vm.toVmFile(path.join(vendorPath, "windows-10", Arch[arch], "makepri.exe"))
const makePriPath = vm.toVmFile(path.join(vendorPath, "windows-10", signToolArch, "makepri.exe"))

const assetRoot = stageDir.getTempFile("appx/assets")
await emptyDir(assetRoot)
Expand Down Expand Up @@ -110,7 +111,7 @@ export default class AppXTarget extends Target {
if (this.options.makeappxArgs != null) {
makeAppXArgs.push(...this.options.makeappxArgs)
}
await vm.exec(vm.toVmFile(path.join(vendorPath, "windows-10", Arch[arch], "makeappx.exe")), makeAppXArgs)
await vm.exec(vm.toVmFile(path.join(vendorPath, "windows-10", signToolArch, "makeappx.exe")), makeAppXArgs)
await packager.sign(artifactPath)

await stageDir.cleanup()
Expand Down

0 comments on commit d898c4e

Please sign in to comment.