Skip to content

MSIX Bundle Support for pack command#546

Open
zateutsch wants to merge 7 commits into
mainfrom
zt/517-msix-bundles
Open

MSIX Bundle Support for pack command#546
zateutsch wants to merge 7 commits into
mainfrom
zt/517-msix-bundles

Conversation

@zateutsch
Copy link
Copy Markdown
Contributor

@zateutsch zateutsch commented May 21, 2026

Enabling creation of msixbundles via passing multiple output dirs to pack command
fixes #517

Decision tree

winapp pack <input-folder...> [options]
|
+-- N = 1 folder
|  +-- --output ends in .msixbundle? -> ERROR
|  +-- otherwise -> Single .msix package (existing behavior)
|
+-- N > 1 folders
   +-- --output ends in .msix? -> ERROR
   +-- otherwise -> .msixbundle
      |
      +-- Architecture detection (per folder)
      |  +-- PE header of --executable or auto-detected .exe
      |
      +-- Validation (cross-slice)
      |  +-- No duplicate architectures
      |  +-- Not all neutral
      |  +-- Identity (Name, Publisher, Version) must match
      |  +-- Capabilities must match
      |  +-- Applications (Id, EntryPoint) must match
      |  +-- PackageDependency must match
      |  +-- TargetDeviceFamily must match
      |
      +-- --self-contained
      |  +-- Downloads runtime per-slice using detected arch (not host arch)
      |
      +-- --manifest <path>
      |  +-- Shared across all slices (arch stamped per slice)
      |
      +-- --cert / --generate-cert
      |  +-- Signs the final .msixbundle
      |
      +-- Output naming (when --output omitted)
         +-- <name>_<version>_<arch1>_<arch2>.msixbundle

Examples

# Basic bundle
winapp pack ./publish/x64 ./publish/arm64

# With shared manifest + signing
winapp pack ./publish/x64 ./publish/arm64 --manifest ./appxmanifest.xml --generate-cert

# Self-contained (arch-aware runtime per slice)
winapp pack ./publish/x64 ./publish/arm64 --self-contained

# Custom output name
winapp pack ./publish/x64 ./publish/arm64 --output MyApp.msixbundle

zateutsch and others added 2 commits May 21, 2026 14:51
…alidation, docs

- H1: Thread targetArch into PrepareRuntimeForPackagingAsync so bundle
  slices use their detected arch instead of host arch
- H2: Add manifest-referenced asset copying to PackSingleFolderToMsixAsync
  (external manifest assets, MRT assets, file references)
- N1: Reject .msixbundle extension for --output when N=1 (single package)
- M1/M2: Update ShortDescription and --output description to mention bundles
- M6: Update winapp.agent.md command reference with bundle usage
- M7: Regenerate winapp-commands.ts from updated cli-schema.json
- M4/M5: Add dependency consistency tests (PackageDependency, TargetDeviceFamily)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 21, 2026 20:24
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds multi-folder packaging support to produce MSIX bundles, including cross-slice validation and makeappx bundling, while updating CLI/docs and small npm wrapper options.

