feat(windows): capabilities#9437
Conversation
🦋 Changeset detectedLatest commit: 2ca7e45 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Thanks for the quick response to this pr. I will continue to work on this in the next week. |
…erts/electron-builder into feat/windows-capabilities
|
I followed your suggestions and fullfilled the posted requirements. Ready for merge now? |
There was a problem hiding this comment.
Pull request overview
This pull request adds support for configuring Windows UWP/APPX capabilities through the build configuration, addressing issue #9436. It introduces an optional capabilities array property to AppxOptions that allows developers to specify which Windows capabilities their application needs, with runFullTrust automatically included as it's required for Electron apps.
Changes:
- Added new
AppxCapabilities.tsmodule defining all supported Windows UWP capabilities with proper namespace handling and XML generation - Modified
AppxTarget.tsto generate capabilities XML from configuration and ensurerunFullTrustis always included - Updated documentation, TypeScript types, and JSON schema to include the new
capabilitiesconfiguration option
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/app-builder-lib/src/targets/AppxCapabilities.ts | New file defining capability types, namespace configurations, and XML generation logic for all supported Windows UWP capabilities |
| packages/app-builder-lib/src/targets/AppxTarget.ts | Added getCapabilities() method to generate capabilities XML, imported CAPABILITIES constant, improved error messages, added trim() to language processing |
| packages/app-builder-lib/src/options/AppXOptions.ts | Added capabilities property with documentation explaining usage and default behavior |
| packages/app-builder-lib/scheme.json | Added JSON schema definition for capabilities array property |
| packages/app-builder-lib/templates/appx/appxmanifest.xml | Replaced hardcoded Capabilities section with ${capabilities} template variable |
| .changeset/serious-doors-retire.md | Added changeset documenting the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Looks like there's some compiler errors: |
Please validate code with |
…feat/windows-capabilities
…ed by MakeAppx.exe
I saw your commit. Is this due to an outdated MakeAppx.exe? I'm currently updating the toolsets in electron-builder, including makeappx, but those updates are targeting v27 release cut. |
|
I don't know if current or future versions of makeappx support that. I think that namespace is not relevant for electron apps. So I decided to skip support. I want to get this PR done now. |
|
Sorry for that regression, but What about adding a special script for contributors to validate code before commit/push? package.json {
"scripts": {
"validate": "pnpm compile && pnpm generate-all && pnpm lint"
}
} |
I like this idea. The project used to use husky, but the pre-commit hook would take a minute to run on my windows VM, so I got rid of it. At least a generic command in package.json would help with development. Can add a reminder to the PR template as well? |
Reminder sounds good. I work on windows too. I found out, tthat I have to add The currently failing checks are MAC only. I didn't change code for MAC so those issues are not related to this PR. |
This pull request adresses issue #9436.
It adds the optional config property
capabilitiestoAppxOptions. Docs, schema and template are modified according to that.Should be easy to take this over into the next release.