[PR #15034] [MERGED] Add support for an unpackaged distribution of Terminal #30373

Open
opened 2026-01-31 09:40:26 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15034
Author: @DHowett
Created: 3/22/2023
Status: Merged
Merged: 3/30/2023
Merged by: @DHowett

Base: mainHead: dev/duhowett/unpackaged


📝 Commits (10+)

  • 0078c55 HAX: one package to rule them
  • 179196e Purge TerminalMUXVersion and MUXBinRoot
  • 2db228d Merge remote-tracking branch 'origin/main' into dev/duhowett/one-package-to-rule-them-etc
  • fc1394a Merge remote-tracking branch 'origin/main' into dev/duhowett/one-package-to-rule-them-etc
  • a086f5b New winget publish pipeline too!
  • 28a8434 Add a script that merges Terminal's .pri with Xaml's
  • c0e541d Add a script that takes a Terminal+XAML appx and makes a distribution zip
  • 5eb316c Use the new scripts to produce an unpackaged distribution during Release
  • f72e5ea NFCI: Disable symbol publish and code sign
  • 3ce0dd2 Do it in CI as well!

📊 Changes

7 files changed (+269 additions, -10 deletions)

View changed files

📝 .github/actions/spelling/allow/microsoft.txt (+4 -0)
📝 .github/actions/spelling/patterns/patterns.txt (+1 -1)
📝 build/pipelines/release.yml (+11 -5)
📝 build/pipelines/templates/build-console-steps.yml (+11 -4)
build/scripts/Merge-PriFiles.ps1 (+78 -0)
build/scripts/Merge-TerminalAndXamlResources.ps1 (+47 -0)
build/scripts/New-UnpackagedTerminalDistribution.ps1 (+117 -0)

📄 Description

Since the removal of the Win10-specific variant of the Terminal MSIX in
#15031, there has been no officially-sanctioned (or even unofficially
tested!) way to get an unzippable double-click-runnable version of
Windows Terminal.

Due to a quirk in the resource loading system, an unpackaged
distribution of Terminal needs to ship all of XAML's resources and all
of is own resources in a single resources.pri file. The tooling to
support this is minimal, and we were previously just coasting by on
Visual Studio's generosity plus how the prerelease distribution of XAML
embedded itself into the consuming package.

This pull request introduces a build phase plus a supporting script (or
three) that produces a ZIP file distribution of Windows Terminal when
given a Terminal MSIX and an XAML AppX.

The three scripts are:

  1. A script to merge any number of PRI files and/or PRI dump files (made
    with makepri dump /dt detailed)
  2. A script that specifically merges XAML's resources with Terminal's.
    This is necessary because the XAML package emits a couple PRI
    resources into Terminal's resources even when it is not
    co-packaged.
    We need to remove the conflicting resources.
  3. Finally, a script to take a WT and XAML distribution and combine them
    -- resources, files, everything -- and strip out the things that we
    don't need. This script is an all-in-one that calls the other two and
    produces a ZIP file at the end.

The final distribution is named after the PFN
(Microsoft.WindowsTerminal, or ...Preview or WindowsTerminalDev),
the version number and the architecture. When expanded, it produces a
directory named terminal-X.Y.Z.A (version number.)

I've also added the build script to the release pipeline.

As a treat, this also produces an unpackaged distribution out of every
CI build... that way, contributors can download live deployable copies
of WT Unpackaged to test out their changes. Pretty cool.

