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

Support completely custom AppxManifest.xml #8608

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@
"description": "Relative path to custom extensions xml to be included in an `appmanifest.xml`.",
"type": "string"
},
"customManifestPath": {
"description": "Path to custom AppxManifest.xml",
"type": [
"null",
"string"
]
},
"displayName": {
"description": "A friendly name that can be displayed to users. Corresponds to [Properties.DisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211432.aspx).\nDefaults to the application product name.",
"type": [
Expand Down
5 changes: 5 additions & 0 deletions packages/app-builder-lib/src/options/AppXOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
*/
readonly customExtensionsPath?: string

/**

Check warning on line 54 in packages/app-builder-lib/src/options/AppXOptions.ts

View workflow job for this annotation

GitHub Actions / test-linux (ArtifactPublisherTest,BuildTest,ExtraBuildTest,RepoSlugTest,binDownloadTest,configura...

Delete `··`

Check warning on line 54 in packages/app-builder-lib/src/options/AppXOptions.ts

View workflow job for this annotation

GitHub Actions / test-linux (snapTest,debTest,fpmTest,protonTest)

Delete `··`
* Path to custom `AppxManifest.xml`.
*/
readonly customManifestPath?: string

/**
* Whether to overlay the app's name on top of tile images on the Start screen. Defaults to `false`. (https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap-shownameontiles) in the dependencies.
* @default false
Expand Down
9 changes: 7 additions & 2 deletions packages/app-builder-lib/src/targets/AppxTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ export default class AppXTarget extends Target {
const assetInfo = await AppXTarget.computeUserAssets(vm, vendorPath, userAssetDir)
const userAssets = assetInfo.userAssets

const manifestFile = stageDir.getTempFile("AppxManifest.xml")
await this.writeManifest(manifestFile, arch, await this.computePublisherName(), userAssets)
const manifestFile = this.options.customManifestPath || stageDir.getTempFile("AppxManifest.xml")
if (this.options.customManifestPath) {
log.info({ reason: "Custom manifest path provided" }, "Manifest writing skipped")
} else {
await this.writeManifest(manifestFile, arch, await this.computePublisherName(), userAssets)
}

await packager.info.callAppxManifestCreated(manifestFile)
mappingList.push(assetInfo.mappings)
mappingList.push([`"${vm.toVmFile(manifestFile)}" "AppxManifest.xml"`])
Expand Down
Loading