Changes:

  • Extend winapp package/pack to accept multiple input folders and generate .msixbundle outputs.
  • Introduce BundleService (makeappx bundle) and BundleValidationService (cross-slice manifest/arch consistency checks).
  • Update docs/schema and refine npm wrapper options (init --search-all, simplify ui screenshot options).

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/winapp-npm/src/winapp-commands.ts Adds init --search-all; removes uiScreenshot focus option and updates capture wording.
src/winapp-CLI/WinApp.Cli/Services/MsixService.cs Injects new bundle services into MsixService.
src/winapp-CLI/WinApp.Cli/Services/MsixService.Runtime.cs Adds arch override for runtime preparation (bundle slice support).
src/winapp-CLI/WinApp.Cli/Services/MsixService.Bundle.cs Implements bundle creation workflow and shared pack helper.
src/winapp-CLI/WinApp.Cli/Services/IMsixService.cs Exposes CreateMsixBundleAsync API.
src/winapp-CLI/WinApp.Cli/Services/IBundleValidationService.cs Defines cross-slice validation contract and error model.
src/winapp-CLI/WinApp.Cli/Services/IBundleService.cs Defines bundle creation contract.
src/winapp-CLI/WinApp.Cli/Services/BundleValidationService.cs Implements architecture + manifest consistency validation.
src/winapp-CLI/WinApp.Cli/Services/BundleService.cs Implements makeappx bundle invocation with staging dir.
src/winapp-CLI/WinApp.Cli/Models/CreateMsixBundleResult.cs Adds bundle result model returned by service/CLI.
src/winapp-CLI/WinApp.Cli/Models/BundleSliceInfo.cs Adds per-slice metadata model for bundle results.
src/winapp-CLI/WinApp.Cli/Helpers/HostBuilderExtensions.cs Registers bundle services with DI container.
src/winapp-CLI/WinApp.Cli/Commands/PackageCommand.cs Accepts multiple folders, validates inputs/output extension, routes to bundle vs package.
src/winapp-CLI/WinApp.Cli.Tests/MsixServiceTests.cs Updates test helper constructors for new MsixService deps.
src/winapp-CLI/WinApp.Cli.Tests/FakeMsixService.cs Adds fake implementation for CreateMsixBundleAsync.
src/winapp-CLI/WinApp.Cli.Tests/BundleValidationServiceTests.cs Adds unit tests for bundle cross-slice validation.
docs/usage.md Documents multi-architecture bundle usage for winapp pack.
docs/fragments/skills/winapp-cli/signing.md Documents that only the bundle needs signing.
docs/fragments/skills/winapp-cli/package.md Documents bundling workflow and behavior.
docs/cli-schema.json Updates schema for input-folder argument to be one-or-more directories.
.github/plugin/skills/winapp-cli/ui-automation/SKILL.md Changes reference to UI JSON envelope doc (currently removes link).
.github/plugin/skills/winapp-cli/signing/SKILL.md Adds bundle signing guidance.
.github/plugin/skills/winapp-cli/package/SKILL.md Adds bundle packaging guidance.
.github/plugin/agents/winapp.agent.md Updates agent guidance for package/bundle behavior.

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

Comment thread src/winapp-npm/src/winapp-commands.ts Outdated
Comment thread src/winapp-CLI/WinApp.Cli/Services/BundleValidationService.cs
Comment thread src/winapp-CLI/WinApp.Cli/Services/BundleValidationService.cs Outdated
Comment thread src/winapp-CLI/WinApp.Cli/Services/MsixService.Bundle.cs
Comment thread src/winapp-CLI/WinApp.Cli/Services/MsixService.Bundle.cs
Comment thread .github/plugin/skills/winapp-cli/ui-automation/SKILL.md
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 31.27 MB 31.40 MB 📈 +134.0 KB (+0.42%)
CLI (x64) 31.61 MB 31.74 MB 📈 +129.5 KB (+0.40%)
MSIX (ARM64) 13.12 MB 13.19 MB 📈 +69.6 KB (+0.52%)
MSIX (x64) 13.96 MB 14.02 MB 📈 +54.8 KB (+0.38%)
NPM Package 27.34 MB 27.45 MB 📈 +111.9 KB (+0.40%)
NuGet Package 27.43 MB 27.54 MB 📈 +112.2 KB (+0.40%)
VS Code Extension 20.16 MB 20.27 MB 📈 +111.6 KB (+0.54%)

Test Results

1053 passed, 1 skipped out of 1054 tests in 433.3s (+24 tests, -24.4s vs. baseline)

Test Coverage

17% line coverage, 35.5% branch coverage · ✅ +0.3% vs. baseline

CLI Startup Time

32ms median (x64, winapp --version) · ✅ -6ms vs. baseline


Updated 2026-05-25 03:22:15 UTC · commit 40841bd · workflow run

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]: Create MSIX Bundles

2 participants