Refs #1386


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/15034 **Author:** [@DHowett](https://github.com/DHowett) **Created:** 3/22/2023 **Status:** ✅ Merged **Merged:** 3/30/2023 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/duhowett/unpackaged` --- ### 📝 Commits (10+) - [`0078c55`](https://github.com/microsoft/terminal/commit/0078c55e9b86ff65d4c6b617fc4b83f14e8b86ed) HAX: one package to rule them - [`179196e`](https://github.com/microsoft/terminal/commit/179196ed447d2b44c21a39caec5d157c992e9dee) Purge TerminalMUXVersion and MUXBinRoot - [`2db228d`](https://github.com/microsoft/terminal/commit/2db228d4ccdd9eee43ba23a54aef79d002a80603) Merge remote-tracking branch 'origin/main' into dev/duhowett/one-package-to-rule-them-etc - [`fc1394a`](https://github.com/microsoft/terminal/commit/fc1394aeb9fd868e1e4a2eb704fe2eeb31f56398) Merge remote-tracking branch 'origin/main' into dev/duhowett/one-package-to-rule-them-etc - [`a086f5b`](https://github.com/microsoft/terminal/commit/a086f5b29f63ac35d0891771753fa6534ebeffff) New winget publish pipeline too! - [`28a8434`](https://github.com/microsoft/terminal/commit/28a8434091f6b8ab21ccef5351970725373c978d) Add a script that merges Terminal's .pri with Xaml's - [`c0e541d`](https://github.com/microsoft/terminal/commit/c0e541d33abba0e149f8aeb8a566fe3893ab849c) Add a script that takes a Terminal+XAML appx and makes a distribution zip - [`5eb316c`](https://github.com/microsoft/terminal/commit/5eb316c1cd38ddd987bf0cfeeb3c55e53c19a7ce) Use the new scripts to produce an unpackaged distribution during Release - [`f72e5ea`](https://github.com/microsoft/terminal/commit/f72e5eac6b43394d699ede5a1bacdeb5bee3fccb) NFCI: Disable symbol publish and code sign - [`3ce0dd2`](https://github.com/microsoft/terminal/commit/3ce0dd2e7cebe28eb09e981de7188add0b7358e0) Do it in CI as well! ### 📊 Changes **7 files changed** (+269 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/microsoft.txt` (+4 -0) 📝 `.github/actions/spelling/patterns/patterns.txt` (+1 -1) 📝 `build/pipelines/release.yml` (+11 -5) 📝 `build/pipelines/templates/build-console-steps.yml` (+11 -4) ➕ `build/scripts/Merge-PriFiles.ps1` (+78 -0) ➕ `build/scripts/Merge-TerminalAndXamlResources.ps1` (+47 -0) ➕ `build/scripts/New-UnpackagedTerminalDistribution.ps1` (+117 -0) </details> ### 📄 Description Since the removal of the Win10-specific variant of the Terminal MSIX in #15031, there has been no officially-sanctioned (or even unofficially tested!) way to get an unzippable double-click-runnable version of Windows Terminal. Due to a quirk in the resource loading system, an unpackaged distribution of Terminal needs to ship all of XAML's resources and all of is own resources in a single `resources.pri` file. The tooling to support this is minimal, and we were previously just coasting by on Visual Studio's generosity plus how the prerelease distribution of XAML embedded itself into the consuming package. This pull request introduces a build phase plus a supporting script (or three) that produces a ZIP file distribution of Windows Terminal when given a Terminal MSIX and an XAML AppX. The three scripts are: 1. A script to merge any number of PRI files and/or PRI dump files (made with `makepri dump /dt detailed`) 2. A script that specifically merges XAML's resources with Terminal's. This is necessary because the XAML package emits a couple PRI resources into Terminal's resources _even when it is not co-packaged._ We need to remove the conflicting resources. 3. Finally, a script to take a WT and XAML distribution and combine them -- resources, files, everything -- and strip out the things that we don't need. This script is an all-in-one that calls the other two and produces a ZIP file at the end. The final distribution is named after the PFN (`Microsoft.WindowsTerminal`, or `...Preview` or `WindowsTerminalDev`), the version number and the architecture. When expanded, it produces a directory named `terminal-X.Y.Z.A` (version number.) I've also added the build script to the release pipeline. As a treat, this also produces an unpackaged distribution out of every CI build... that way, contributors can download live deployable copies of WT Unpackaged to test out their changes. Pretty cool. Refs #1386 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:40:26 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30373