[PR #2002] Build a TerminalAppLib and TerminalAppDll separately #24752

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

Original Pull Request: https://github.com/microsoft/terminal/pull/2002

State: closed
Merged: No


This is a PR into #1948. I couldn't verify that the fix worked on just master, so I branched from the tip of 1948. I'll merge this into that PR, then finish that PR (it's all signed off, just blocked on this fix). If y'all want me to make a new version of the PR on master, I can do that.

Summary of the Pull Request

This is like a de-refactor of #1164. We're now building TerminalApp twice.
Once as a lib, and once as a dll. For whatever godforsaken reason, the wapproj
project type is a dumpster fire. If we try to build a static lib, then link
that into a DLL, the wapproj will absolutely not get all the resources,
dlls, xbfs, etc., that we need into the msix.

So now we're building TerminalApp twice. Once as a lib, which we'll use for
the unittests. Then we'll build it again, for consumption in WindowsTerminal.
All the combined files for these two projects are in
terminal-app-common.vcxproj, similar to host-common from the host project.

This does mean we'll have two pch.h steps for the same code. That's a giant
pain, but I think @miniksa is working on that.

References

  • This is relevant to #1995
  • #1948 is blocked on at least this PR

PR Checklist

  • I've discussed this with @DHowett-MSFT
**Original Pull Request:** https://github.com/microsoft/terminal/pull/2002 **State:** closed **Merged:** No --- **This is a PR into #1948**. I couldn't verify that the fix worked on just master, so I branched from the tip of 1948. I'll merge this into that PR, then finish that PR (it's all signed off, just blocked on this fix). If y'all want me to make a new version of the PR on master, I can do that. ## Summary of the Pull Request This is like a de-refactor of #1164. We're now building TerminalApp _twice_. Once as a lib, and once as a dll. For whatever godforsaken reason, the wapproj project type is a dumpster fire. If we try to build a static lib, then link that into a DLL, the wapproj will absolutely _not_ get all the resources, dlls, xbfs, etc., that we need into the msix. So now we're building TerminalApp twice. Once as a lib, which we'll use for the unittests. Then we'll build it again, for consumption in WindowsTerminal. All the combined files for these two projects are in terminal-app-common.vcxproj, similar to host-common from the host project. This does mean we'll have two pch.h steps for the same code. That's a giant pain, but I think @miniksa is working on that. ## References * This is relevant to #1995 * #1948 is blocked on at least this PR <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] I've discussed this with @DHowett-MSFT
claunia added the pull-request label 2026-01-31 09:05:09 +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#24752