Get all the projects created and hooked up to the sln
This commit is contained in:
parent
551cc9a98b
commit
3bef7bbb38
105
OpenConsole.sln
105
OpenConsole.sln
|
@ -323,6 +323,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.Settings
|
|||
{CA5CAD1A-082C-4476-9F33-94B339494076} = {CA5CAD1A-082C-4476-9F33-94B339494076}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
||||
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.Settings.Model.Lib", "src\cascadia\TerminalSettingsModel\Microsoft.Terminal.Settings.ModelLib.vcxproj", "{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED} = {CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}
|
||||
|
@ -341,6 +343,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LocalTests_SettingsModel",
|
|||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
||||
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.Remoting.Lib", "src\cascadia\Remoting\Microsoft.Terminal.RemotingLib.vcxproj", "{43ce4ce5-0010-4b99-9569-672670d26e26}"
|
||||
EndProject
|
||||
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.Remoting", "src\cascadia\Remoting\dll\Microsoft.Terminal.Remoting.vcxproj", "{27b5aaeb-a548-44cf-9777-f8baa32af7ae}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26} = {43ce4ce5-0010-4b99-9569-672670d26e26}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LocalTests_Remoting", "src\cascadia\LocalTests_Remoting\Remoting.LocalTests.vcxproj", "{68a10cd3-aa64-465b-af5f-ed4e9700543c}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae} = {27b5aaeb-a548-44cf-9777-f8baa32af7ae}
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26} = {43ce4ce5-0010-4b99-9569-672670d26e26}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
||||
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
AuditMode|Any CPU = AuditMode|Any CPU
|
||||
|
@ -2137,6 +2158,87 @@ Global
|
|||
{CA5CAD1A-9B68-456A-B13E-C8218070DC42}.Release|x64.Build.0 = Release|x64
|
||||
{CA5CAD1A-9B68-456A-B13E-C8218070DC42}.Release|x86.ActiveCfg = Release|Win32
|
||||
{CA5CAD1A-9B68-456A-B13E-C8218070DC42}.Release|x86.Build.0 = Release|Win32
|
||||
|
||||
|
||||
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.AuditMode|Any CPU.ActiveCfg = AuditMode|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.AuditMode|ARM64.ActiveCfg = AuditMode|ARM64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.AuditMode|ARM64.Build.0 = AuditMode|ARM64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.AuditMode|x64.ActiveCfg = Release|x64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.AuditMode|x86.ActiveCfg = AuditMode|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.AuditMode|x86.Build.0 = AuditMode|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|DotNet_x64Test.ActiveCfg = Debug|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|DotNet_x86Test.ActiveCfg = Debug|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|x64.Build.0 = Debug|x64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Debug|x86.Build.0 = Debug|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|DotNet_x64Test.ActiveCfg = Release|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|DotNet_x86Test.ActiveCfg = Release|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|x64.ActiveCfg = Release|x64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|x64.Build.0 = Release|x64
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|x86.ActiveCfg = Release|Win32
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26}.Release|x86.Build.0 = Release|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.AuditMode|Any CPU.ActiveCfg = AuditMode|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.AuditMode|ARM64.ActiveCfg = AuditMode|ARM64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.AuditMode|ARM64.Build.0 = AuditMode|ARM64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.AuditMode|x64.ActiveCfg = Release|x64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.AuditMode|x86.ActiveCfg = AuditMode|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.AuditMode|x86.Build.0 = AuditMode|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|DotNet_x64Test.ActiveCfg = Debug|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|DotNet_x86Test.ActiveCfg = Debug|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|x64.Build.0 = Debug|x64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Debug|x86.Build.0 = Debug|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|DotNet_x64Test.ActiveCfg = Release|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|DotNet_x86Test.ActiveCfg = Release|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|x64.ActiveCfg = Release|x64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|x64.Build.0 = Release|x64
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|x86.ActiveCfg = Release|Win32
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae}.Release|x86.Build.0 = Release|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.AuditMode|Any CPU.ActiveCfg = AuditMode|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.AuditMode|ARM64.ActiveCfg = AuditMode|ARM64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.AuditMode|ARM64.Build.0 = AuditMode|ARM64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.AuditMode|DotNet_x64Test.ActiveCfg = AuditMode|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.AuditMode|DotNet_x86Test.ActiveCfg = AuditMode|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.AuditMode|x64.ActiveCfg = AuditMode|x64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.AuditMode|x86.ActiveCfg = AuditMode|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.AuditMode|x86.Build.0 = AuditMode|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|DotNet_x64Test.ActiveCfg = Debug|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|DotNet_x86Test.ActiveCfg = Debug|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|x64.Build.0 = Debug|x64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Debug|x86.Build.0 = Debug|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|DotNet_x64Test.ActiveCfg = Release|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|DotNet_x86Test.ActiveCfg = Release|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|x64.ActiveCfg = Release|x64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|x64.Build.0 = Release|x64
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|x86.ActiveCfg = Release|Win32
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -2221,6 +2323,9 @@ Global
|
|||
{CA5CAD1A-D7EC-4107-B7C6-79CB77AE2907} = {59840756-302F-44DF-AA47-441A9D673202}
|
||||
{CA5CAD1A-082C-4476-9F33-94B339494076} = {59840756-302F-44DF-AA47-441A9D673202}
|
||||
{CA5CAD1A-9B68-456A-B13E-C8218070DC42} = {BDB237B6-1D1D-400F-84CC-40A58FA59C8E}
|
||||
{43ce4ce5-0010-4b99-9569-672670d26e26} = {59840756-302F-44DF-AA47-441A9D673202}
|
||||
{27b5aaeb-a548-44cf-9777-f8baa32af7ae} = {59840756-302F-44DF-AA47-441A9D673202}
|
||||
{68a10cd3-aa64-465b-af5f-ed4e9700543c} = {BDB237B6-1D1D-400F-84CC-40A58FA59C8E}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {3140B1B7-C8EE-43D1-A772-D82A7061A271}
|
||||
|
|
3
src/cascadia/LocalTests_Remoting/LocalTests_Remoting.def
Normal file
3
src/cascadia/LocalTests_Remoting/LocalTests_Remoting.def
Normal file
|
@ -0,0 +1,3 @@
|
|||
EXPORTS
|
||||
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
|
||||
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
|
78
src/cascadia/LocalTests_Remoting/Remoting.LocalTests.vcxproj
Normal file
78
src/cascadia/LocalTests_Remoting/Remoting.LocalTests.vcxproj
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<!-- A note about this project: We're building the test code dll from this
|
||||
project, but it _MUST_ be run in conjunction with the TestHostApp project.
|
||||
TestHostApp actually will build a TestHost executable and packaging bits
|
||||
that we can use to run our tests. We need TestHostApp so that our
|
||||
dependencies, like MUX, can be aggregated correctly, and resources properly
|
||||
combined into a resources.pri file.
|
||||
|
||||
TestHostApp will manually copy the output of this project into it's own
|
||||
OutDir, so we can run the tests from there. -->
|
||||
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{68a10cd3-aa64-465b-af5f-ed4e9700543c}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>RemotingLocalTests</RootNamespace>
|
||||
<ProjectName>LocalTests_Remoting</ProjectName>
|
||||
<TargetName>Remoting.LocalTests</TargetName>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<OpenConsoleCppWinRTProject>true</OpenConsoleCppWinRTProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(SolutionDir)\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
||||
<Import Project="$(OpenConsoleDir)\src\cppwinrt.build.pre.props" />
|
||||
|
||||
<!-- ========================= Headers ======================== -->
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ========================= Cpp Files ======================== -->
|
||||
<ItemGroup>
|
||||
<ClCompile Include="RemotingTests.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ========================= Project References ======================== -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(OpenConsoleDir)\src\cascadia\Remoting\Microsoft.Terminal.RemotingLib.vcxproj" />
|
||||
<ProjectReference Include="$(OpenConsoleDir)\src\types\lib\types.vcxproj" />
|
||||
|
||||
<!-- If you don't reference these projects here, the
|
||||
_ConsoleGenerateAdditionalWinmdManifests step won't gather the winmd's -->
|
||||
<ProjectReference Include="$(OpenConsoleDir)\src\cascadia\Remoting\dll\Microsoft.Terminal.Remoting.vcxproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ========================= Globals ======================== -->
|
||||
|
||||
<!-- ====================== Compiler & Linker Flags ===================== -->
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..;$(OpenConsoleDir)\dep;$(OpenConsoleDir)\dep\jsoncpp\json;$(OpenConsoleDir)src\inc;$(OpenConsoleDir)src\inc\test;$(WinRT_IncludePath)\..\cppwinrt\winrt;"$(OpenConsoleDir)\src\cascadia\Remoting\Generated Files";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
|
||||
<!-- Manually disable unreachable code warning, because jconcpp has a ton of that. -->
|
||||
<DisableSpecificWarnings>4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>onecoreuap.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<GenerateManifest>true</GenerateManifest>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
||||
<Import Project="$(OpenConsoleDir)src\common.build.post.props" />
|
||||
<Import Project="$(OpenConsoleDir)src\common.build.tests.props" />
|
||||
|
||||
|
||||
</Project>
|
295
src/cascadia/LocalTests_Remoting/RemotingTests.cpp
Normal file
295
src/cascadia/LocalTests_Remoting/RemotingTests.cpp
Normal file
|
@ -0,0 +1,295 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
#include "../TerminalSettingsModel/ColorScheme.h"
|
||||
#include "../TerminalSettingsModel/CascadiaSettings.h"
|
||||
#include "JsonTestClass.h"
|
||||
#include "TestUtils.h"
|
||||
#include <defaults.h>
|
||||
#include "../ut_app/TestDynamicProfileGenerator.h"
|
||||
|
||||
using namespace Microsoft::Console;
|
||||
using namespace WEX::Logging;
|
||||
using namespace WEX::TestExecution;
|
||||
using namespace WEX::Common;
|
||||
using namespace winrt::Microsoft::Terminal::Settings::Model;
|
||||
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||
|
||||
namespace SettingsModelLocalTests
|
||||
{
|
||||
// TODO:microsoft/terminal#3838:
|
||||
// Unfortunately, these tests _WILL NOT_ work in our CI. We're waiting for
|
||||
// an updated TAEF that will let us install framework packages when the test
|
||||
// package is deployed. Until then, these tests won't deploy in CI.
|
||||
|
||||
class SerializationTests : public JsonTestClass
|
||||
{
|
||||
// Use a custom AppxManifest to ensure that we can activate winrt types
|
||||
// from our test. This property will tell taef to manually use this as
|
||||
// the AppxManifest for this test class.
|
||||
// This does not yet work for anything XAML-y. See TabTests.cpp for more
|
||||
// details on that.
|
||||
BEGIN_TEST_CLASS(SerializationTests)
|
||||
TEST_CLASS_PROPERTY(L"RunAs", L"UAP")
|
||||
TEST_CLASS_PROPERTY(L"UAP:AppXManifest", L"TestHostAppXManifest.xml")
|
||||
END_TEST_CLASS()
|
||||
|
||||
TEST_METHOD(GlobalSettings);
|
||||
TEST_METHOD(Profile);
|
||||
TEST_METHOD(ColorScheme);
|
||||
TEST_METHOD(CascadiaSettings);
|
||||
|
||||
TEST_CLASS_SETUP(ClassSetup)
|
||||
{
|
||||
InitializeJsonReader();
|
||||
InitializeJsonWriter();
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
// Method Description:
|
||||
// - deserializes and reserializes a json string representing a settings object model of type T
|
||||
// - verifies that the generated json string matches the provided one
|
||||
// Template Types:
|
||||
// - <T>: The type of Settings Model object to generate (must be impl type)
|
||||
// Arguments:
|
||||
// - jsonString - JSON string we're performing the test on
|
||||
// Return Value:
|
||||
// - the JsonObject representing this instance
|
||||
template<typename T>
|
||||
void RoundtripTest(const std::string& jsonString)
|
||||
{
|
||||
const auto json{ VerifyParseSucceeded(jsonString) };
|
||||
const auto settings{ T::FromJson(json) };
|
||||
const auto result{ settings->ToJson() };
|
||||
|
||||
// Compare toString(json) instead of jsonString here.
|
||||
// The toString writes the json out alphabetically.
|
||||
// This trick allows jsonString to _not_ have to be
|
||||
// written alphabetically.
|
||||
VERIFY_ARE_EQUAL(toString(json), toString(result));
|
||||
}
|
||||
};
|
||||
|
||||
void SerializationTests::GlobalSettings()
|
||||
{
|
||||
const std::string globalsString{ R"(
|
||||
{
|
||||
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
|
||||
|
||||
"initialRows": 30,
|
||||
"initialCols": 120,
|
||||
"initialPosition": ",",
|
||||
"launchMode": "default",
|
||||
"alwaysOnTop": false,
|
||||
|
||||
"copyOnSelect": false,
|
||||
"copyFormatting": "all",
|
||||
"wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502",
|
||||
|
||||
"alwaysShowTabs": true,
|
||||
"showTabsInTitlebar": true,
|
||||
"showTerminalTitleInTitlebar": true,
|
||||
"tabWidthMode": "equal",
|
||||
"tabSwitcherMode": "mru",
|
||||
|
||||
"startOnUserLogin": false,
|
||||
"theme": "system",
|
||||
"snapToGridOnResize": true,
|
||||
"disableAnimations": false,
|
||||
|
||||
"confirmCloseAllTabs": true,
|
||||
"largePasteWarning": true,
|
||||
"multiLinePasteWarning": true,
|
||||
|
||||
"experimental.input.forceVT": false,
|
||||
"experimental.rendering.forceFullRepaint": false,
|
||||
"experimental.rendering.software": false
|
||||
})" };
|
||||
|
||||
const std::string smallGlobalsString{ R"(
|
||||
{
|
||||
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}"
|
||||
})" };
|
||||
|
||||
RoundtripTest<implementation::GlobalAppSettings>(globalsString);
|
||||
RoundtripTest<implementation::GlobalAppSettings>(smallGlobalsString);
|
||||
}
|
||||
|
||||
void SerializationTests::Profile()
|
||||
{
|
||||
const std::string profileString{ R"(
|
||||
{
|
||||
"name": "Windows PowerShell",
|
||||
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
|
||||
|
||||
"commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
|
||||
"startingDirectory": "%USERPROFILE%",
|
||||
|
||||
"icon": "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
|
||||
"hidden": false,
|
||||
|
||||
"tabTitle": "Cool Tab",
|
||||
"suppressApplicationTitle": false,
|
||||
|
||||
"fontFace": "Cascadia Mono",
|
||||
"fontSize": 12,
|
||||
"fontWeight": "normal",
|
||||
"padding": "8, 8, 8, 8",
|
||||
"antialiasingMode": "grayscale",
|
||||
|
||||
"cursorShape": "bar",
|
||||
"cursorColor": "#CCBBAA",
|
||||
"cursorHeight": 10,
|
||||
|
||||
"altGrAliasing": true,
|
||||
|
||||
"colorScheme": "Campbell",
|
||||
"tabColor": "#0C0C0C",
|
||||
"foreground": "#AABBCC",
|
||||
"background": "#BBCCAA",
|
||||
"selectionBackground": "#CCAABB",
|
||||
|
||||
"useAcrylic": false,
|
||||
"acrylicOpacity": 0.5,
|
||||
|
||||
"backgroundImage": "made_you_look.jpeg",
|
||||
"backgroundImageStretchMode": "uniformToFill",
|
||||
"backgroundImageAlignment": "center",
|
||||
"backgroundImageOpacity": 1.0,
|
||||
|
||||
"scrollbarState": "visible",
|
||||
"snapOnInput": true,
|
||||
"historySize": 9001,
|
||||
|
||||
"closeOnExit": "graceful",
|
||||
"experimental.retroTerminalEffect": false
|
||||
})" };
|
||||
|
||||
const std::string smallProfileString{ R"(
|
||||
{
|
||||
"name": "Custom Profile"
|
||||
})" };
|
||||
|
||||
// Setting "tabColor" to null tests two things:
|
||||
// - null should count as an explicit user-set value, not falling back to the parent's value
|
||||
// - null should be acceptable even though we're working with colors
|
||||
const std::string weirdProfileString{ R"(
|
||||
{
|
||||
"name": "Weird Profile",
|
||||
"tabColor": null,
|
||||
"foreground": null,
|
||||
"source": "local"
|
||||
})" };
|
||||
|
||||
RoundtripTest<implementation::Profile>(profileString);
|
||||
RoundtripTest<implementation::Profile>(smallProfileString);
|
||||
RoundtripTest<implementation::Profile>(weirdProfileString);
|
||||
}
|
||||
|
||||
void SerializationTests::ColorScheme()
|
||||
{
|
||||
const std::string schemeString{ R"({
|
||||
"name": "Campbell",
|
||||
|
||||
"cursorColor": "#FFFFFF",
|
||||
"selectionBackground": "#131313",
|
||||
|
||||
"background": "#0C0C0C",
|
||||
"foreground": "#F2F2F2",
|
||||
|
||||
"black": "#0C0C0C",
|
||||
"blue": "#0037DA",
|
||||
"cyan": "#3A96DD",
|
||||
"green": "#13A10E",
|
||||
"purple": "#881798",
|
||||
"red": "#C50F1F",
|
||||
"white": "#CCCCCC",
|
||||
"yellow": "#C19C00",
|
||||
"brightBlack": "#767676",
|
||||
"brightBlue": "#3B78FF",
|
||||
"brightCyan": "#61D6D6",
|
||||
"brightGreen": "#16C60C",
|
||||
"brightPurple": "#B4009E",
|
||||
"brightRed": "#E74856",
|
||||
"brightWhite": "#F2F2F2",
|
||||
"brightYellow": "#F9F1A5"
|
||||
})" };
|
||||
|
||||
RoundtripTest<implementation::ColorScheme>(schemeString);
|
||||
}
|
||||
|
||||
void SerializationTests::CascadiaSettings()
|
||||
{
|
||||
const std::string settingsString{ R"({
|
||||
"$schema": "https://aka.ms/terminal-profiles-schema",
|
||||
"defaultProfile": "{61c54bbd-1111-5271-96e7-009a87ff44bf}",
|
||||
|
||||
"profiles": {
|
||||
"defaults": {
|
||||
"fontFace": "Zamora Code"
|
||||
},
|
||||
"list": [
|
||||
{
|
||||
"fontFace": "Cascadia Code",
|
||||
"guid": "{61c54bbd-1111-5271-96e7-009a87ff44bf}",
|
||||
"name": "HowettShell"
|
||||
},
|
||||
{
|
||||
"hidden": true,
|
||||
"name": "BhojwaniShell"
|
||||
},
|
||||
{
|
||||
"antialiasingMode": "aliased",
|
||||
"name": "NiksaShell"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schemes": [
|
||||
{
|
||||
"name": "Cinnamon Roll",
|
||||
|
||||
"cursorColor": "#FFFFFD",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
|
||||
"background": "#3C0315",
|
||||
"foreground": "#FFFFFD",
|
||||
|
||||
"black": "#282A2E",
|
||||
"blue": "#0170C5",
|
||||
"cyan": "#3F8D83",
|
||||
"green": "#76AB23",
|
||||
"purple": "#7D498F",
|
||||
"red": "#BD0940",
|
||||
"white": "#FFFFFD",
|
||||
"yellow": "#E0DE48",
|
||||
"brightBlack": "#676E7A",
|
||||
"brightBlue": "#5C98C5",
|
||||
"brightCyan": "#8ABEB7",
|
||||
"brightGreen": "#B5D680",
|
||||
"brightPurple": "#AC79BB",
|
||||
"brightRed": "#BD6D85",
|
||||
"brightWhite": "#FFFFFD",
|
||||
"brightYellow": "#FFFD76"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{"command": { "action": "renameTab","input": "Liang Tab" },"keys": "ctrl+t" }
|
||||
],
|
||||
"keybindings": [
|
||||
{ "command": { "action": "sendInput","input": "VT Griese Mode" },"keys": "ctrl+k" }
|
||||
]
|
||||
})" };
|
||||
|
||||
auto settings{ winrt::make_self<implementation::CascadiaSettings>(false) };
|
||||
settings->_ParseJsonString(settingsString, false);
|
||||
settings->_ApplyDefaultsFromUserSettings();
|
||||
settings->LayerJson(settings->_userSettings);
|
||||
settings->_ValidateSettings();
|
||||
|
||||
const auto result{ settings->ToJson() };
|
||||
VERIFY_ARE_EQUAL(toString(settings->_userSettings), toString(result));
|
||||
}
|
||||
}
|
4
src/cascadia/LocalTests_Remoting/pch.cpp
Normal file
4
src/cascadia/LocalTests_Remoting/pch.cpp
Normal file
|
@ -0,0 +1,4 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
40
src/cascadia/LocalTests_Remoting/pch.h
Normal file
40
src/cascadia/LocalTests_Remoting/pch.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*++
|
||||
Copyright (c) Microsoft Corporation
|
||||
Licensed under the MIT license.
|
||||
--*/
|
||||
|
||||
#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.system.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
|
||||
// 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"
|
87
src/cascadia/Remoting/Microsoft.Terminal.RemotingLib.vcxproj
Normal file
87
src/cascadia/Remoting/Microsoft.Terminal.RemotingLib.vcxproj
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{43ce4ce5-0010-4b99-9569-672670d26e26}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>Microsoft.Terminal.Remoting.Lib</ProjectName>
|
||||
<RootNamespace>Microsoft.Terminal.Remoting</RootNamespace>
|
||||
<TargetName>Microsoft.Terminal.Remoting.Lib</TargetName>
|
||||
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OpenConsoleUniversalApp>true</OpenConsoleUniversalApp>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
||||
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
|
||||
|
||||
<!-- ========================= Headers ======================== -->
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Monarch.h">
|
||||
<DependentUpon>Monarch.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="MonarchFactory.h" />
|
||||
<ClInclude Include="Peasant.h">
|
||||
<DependentUpon>Peasant.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<!-- ========================= Cpp Files ======================== -->
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Monarch.cpp">
|
||||
<DependentUpon>Monarch.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Peasant.cpp">
|
||||
<DependentUpon>Peasant.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= idl Files ======================== -->
|
||||
<ItemGroup>
|
||||
<Midl Include="Monarch.idl" />
|
||||
<Midl Include="Peasant.idl" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Misc Files ======================== -->
|
||||
<ItemGroup>
|
||||
<PRIResource Include="Resources\en-US\Resources.resw" />
|
||||
<OCResourceDirectory Include="Resources" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Project References ======================== -->
|
||||
<ItemGroup>
|
||||
<!--
|
||||
the packaging project won't recurse through our dependencies, you have to
|
||||
make sure that if you add a cppwinrt dependency to any of these projects,
|
||||
you also update all the consumers
|
||||
-->
|
||||
<ProjectReference Include="$(OpenConsoleDir)src\types\lib\types.vcxproj" />
|
||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\WinRTUtils\WinRTUtils.vcxproj">
|
||||
<Project>{CA5CAD1A-039A-4929-BA2A-8BEB2E4106FE}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<!-- For whatever reason, we can't include the TerminalControl and
|
||||
TerminalSettings projects' winmds via project references. So we'll have to
|
||||
manually include the winmds as References below -->
|
||||
</ItemGroup>
|
||||
<!-- ====================== Compiler & Linker Flags ===================== -->
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>..;$(OpenConsoleDir)\dep\jsoncpp\json;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
||||
<!-- Manually disable unreachable code warning, because jconcpp has a ton of that. -->
|
||||
<DisableSpecificWarnings>4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>WindowsApp.lib;user32.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Reference>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemDefinitionGroup>
|
||||
<!-- ========================= Globals ======================== -->
|
||||
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
|
||||
|
||||
<Import Project="$(SolutionDir)build\rules\CollectWildcardResources.targets" />
|
||||
</Project>
|
120
src/cascadia/Remoting/Resources/en-US/Resources.resw
Normal file
120
src/cascadia/Remoting/Resources/en-US/Resources.resw
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -0,0 +1,3 @@
|
|||
EXPORTS
|
||||
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
|
||||
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{27b5aaeb-a548-44cf-9777-f8baa32af7ae}</ProjectGuid>
|
||||
<ProjectName>Microsoft.Terminal.Remoting</ProjectName>
|
||||
<RootNamespace>Microsoft.Terminal.Remoting</RootNamespace>
|
||||
<!-- cppwinrt.build.pre.props depends on these settings: -->
|
||||
<!-- build a dll, not exe (Application) -->
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<!-- sets a bunch of Windows Universal properties -->
|
||||
<OpenConsoleUniversalApp>true</OpenConsoleUniversalApp>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
|
||||
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
|
||||
<!-- ========================= XAML files ======================== -->
|
||||
<ItemGroup>
|
||||
<!-- DON'T PUT XAML FILES HERE! Put them in TerminalAppLib.vcxproj -->
|
||||
</ItemGroup>
|
||||
<!-- ========================= Headers ======================== -->
|
||||
<ItemGroup>
|
||||
<!-- Only put headers for winrt types in here. Don't put other header files
|
||||
in here - put them in the lib's vcxproj instead! -->
|
||||
<ClInclude Include="../Monarch.h" />
|
||||
<ClInclude Include="../Peasant.h" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Cpp Files ======================== -->
|
||||
<!-- Don't put source files in here - put them in the lib's vcxproj instead! -->
|
||||
<!-- ========================= idl Files ======================== -->
|
||||
<ItemGroup>
|
||||
<!-- DON'T PUT IDL FILES HERE! Put them in the lib's vcxproj -->
|
||||
</ItemGroup>
|
||||
<!-- ========================= Misc Files ======================== -->
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Microsoft.Terminal.Remoting.def" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Project References ======================== -->
|
||||
<ItemGroup>
|
||||
<!--
|
||||
the packaging project won't recurse through our dependencies, you have to
|
||||
make sure that if you add a cppwinrt dependency to any of these projects,
|
||||
you also update all the consumers
|
||||
-->
|
||||
<ProjectReference Include="$(OpenConsoleDir)src\types\lib\types.vcxproj">
|
||||
<Project>{18D09A24-8240-42D6-8CB6-236EEE820263}</Project>
|
||||
</ProjectReference>
|
||||
<!-- Reference Microsoft.Terminal.RemotingLib here, so we can use it's winmd as
|
||||
our winmd. This didn't work correctly in VS2017, you'd need to
|
||||
manually reference the lib -->
|
||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsModel\Microsoft.Terminal.RemotingLib.vcxproj">
|
||||
<Private>true</Private>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(OpenConsoleDir)\dep\jsoncpp\json;%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>User32.lib;WindowsApp.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<!-- TSM Lib contains a DllMain that we need to force the use of. -->
|
||||
<AdditionalOptions Condition="'$(Platform)'=='Win32'">/INCLUDE:_DllMain@12</AdditionalOptions>
|
||||
<AdditionalOptions Condition="'$(Platform)'!='Win32'">/INCLUDE:DllMain</AdditionalOptions>
|
||||
</Link>
|
||||
<Reference>
|
||||
<!-- Do not propagate microsoft.ui.xaml upwards as a private dependency. -->
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
|
||||
</Project>
|
4
src/cascadia/Remoting/packages.config
Normal file
4
src/cascadia/Remoting/packages.config
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.201017.1" targetFramework="native" />
|
||||
</packages>
|
4
src/cascadia/Remoting/pch.cpp
Normal file
4
src/cascadia/Remoting/pch.cpp
Normal file
|
@ -0,0 +1,4 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
48
src/cascadia/Remoting/pch.h
Normal file
48
src/cascadia/Remoting/pch.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// pch.h
|
||||
// Header for platform projection include files
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMCX
|
||||
#define NOHELP
|
||||
#define NOCOMM
|
||||
|
||||
// Manually include til after we include Windows.Foundation to give it winrt superpowers
|
||||
#define BLOCK_TIL
|
||||
#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 <winrt/Windows.ApplicationModel.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
|
||||
#include <winrt/Windows.System.h>
|
||||
|
||||
// Including TraceLogging essentials for the binary
|
||||
#include <TraceLoggingProvider.h>
|
||||
#include <winmeta.h>
|
||||
TRACELOGGING_DECLARE_PROVIDER(g_hSettingsModelProvider);
|
||||
#include <telemetry/ProjectTelemetry.h>
|
||||
#include <TraceLoggingActivity.h>
|
||||
|
||||
#include <shellapi.h>
|
||||
|
||||
// Manually include til after we include Windows.Foundation to give it winrt superpowers
|
||||
#include "til.h"
|
|
@ -77,6 +77,7 @@
|
|||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsModel\dll\Microsoft.Terminal.Settings.Model.vcxproj" />
|
||||
|
||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalApp\dll\TerminalApp.vcxproj" />
|
||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\Remoting\dll\Microsoft.Terminal.Remoting.vcxproj" />
|
||||
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj" />
|
||||
|
||||
<ProjectReference Include="$(OpenConsoleDir)src\types\lib\types.vcxproj" />
|
||||
|
@ -98,7 +99,7 @@
|
|||
|
||||
<Import Project="..\..\..\packages\Microsoft.UI.Xaml.2.5.0-prerelease.201202003\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.2.5.0-prerelease.201202003\build\native\Microsoft.UI.Xaml.targets')" />
|
||||
<Import Project="..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets" Condition="Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets')" />
|
||||
<Import Project="..\..\..\packages\Microsoft.VCRTForwarders.140.1.0.4\build\native\Microsoft.VCRTForwarders.140.targets" Condition="Exists('..\..\..\packages\Microsoft.VCRTForwarders.140.1.0.4\build\native\Microsoft.VCRTForwarders.140.targets')" />
|
||||
<Import Project="..\..\..\packages\Microsoft.VCRTForwarders.140.1.0.4\build\native\Microsoft.VCRTForwarders.140.targets" Condition="Exists('..\..\..\packages\Microsoft.VCRTForwarders.140.1.0.4\build\native\Microsoft.VCRTForwarders.140.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
|
@ -106,7 +107,7 @@
|
|||
<Error Condition="!Exists('..\..\..\packages\Microsoft.UI.Xaml.2.5.0-prerelease.201202003\build\native\Microsoft.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.UI.Xaml.2.5.0-prerelease.201202003\build\native\Microsoft.UI.Xaml.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.VCRTForwarders.140.1.0.4\build\native\Microsoft.VCRTForwarders.140.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.VCRTForwarders.140.1.0.4\build\native\Microsoft.VCRTForwarders.140.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.VCRTForwarders.140.1.0.4\build\native\Microsoft.VCRTForwarders.140.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.VCRTForwarders.140.1.0.4\build\native\Microsoft.VCRTForwarders.140.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\Terminal.ThemeHelpers.0.2.200324001\build\native\Terminal.ThemeHelpers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Terminal.ThemeHelpers.0.2.200324001\build\native\Terminal.ThemeHelpers.targets'))" />
|
||||
</Target>
|
||||
|
||||
|
|
Loading…
Reference in a new issue