2608e94822
Introduces a new TerminalSettingsModel (TSM) project. This project is responsible for (de)serializing and exposing Windows Terminal's settings as WinRT objects. ## References #885: TSM epic #1564: Settings UI is dependent on this for data binding and settings access #6904: TSM Spec In the process of ripping out TSM from TerminalApp, a few other changes were made to make this possible: 1. AppLogic's `ApplicationDisplayName` and `ApplicationVersion` was moved to `CascadiaSettings` - These are defined as static functions. They also no longer check if `AppLogic::Current()` is nullptr. 2. `enum LaunchMode` was moved from TerminalApp to TSM 3. `AzureConnectionType` and `TelnetConnectionType` were moved from the profile generators to their respective TerminalConnections 4. CascadiaSettings' `SettingsPath` and `DefaultSettingsPath` are exposed as `hstring` instead of `std::filesystem::path` 5. `Command::ExpandCommands()` was exposed via the IDL - This required some of the warnings to be saved to an `IVector` instead of `std::vector`, among some other small changes. 6. The localization resources had to be split into two halves. - Resource file linked in init.cpp. Verified at runtime thanks to the StaticResourceLoader. 7. Added constructors to some `ActionArgs` 8. Utils.h/cpp were moved to `cascadia/inc`. `JsonKey()` was moved to `JsonUtils`. Both TermApp and TSM need access to Utils.h/cpp. A large amount of work includes moving to the new namespace (`TerminalApp` --> `Microsoft::Terminal::Settings::Model`). Fixing the tests had its own complications. Testing required us to split up TSM into a DLL and LIB, similar to TermApp. Discussion on creating a non-local test variant can be found in #7743. Closes #885
72 lines
2.2 KiB
C
72 lines
2.2 KiB
C
/*++
|
|
Copyright (c) Microsoft Corporation
|
|
Licensed under the MIT license.
|
|
|
|
Module Name:
|
|
- precomp.h
|
|
|
|
Abstract:
|
|
- Contains external headers to include in the precompile phase of console build process.
|
|
- Avoid including internal project headers. Instead include them only in the classes that need them (helps with test project building).
|
|
|
|
Author(s):
|
|
- Carlos Zamora (cazamor) April 2019
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
// Manually include til after we include Windows.Foundation to give it winrt superpowers
|
|
#define BLOCK_TIL
|
|
// This includes support libraries from the CRT, STL, WIL, and GSL
|
|
#include "LibraryIncludes.h"
|
|
// This is inexplicable, but for whatever reason, cppwinrt conflicts with the
|
|
// SDK definition of this function, so the only fix is to undef it.
|
|
// from WinBase.h
|
|
// Windows::UI::Xaml::Media::Animation::IStoryboard::GetCurrentTime
|
|
#ifdef GetCurrentTime
|
|
#undef GetCurrentTime
|
|
#endif
|
|
|
|
#include <wil/cppwinrt.h>
|
|
#include <unknwn.h>
|
|
#include <hstring.h>
|
|
|
|
#include <WexTestClass.h>
|
|
#include <json.h>
|
|
#include "consoletaeftemplates.hpp"
|
|
|
|
#include <winrt/Windows.ApplicationModel.Resources.Core.h>
|
|
#include "winrt/Windows.UI.Xaml.Markup.h"
|
|
#include <winrt/Windows.system.h>
|
|
#include <winrt/Windows.Foundation.h>
|
|
#include <winrt/Windows.Foundation.Collections.h>
|
|
#include <winrt/windows.ui.core.h>
|
|
#include <winrt/Windows.ui.input.h>
|
|
#include <winrt/Windows.UI.Xaml.Controls.h>
|
|
#include <winrt/Windows.UI.Xaml.Controls.Primitives.h>
|
|
#include <winrt/Windows.ui.xaml.media.h>
|
|
#include <winrt/Windows.ui.xaml.input.h>
|
|
#include <winrt/Windows.UI.Xaml.Markup.h>
|
|
#include <winrt/Windows.UI.Xaml.Documents.h>
|
|
|
|
#include <windows.ui.xaml.media.dxinterop.h>
|
|
|
|
#include <winrt/windows.applicationmodel.core.h>
|
|
|
|
#include <winrt/Microsoft.Terminal.TerminalConnection.h>
|
|
#include <winrt/Microsoft.Terminal.Settings.Model.h>
|
|
|
|
#include <winrt/Microsoft.UI.Xaml.Controls.h>
|
|
|
|
#include <regex>
|
|
#include <CLI11/CLI11.hpp>
|
|
|
|
// Manually include til after we include Windows.Foundation to give it winrt superpowers
|
|
#include "til.h"
|
|
|
|
// Common includes for most tests:
|
|
#include "../../inc/argb.h"
|
|
#include "../../inc/conattrs.hpp"
|
|
#include "../../types/inc/utils.hpp"
|
|
#include "../../inc/DefaultSettings.h"
|