[PR #3474] [MERGED] Move project to app CRTs in preparation to run Universal #25381

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3474
Author: @miniksa
Created: 11/7/2019
Status: Merged
Merged: 11/8/2019
Merged by: @miniksa

Base: masterHead: dev/miniksa/crt


📝 Commits (8)

  • 62a59cb Change to use App CRT in preparation for universal.
  • 61c665b Try to make project build again by setting winconpty to static lib so it'll use the CRT inside TerminalConnection (or its other consumers) instead of linking its own.
  • bd3750a Remove test for conpty dll, it's a lib now. Add additional commentary on how CRT linking works for future reference. I'm sure this will come up again.
  • 43ddd8b This fixes the build error.
  • 4554c05 use the _apiset variant until proven otherwise to match the existing one.
  • ce09c32 Clarification in the comments for linking.
  • b765181 Try removing PTY tests to see if that fixes the issue.
  • 29d0e95 Merge branch 'master' into dev/miniksa/crt

📊 Changes

6 files changed (+16 additions, -263 deletions)

View changed files

📝 build/scripts/Test-WindowsTerminalPackage.ps1 (+0 -3)
📝 src/common.build.post.props (+1 -1)
📝 src/cppwinrt.build.pre.props (+9 -4)
src/host/ft_host/API_PtyTests.cpp (+0 -244)
📝 src/host/ft_host/Host.FeatureTests.vcxproj (+2 -3)
📝 src/winconpty/winconpty.vcxproj (+4 -8)

📄 Description

Summary of the Pull Request

  • Non-Desktop editions need to use the App CRT. This moves us to the App CRT for all WinRT projects (Terminal projects).

PR Checklist

  • I work here
  • Tests should still pass
  • Am a core contributor.

Detailed Description of the Pull Request / Additional comments

We were overriding to the desktop SDK for our terminal project for reasons related to unpackaged activation. But:

  1. That's not super important as we're focused on packaged activation for a myriad of other reasons
  2. We have the forwarders now and as long as they're next to the WindowsTerminal.exe, they should be invoked and forward the App CRT things to the desktop one.

In order for me to get this to run on non-Desktop platforms, I need the universal app CRT instead. So this uses that by default.

One casualty of war is winconpty.dll. If I build it in DLL form since it's a non-store project, it gets the desktop CRT. But the now-universal TerminalConnection.dll project dependent on the app CRT needs that.

I could set winconpty.dll to the store/app crt... and then the tests would break unless I carried the forwarders with.

So since there's no pressing need to distribute the winconpty.dll as a DLL, I made it a .lib and let it get rolled into the relevant binaries that already have their platform-appropriate CRTs.

Validation Steps Performed

F5-ran the CascadiaPackage project


🔄 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/3474 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 11/7/2019 **Status:** ✅ Merged **Merged:** 11/8/2019 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `dev/miniksa/crt` --- ### 📝 Commits (8) - [`62a59cb`](https://github.com/microsoft/terminal/commit/62a59cbe412b5444acc1a9bcbc2b4ee0cdfb868c) Change to use App CRT in preparation for universal. - [`61c665b`](https://github.com/microsoft/terminal/commit/61c665bb86498a1a63d4b945591e3cc93b0c2869) Try to make project build again by setting winconpty to static lib so it'll use the CRT inside TerminalConnection (or its other consumers) instead of linking its own. - [`bd3750a`](https://github.com/microsoft/terminal/commit/bd3750a957aa23e4df69170e3cc9d34da290d8ef) Remove test for conpty dll, it's a lib now. Add additional commentary on how CRT linking works for future reference. I'm sure this will come up again. - [`43ddd8b`](https://github.com/microsoft/terminal/commit/43ddd8b6f3f732d906eadc2b28a441fab68b2446) This fixes the build error. - [`4554c05`](https://github.com/microsoft/terminal/commit/4554c050a44807f1d97027592d3b7ab4db8e2fa5) use the _apiset variant until proven otherwise to match the existing one. - [`ce09c32`](https://github.com/microsoft/terminal/commit/ce09c32c10037148bafced8334e0471a1221e3a2) Clarification in the comments for linking. - [`b765181`](https://github.com/microsoft/terminal/commit/b76518199cafaee9c4cb0efe13068a175de54d9a) Try removing PTY tests to see if that fixes the issue. - [`29d0e95`](https://github.com/microsoft/terminal/commit/29d0e95c5f1231c822784a56514dd56e325c660e) Merge branch 'master' into dev/miniksa/crt ### 📊 Changes **6 files changed** (+16 additions, -263 deletions) <details> <summary>View changed files</summary> 📝 `build/scripts/Test-WindowsTerminalPackage.ps1` (+0 -3) 📝 `src/common.build.post.props` (+1 -1) 📝 `src/cppwinrt.build.pre.props` (+9 -4) ➖ `src/host/ft_host/API_PtyTests.cpp` (+0 -244) 📝 `src/host/ft_host/Host.FeatureTests.vcxproj` (+2 -3) 📝 `src/winconpty/winconpty.vcxproj` (+4 -8) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - Non-Desktop editions need to use the App CRT. This moves us to the App CRT for all WinRT projects (Terminal projects). <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] I work here * [x] Tests should still pass * [x] Am a core contributor. <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments We were overriding to the desktop SDK for our terminal project for *reasons* related to unpackaged activation. But: 1. That's not super important as we're focused on packaged activation for a myriad of other reasons 2. We have the forwarders now and as long as they're next to the WindowsTerminal.exe, they should be invoked and forward the App CRT things to the desktop one. In order for me to get this to run on non-Desktop platforms, I need the universal app CRT instead. So this uses that by default. One casualty of war is winconpty.dll. If I build it in DLL form since it's a non-store project, it gets the desktop CRT. But the now-universal TerminalConnection.dll project dependent on the app CRT needs that. I could set winconpty.dll to the store/app crt... and then the tests would break unless I carried the forwarders with. So since there's no pressing need to distribute the winconpty.dll as a DLL, I made it a .lib and let it get rolled into the relevant binaries that already have their platform-appropriate CRTs. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed F5-ran the CascadiaPackage project --- <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:09:10 +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#25381