Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta committed Mar 19, 2024
1 parent 53ab427 commit 6f6cf4d
Show file tree
Hide file tree
Showing 2 changed files with 5 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 @@ -180,6 +180,7 @@ export default class AppXTarget extends Target {
const executable = `app\\${appInfo.productFilename}.exe`
const displayName = options.displayName || appInfo.productName
const extensions = await this.getExtensions(executable, displayName)
const archSpecificMinVersion = arch === Arch.arm64 ? "10.0.16299.0" : "10.0.14316.0"

const manifest = (await readFile(path.join(getTemplatePath("appx"), "appxmanifest.xml"), "utf8")).replace(/\${([a-zA-Z0-9]+)}/g, (match, p1): string => {
switch (p1) {
Expand Down Expand Up @@ -252,10 +253,10 @@ export default class AppXTarget extends Target {
return extensions

case "minVersion":
return options.minVersion || arch === Arch.arm64 ? "10.0.16299.0" : "10.0.14316.0"
return options.minVersion || archSpecificMinVersion

case "maxVersionTested":
return options.maxVersionTested || options.minVersion || arch === Arch.arm64 ? "10.0.16299.0" : "10.0.14316.0"
return options.maxVersionTested || options.minVersion || archSpecificMinVersion

default:
throw new Error(`Macro ${p1} is not defined`)
Expand Down
2 changes: 2 additions & 0 deletions test/src/windows/appxTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ it(
cscKeyPassword: "test",
appx: {
languages: ["de-DE", "ru-RU"],
minVersion: "10.0.16299.0",
maxVersionTested: "10.0.16299.0",
},
},
})
Expand Down

0 comments on commit 6f6cf4d

Please sign in to comment.