Move LibraryResourceLoader to PCH (#19184)

It is foundational enough that everyone should have access by now.
This commit is contained in:
Dustin L. Howett 2025-12-02 14:33:02 -06:00 committed by GitHub
parent 3e29d2a316
commit 20998f7628
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
84 changed files with 21 additions and 90 deletions

View File

@ -6,7 +6,6 @@
#include "AboutDialog.h"
#include "AboutDialog.g.cpp"
#include <LibraryResources.h>
#include <WtExeUtils.h>
#include "../../types/inc/utils.hpp"

View File

@ -7,8 +7,6 @@
#include "../../types/inc/utils.hpp"
#include "../TerminalSettingsAppAdapterLib/TerminalSettings.h"
#include <LibraryResources.h>
using namespace winrt;
using namespace winrt::Windows::Foundation::Collections;
using namespace winrt::Windows::UI::Xaml;

View File

@ -5,7 +5,6 @@
#include "AppCommandlineArgs.h"
#include "../types/inc/utils.hpp"
#include "TerminalSettingsModel/ModelSerializationHelpers.h"
#include <LibraryResources.h>
using namespace winrt::Microsoft::Terminal::Settings::Model;
using namespace TerminalApp;

View File

@ -6,7 +6,6 @@
#include "AppLogic.g.cpp"
#include "SettingsLoadEventArgs.h"
#include <LibraryResources.h>
#include <WtExeUtils.h>
#include <wil/token_helpers.h>

View File

@ -1,7 +1,6 @@
#include "pch.h"
#include "ColorPickupFlyout.h"
#include "ColorPickupFlyout.g.cpp"
#include <LibraryResources.h>
namespace winrt::TerminalApp::implementation
{

View File

@ -4,7 +4,6 @@
#include "pch.h"
#include "CommandPalette.h"
#include "CommandPaletteItems.h"
#include <LibraryResources.h>
#include "CommandPalette.g.cpp"

View File

@ -4,8 +4,6 @@
#include "pch.h"
#include "Tab.h"
#include <LibraryResources.h>
#include "CommandPaletteItems.h"
using namespace winrt;

View File

@ -3,7 +3,6 @@
#include "pch.h"
#include "CommandPalette.h"
#include <LibraryResources.h>
#include "fzf/fzf.h"
#include "FilteredCommand.g.cpp"

View File

@ -3,7 +3,6 @@
#include "pch.h"
#include "MarkdownPaneContent.h"
#include <LibraryResources.h>
#include "MarkdownPaneContent.g.cpp"
#include <til/io.h>

View File

@ -5,7 +5,6 @@
#include "MinMaxCloseControl.h"
#include "MinMaxCloseControl.g.cpp"
#include <LibraryResources.h>
using namespace winrt::Windows::UI::Xaml;

View File

@ -3,7 +3,6 @@
#pragma once
#include "winrt/TerminalApp.h"
#include <LibraryResources.h>
#include "BasicPaneEvents.h"
namespace winrt::TerminalApp::implementation

View File

@ -7,7 +7,6 @@
#include "BasicPaneEvents.h"
#include "FilteredCommand.h"
#include "CommandPaletteItems.h"
#include <LibraryResources.h>
namespace winrt::TerminalApp::implementation
{

View File

@ -3,7 +3,6 @@
#include "pch.h"
#include "SuggestionsControl.h"
#include <LibraryResources.h>
#include "CommandPaletteItems.h"

View File

@ -2,7 +2,6 @@
// Licensed under the MIT license.
#include "pch.h"
#include <LibraryResources.h>
#include "ColorPickupFlyout.h"
#include "Tab.h"
#include "SettingsPaneContent.h"

View File

@ -15,8 +15,6 @@
#include "../../inc/til/string.h"
#include <til/io.h>
#include <LibraryResources.h>
#include "TabRowControl.h"
#include "DebugTapConnection.h"
#include "..\TerminalSettingsModel\FileUtils.h"

View File

@ -5,7 +5,6 @@
#include "TabRowControl.h"
#include "TabRowControl.g.cpp"
#include <LibraryResources.h>
using namespace winrt::Windows::ApplicationModel::DataTransfer;

View File

@ -5,7 +5,6 @@
#include "pch.h"
#include "TerminalPage.h"
#include <LibraryResources.h>
#include <TerminalThemeHelpers.h>
#include <Utils.h>
#include <TerminalCore/ControlKeyStates.hpp>

View File

@ -6,7 +6,6 @@
#include "AppLogic.h"
#include <LibraryResources.h>
#include <til/env.h>
#include "TerminalWindow.g.cpp"

View File

@ -2,7 +2,6 @@
// Licensed under the MIT license.
#include "pch.h"
#include <LibraryResources.h>
#include <WilErrorReporting.h>
// Note: Generate GUID using TlgGuid.exe tool

View File

@ -96,3 +96,5 @@ TRACELOGGING_DECLARE_PROVIDER(g_hTerminalAppProvider);
#include <wil/cppwinrt_helpers.h> // must go after the CoreDispatcher type is defined
#include <til/winrt.h>
#include <LibraryResources.h>

View File

@ -7,7 +7,6 @@
#include "AzureClientID.h"
#include <sstream>
#include <cstdlib>
#include <LibraryResources.h>
#include <unicode.hpp>
#include "AzureConnection.g.cpp"

View File

@ -8,7 +8,6 @@
#include <winmeta.h>
#include "CTerminalHandoff.h"
#include "LibraryResources.h"
#include "../../types/inc/utils.hpp"
#include "ConptyConnection.g.cpp"

View File

@ -2,7 +2,6 @@
// Licensed under the MIT license.
#include "pch.h"
#include <LibraryResources.h>
#include <WilErrorReporting.h>
// Note: Generate GUID using TlgGuid.exe tool

View File

@ -40,3 +40,5 @@ TRACELOGGING_DECLARE_PROVIDER(g_hTerminalConnectionProvider);
#include <til/winrt.h>
#include <cppwinrt_utils.h>
#include <LibraryResources.h>

View File

@ -9,7 +9,6 @@
#include <dsound.h>
#include <DefaultSettings.h>
#include <LibraryResources.h>
#include <unicode.hpp>
#include <utils.hpp>
#include <WinUser.h>

View File

@ -6,7 +6,6 @@
#include <DefaultSettings.h>
#include <unicode.hpp>
#include <Utils.h>
#include <LibraryResources.h>
#include "../../types/inc/GlyphWidth.hpp"
#include "../../types/inc/Utils.hpp"
#include "../../buffer/out/search.h"

View File

@ -3,7 +3,6 @@
#include "pch.h"
#include <UIAutomationCore.h>
#include <LibraryResources.h>
#include "InteractivityAutomationPeer.h"
#include "InteractivityAutomationPeer.g.cpp"

View File

@ -4,7 +4,6 @@
#include "pch.h"
#include "SearchBoxControl.h"
#include "SearchBoxControl.g.cpp"
#include <LibraryResources.h>
using namespace winrt;
using namespace winrt::Windows::UI::Xaml;

View File

@ -4,7 +4,6 @@
#include "pch.h"
#include "TermControl.h"
#include <LibraryResources.h>
#include <inputpaneinterop.h>
#include "TermControlAutomationPeer.h"

View File

@ -3,7 +3,6 @@
#include "pch.h"
#include <UIAutomationCore.h>
#include <LibraryResources.h>
#include "TermControlAutomationPeer.h"
#include "TermControl.h"
#include "TermControlAutomationPeer.g.cpp"

View File

@ -2,7 +2,6 @@
// Licensed under the MIT license.
#include "pch.h"
#include <LibraryResources.h>
#include <WilErrorReporting.h>
// For g_hCTerminalCoreProvider

View File

@ -81,3 +81,5 @@ TRACELOGGING_DECLARE_PROVIDER(g_hTerminalControlProvider);
#include <cppwinrt_utils.h>
#include <wil/cppwinrt_helpers.h> // must go after the CoreDispatcher type is defined
#include <LibraryResources.h>

View File

@ -4,7 +4,6 @@
#include "pch.h"
#include "Actions.h"
#include "Actions.g.cpp"
#include "LibraryResources.h"
#include "../TerminalSettingsModel/AllShortcutActions.h"
using namespace winrt::Windows::UI::Xaml;

View File

@ -5,7 +5,6 @@
#include "ActionsViewModel.h"
#include "ActionsViewModel.g.cpp"
#include "KeyBindingViewModel.g.cpp"
#include "LibraryResources.h"
#include "../TerminalSettingsModel/AllShortcutActions.h"
using namespace winrt::Windows::Foundation;

View File

@ -7,8 +7,6 @@
#include "AddProfilePageNavigationState.g.cpp"
#include "EnumEntry.h"
#include <LibraryResources.h>
using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::System;
using namespace winrt::Windows::UI::Core;

View File

@ -4,7 +4,6 @@
#include "pch.h"
#include "Appearances.h"
#include <LibraryResources.h>
#include "../WinRTUtils/inc/Utils.h"
#include "EnumEntry.h"

View File

@ -23,7 +23,6 @@ Author(s):
#include "Utils.h"
#include "ViewModelHelpers.h"
#include "SettingContainer.h"
#include <LibraryResources.h>
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{

View File

@ -5,7 +5,6 @@
#include "ColorSchemeViewModel.h"
#include "ColorSchemeViewModel.g.cpp"
#include <LibraryResources.h>
#include "..\WinRTUtils\inc\Utils.h"
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation

View File

@ -6,8 +6,6 @@
#include "ColorTableEntry.g.cpp"
#include "ColorSchemes.g.cpp"
#include <LibraryResources.h>
using namespace winrt;
using namespace winrt::Windows::UI;
using namespace winrt::Windows::UI::Xaml;

View File

@ -5,8 +5,6 @@
#include "EditColorScheme.h"
#include "EditColorScheme.g.cpp"
#include <LibraryResources.h>
using namespace winrt;
using namespace winrt::Windows::UI;
using namespace winrt::Windows::UI::Xaml;

View File

@ -9,7 +9,6 @@
#include "FragmentProfileViewModel.g.cpp"
#include "ExtensionPackageTemplateSelector.g.cpp"
#include <LibraryResources.h>
#include "..\WinRTUtils\inc\Utils.h"
using namespace winrt::Windows::Foundation;

View File

@ -5,7 +5,6 @@
#include "GlobalAppearance.h"
#include "GlobalAppearance.g.cpp"
#include <LibraryResources.h>
#include <WtExeUtils.h>
using namespace winrt;

View File

@ -6,8 +6,6 @@
#include "GlobalAppearanceViewModel.g.cpp"
#include "EnumEntry.h"
#include <LibraryResources.h>
using namespace winrt;
using namespace winrt::Windows::UI::Xaml;
using namespace winrt::Windows::UI::Xaml::Navigation;

View File

@ -4,7 +4,6 @@
#include "pch.h"
#include "KeyChordListener.h"
#include "KeyChordListener.g.cpp"
#include "LibraryResources.h"
using namespace winrt::Windows::UI::Core;
using namespace winrt::Windows::UI::Xaml;

View File

@ -7,8 +7,6 @@
#include "EnumEntry.h"
#include "LaunchViewModel.h"
#include <LibraryResources.h>
using namespace winrt::Windows::UI::Xaml;
using namespace winrt::Windows::UI::Xaml::Navigation;
using namespace winrt::Windows::Foundation;

View File

@ -6,7 +6,6 @@
#include "LaunchViewModel.g.cpp"
#include "EnumEntry.h"
#include <LibraryResources.h>
#include <WtExeUtils.h>
using namespace winrt::Windows::UI::Xaml::Navigation;

View File

@ -22,7 +22,6 @@
#include "..\types\inc\utils.hpp"
#include <..\WinRTUtils\inc\Utils.h>
#include <LibraryResources.h>
#include <dwmapi.h>
namespace winrt

View File

@ -9,8 +9,6 @@
#include "NewTabMenuViewModel.h"
#include <LibraryResources.h>
using namespace winrt::Windows::UI::Xaml;
using namespace winrt::Windows::UI::Xaml::Navigation;
using namespace winrt::Windows::Foundation;

View File

@ -3,7 +3,6 @@
#include "pch.h"
#include "NewTabMenuViewModel.h"
#include <LibraryResources.h>
#include "NewTabMenuViewModel.g.cpp"
#include "FolderTreeViewEntry.g.cpp"

View File

@ -5,8 +5,6 @@
#include "NullableColorPicker.h"
#include "NullableColorPicker.g.cpp"
#include <LibraryResources.h>
using namespace winrt;
using namespace winrt::Windows::UI;
using namespace winrt::Windows::UI::Xaml;

View File

@ -3,7 +3,6 @@
#include "pch.h"
#include "PreviewConnection.h"
#include <LibraryResources.h>
using namespace ::winrt::Microsoft::Terminal::TerminalConnection;
using namespace ::winrt::Windows::Foundation;

View File

@ -7,7 +7,6 @@
#include "EnumEntry.h"
#include "Appearances.h"
#include <LibraryResources.h>
#include "../WinRTUtils/inc/Utils.h"
#include "../../renderer/base/FontCache.h"
#include "../TerminalSettingsAppAdapterLib/TerminalSettings.h"

View File

@ -7,7 +7,6 @@
#include "ProfileViewModel.h"
#include "EnumEntry.h"
#include <LibraryResources.h>
#include "..\WinRTUtils\inc\Utils.h"
using namespace winrt::Windows::Foundation;

View File

@ -6,7 +6,6 @@
#include "Profiles_Base.g.cpp"
#include "ProfileViewModel.h"
#include <LibraryResources.h>
#include "..\WinRTUtils\inc\Utils.h"
using namespace winrt::Windows::UI::Xaml;

View File

@ -6,7 +6,6 @@
#include "Profiles_Base_Orphaned.g.cpp"
#include "ProfileViewModel.h"
#include <LibraryResources.h>
#include "..\WinRTUtils\inc\Utils.h"
using namespace winrt::Windows::UI::Xaml;

View File

@ -7,7 +7,6 @@
#include "ProfileViewModel.h"
#include "EnumEntry.h"
#include <LibraryResources.h>
#include "..\WinRTUtils\inc\Utils.h"
using namespace winrt::Windows::UI::Xaml::Navigation;

View File

@ -4,7 +4,6 @@
#include "pch.h"
#include "SettingContainer.h"
#include "SettingContainer.g.cpp"
#include "LibraryResources.h"
using namespace winrt::Windows::UI::Xaml;

View File

@ -6,8 +6,6 @@
#include "pch.h"
#include "Utils.h"
#include <LibraryResources.h>
using namespace winrt;
using namespace winrt::Windows::System;
using namespace winrt::Windows::Foundation;

View File

@ -73,3 +73,5 @@ TRACELOGGING_DECLARE_PROVIDER(g_hTerminalSettingsEditorProvider);
#include <cppwinrt_utils.h>
#include <wil/cppwinrt_helpers.h> // must go after the CoreDispatcher type is defined
#include <LibraryResources.h>

View File

@ -7,7 +7,6 @@
#include "JsonUtils.h"
#include "HashUtils.h"
#include <LibraryResources.h>
#include <til/static_map.h>
#include <ScopedResourceLoader.h>

View File

@ -51,7 +51,6 @@
#include "SelectOutputArgs.g.cpp"
#include "ColorSelectionArgs.g.cpp"
#include <LibraryResources.h>
#include <WtExeUtils.h>
#include <ScopedResourceLoader.h>

View File

@ -60,7 +60,6 @@
#include "TerminalSettingsSerializationHelpers.h"
#include <LibraryResources.h>
#include <ScopedResourceLoader.h>
#include "ActionArgsMagic.h"

View File

@ -5,7 +5,6 @@
#include "AllShortcutActions.h"
#include "ActionMap.h"
#include "Command.h"
#include <LibraryResources.h>
#include <til/io.h>
#include "ActionMap.g.cpp"

View File

@ -8,7 +8,6 @@
#include "../../inc/DefaultSettings.h"
#include "DynamicProfileUtils.h"
#include <LibraryResources.h>
using namespace ::Microsoft::Terminal::Settings::Model;
using namespace winrt::Microsoft::Terminal::Settings::Model;

View File

@ -9,7 +9,6 @@
#include "DefaultTerminal.h"
#include "FileUtils.h"
#include <LibraryResources.h>
#include <VersionHelpers.h>
#include <WtExeUtils.h>

View File

@ -4,7 +4,6 @@
#include "pch.h"
#include "CascadiaSettings.h"
#include <LibraryResources.h>
#include <fmt/chrono.h>
#include <shlobj.h>
#include <til/latch.h>

View File

@ -5,7 +5,6 @@
#include "Command.h"
#include "Command.g.cpp"
#include <LibraryResources.h>
#include <til/replace.h>
#include <ScopedResourceLoader.h>

View File

@ -5,8 +5,6 @@
#include "DefaultTerminal.h"
#include "DefaultTerminal.g.cpp"
#include <LibraryResources.h>
using namespace winrt::Microsoft::Terminal::Settings;
using namespace winrt::Microsoft::Terminal::Settings::Model::implementation;

View File

@ -11,8 +11,6 @@
#include "MediaResourceSupport.h"
#include <LibraryResources.h>
using namespace Microsoft::Terminal::Settings::Model;
using namespace winrt::Microsoft::Terminal::Settings::Model::implementation;
using namespace winrt::Windows::UI::Xaml;

View File

@ -15,7 +15,6 @@
#include <winrt/Windows.Management.Deployment.h>
#include <appmodel.h>
#include <shlobj.h>
#include <LibraryResources.h>
static constexpr std::wstring_view POWERSHELL_PFN{ L"Microsoft.PowerShell_8wekyb3d8bbwe" };
static constexpr std::wstring_view POWERSHELL_PREVIEW_PFN{ L"Microsoft.PowerShellPreview_8wekyb3d8bbwe" };

View File

@ -7,7 +7,6 @@
#include "../../inc/DefaultSettings.h"
#include "DynamicProfileUtils.h"
#include <LibraryResources.h>
static constexpr std::wstring_view SshHostGeneratorNamespace{ L"Windows.Terminal.SSH" };

View File

@ -6,7 +6,6 @@
#include "VisualStudioGenerator.h"
#include "VsDevCmdGenerator.h"
#include "VsDevShellGenerator.h"
#include <LibraryResources.h>
using namespace winrt::Microsoft::Terminal::Settings::Model;

View File

@ -8,7 +8,6 @@
#include "../../inc/DefaultSettings.h"
#include "DynamicProfileUtils.h"
#include <LibraryResources.h>
static constexpr std::wstring_view WslHomeDirectory{ L"~" };
static constexpr std::wstring_view DockerDistributionPrefix{ L"docker-desktop" };

View File

@ -2,7 +2,6 @@
// Licensed under the MIT license.
#include "pch.h"
#include <LibraryResources.h>
#include <WilErrorReporting.h>
// Note: Generate GUID using TlgGuid.exe tool

View File

@ -64,3 +64,5 @@ TRACELOGGING_DECLARE_PROVIDER(g_hSettingsModelProvider);
#include <cppwinrt_utils.h>
#include <wil/cppwinrt_helpers.h> // must go after the CoreDispatcher type is defined
#include <LibraryResources.h>

View File

@ -4,8 +4,6 @@
#include "pch.h"
#include "TextMenuFlyout.h"
#include <LibraryResources.h>
#include "TextMenuFlyout.g.cpp"
using namespace ::winrt::Windows::UI::Xaml;

View File

@ -3,8 +3,6 @@
#include "pch.h"
#include <LibraryResources.h>
#pragma warning(suppress : 26440) // Not interested in changing the specification of DllMain to make it noexcept given it's an interface to the OS.
BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD reason, LPVOID /*reserved*/)
{

View File

@ -43,3 +43,5 @@
#include <cppwinrt_utils.h>
#include <wil/cppwinrt_helpers.h> // must go after the CoreDispatcher type is defined
#include <LibraryResources.h>

View File

@ -3,7 +3,6 @@
#include "pch.h"
#include "CodeBlock.h"
#include <LibraryResources.h>
#include "CodeBlock.g.cpp"
#include "RequestRunCommandsArgs.g.cpp"

View File

@ -43,3 +43,5 @@
#include <cppwinrt_utils.h>
#include <wil/cppwinrt_helpers.h> // must go after the CoreDispatcher type is defined
#include <LibraryResources.h>

View File

@ -61,6 +61,11 @@
_ConsoleGenerateAdditionalWinmdManifests step won't gather the winmd's -->
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\dll\TerminalControl.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\WinRTUtils\WinRTUtils.vcxproj">
<Project>{CA5CAD1A-039A-4929-BA2A-8BEB2E4106FE}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<!-- ========================= Globals ======================== -->

View File

@ -5,7 +5,6 @@
#include "WindowEmperor.h"
#include <CoreWindow.h>
#include <LibraryResources.h>
#include <ScopedResourceLoader.h>
#include <WtExeUtils.h>
#include <til/hash.h>

View File

@ -28,7 +28,6 @@ TRACELOGGING_DEFINE_PROVIDER(
// we still need to be able to localize strings for the notification icon menu. Anything
// you want localized for WindowsTerminal.exe should be stuck in
// ...\TerminalApp\Resources\en-US\Resources.resw
#include <LibraryResources.h>
UTILS_DEFINE_LIBRARY_RESOURCE_SCOPE(L"TerminalApp/Resources");
// Routine Description:

View File

@ -95,3 +95,5 @@ TRACELOGGING_DECLARE_PROVIDER(g_hWindowsTerminalProvider);
#include <cppwinrt_utils.h>
#include <wil/cppwinrt_helpers.h> // must go after the CoreDispatcher type is defined
#include <LibraryResources.h>