Skip to content

feat(#3): Microsoft Store MSIX packaging#55

Open
ModerRAS wants to merge 1 commit intomasterfrom
feature/issue-3-microsoft-store
Open

feat(#3): Microsoft Store MSIX packaging#55
ModerRAS wants to merge 1 commit intomasterfrom
feature/issue-3-microsoft-store

Conversation

@ModerRAS
Copy link
Copy Markdown
Contributor

Summary

  • Create Package.appxmanifest for Windows Store
  • Configure MSIX publish profile
  • Support file type associations for XML
  • Add protocol handler for deep linking
  • Support automatic updates

Changes

  • BannerlordModEditor.UI/Package.appxmanifest - MSIX package manifest
  • BannerlordModEditor.UI/Properties/PublishProfiles/MSIXProfile.pubxml - Publish profile

Closes #3

- Create Package.appxmanifest for Windows Store
- Configure MSIX publish profile
- Support file type associations for XML
- Add protocol handler for deep linking
- Support automatic updates

Closes #3
Copilot AI review requested due to automatic review settings March 20, 2026 01:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an MSIX package manifest to enable Microsoft Store distribution features (file associations, protocol deep links, and restricted capabilities for desktop execution).

Changes:

  • Introduces Package.appxmanifest defining identity, visual assets, dependencies, file type associations, and a custom protocol handler
  • Declares restricted capabilities likely intended for a full-trust desktop app packaged as MSIX

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manifest introduces the uap, mp, and rescap namespaces but does not mark them as ignorable on the <Package> element. This commonly causes schema/packaging validation failures. Add IgnorableNamespaces=\"uap mp rescap\" (or the appropriate subset actually used) to the <Package> element.

Suggested change
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap mp rescap">

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +36
<Application Id="App"
Executable="BannerlordModEditor.exe"
EntryPoint="BannerlordModEditor.UI.App">
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For MSIX-packaged Win32/WinUI 3/WPF desktop apps, EntryPoint is typically Windows.FullTrustApplication (with a windows.fullTrustProcess extension if using the Desktop Bridge model). Using an app-class entry point here is likely to break activation/launch. Align the manifest with the app model you’re packaging (full-trust desktop vs. UWP), updating EntryPoint (and adding/removing the full-trust extension) accordingly.

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +26
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22621.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22621.0" />
</Dependencies>

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declaring both Windows.Universal and Windows.Desktop can unintentionally broaden device targeting (including non-desktop families) even though the app appears to require desktop-only capabilities (e.g., full trust). If the intent is Store distribution for desktop only, prefer keeping just Windows.Desktop to avoid incorrect availability/Store certification issues.

Suggested change
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22621.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22621.0" />
</Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22621.0" />
</Dependencies>

Copilot uses AI. Check for mistakes.
Publisher="CN=BannerlordModer"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="a3f5c8d2-7e4b-4f1a-9c6d-8b2e3f4a5c6d" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mp:PhoneIdentity is a legacy Windows Phone element and is typically unnecessary for modern MSIX desktop apps. Removing it reduces confusion and avoids potential schema/certification warnings related to phone-targeted metadata.

Copilot uses AI. Check for mistakes.

<Capabilities>
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="unvirtualizedResources" />
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both runFullTrust and especially unvirtualizedResources are restricted capabilities that can trigger Store certification rejection unless you have approval/strong justification. If unvirtualizedResources isn’t strictly required, drop it; if they are required, consider documenting why (and ensuring the package submission is prepared for restricted capability review).

Suggested change
<rescap:Capability Name="unvirtualizedResources" />

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 上架微软应用商店

2 participants