This did not work either

I tried just making a dll for JUST the card extension interface, that the TerminalApp could reference and so would the cardextension.exe. That would get rid of the need for MUX? Right?

  This runs into all sorts of weird mdmerge errors that I don't recall how I fixed so FUCK IT I'm abandonning this project
This commit is contained in:
Mike Griese 2021-10-14 11:50:59 -05:00
parent e3b99b3ebf
commit 01d5434afa
18 changed files with 364 additions and 18 deletions

View file

@ -412,6 +412,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CardExtension", "src\cascad
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "CardExtensionPackage", "src\cascadia\CardExtensionPackage\CardExtensionPackage.wapproj", "{4F79071E-22BA-4310-9C08-68A1D31C64D5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICardExtension", "src\cascadia\ICardExtension\ICardExtension.vcxproj", "{2418E803-264A-479C-BFDC-915182BCBF12}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
AuditMode|Any CPU = AuditMode|Any CPU
@ -3453,6 +3455,56 @@ Global
{4F79071E-22BA-4310-9C08-68A1D31C64D5}.Release|x86.ActiveCfg = Release|x86
{4F79071E-22BA-4310-9C08-68A1D31C64D5}.Release|x86.Build.0 = Release|x86
{4F79071E-22BA-4310-9C08-68A1D31C64D5}.Release|x86.Deploy.0 = Release|x86
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|Any CPU.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|Any CPU.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|ARM.ActiveCfg = Debug|ARM
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|ARM.Build.0 = Debug|ARM
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|ARM64.ActiveCfg = Debug|ARM64
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|ARM64.Build.0 = Debug|ARM64
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|DotNet_x64Test.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|DotNet_x64Test.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|DotNet_x86Test.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|DotNet_x86Test.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|x64.ActiveCfg = Debug|x64
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|x64.Build.0 = Debug|x64
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|x86.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.AuditMode|x86.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|Any CPU.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|ARM.ActiveCfg = Debug|ARM
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|ARM.Build.0 = Debug|ARM
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|ARM64.ActiveCfg = Debug|ARM64
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|ARM64.Build.0 = Debug|ARM64
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|DotNet_x64Test.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|DotNet_x86Test.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|x64.ActiveCfg = Debug|x64
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|x64.Build.0 = Debug|x64
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|x86.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Debug|x86.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|Any CPU.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|Any CPU.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|ARM.ActiveCfg = Debug|ARM
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|ARM.Build.0 = Debug|ARM
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|ARM64.ActiveCfg = Debug|ARM64
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|ARM64.Build.0 = Debug|ARM64
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|DotNet_x64Test.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|DotNet_x64Test.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|DotNet_x86Test.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|DotNet_x86Test.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|x64.ActiveCfg = Debug|x64
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|x64.Build.0 = Debug|x64
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|x86.ActiveCfg = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Fuzzing|x86.Build.0 = Debug|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|Any CPU.ActiveCfg = Release|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|ARM.ActiveCfg = Release|ARM
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|ARM.Build.0 = Release|ARM
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|ARM64.ActiveCfg = Release|ARM64
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|ARM64.Build.0 = Release|ARM64
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|DotNet_x64Test.ActiveCfg = Release|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|DotNet_x86Test.ActiveCfg = Release|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|x64.ActiveCfg = Release|x64
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|x64.Build.0 = Release|x64
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|x86.ActiveCfg = Release|Win32
{2418E803-264A-479C-BFDC-915182BCBF12}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -3554,6 +3606,7 @@ Global
{9CF74355-F018-4C19-81AD-9DC6B7F2C6F5} = {89CDCC5C-9F53-4054-97A4-639D99F169CD}
{CA5CAD1A-1234-4A9D-5678-857A9D17CB1B} = {2D17E75D-2DDC-42C4-AD70-704D95A937AE}
{4F79071E-22BA-4310-9C08-68A1D31C64D5} = {2D17E75D-2DDC-42C4-AD70-704D95A937AE}
{2418E803-264A-479C-BFDC-915182BCBF12} = {59840756-302F-44DF-AA47-441A9D673202}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3140B1B7-C8EE-43D1-A772-D82A7061A271}

View file

@ -63,11 +63,12 @@
<ItemGroup>
<!-- Even though we do have proper recursive dependencies, we want to keep some of these here
so that the AppX Manifest contains their activatable classes. -->
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\dll\TerminalControl.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsModel\dll\Microsoft.Terminal.Settings.Model.vcxproj" />
<!-- <ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\dll\TerminalControl.vcxproj" /> -->
<!-- <ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" /> -->
<!-- <ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsModel\dll\Microsoft.Terminal.Settings.Model.vcxproj" /> -->
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\ICardExtension\ICardExtension.vcxproj" />
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalApp\dll\TerminalApp.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\types\lib\types.vcxproj" />
@ -82,14 +83,14 @@
because the Core project is a lib not a dll, so it can't be ProjectReference'd
like everything else. It does get built into TerminalControl.dll, so we don't
need to worry about that. -->
<ItemGroup>
<!-- <ItemGroup>
<Reference Include="Microsoft.Terminal.Core">
<HintPath>$(OpenConsoleCommonOutDir)TerminalCore\Microsoft.Terminal.Core.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
<Private>true</Private>
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
</Reference>
</ItemGroup>
</ItemGroup> -->
<!--
This ItemGroup and the Globals PropertyGroup below it are required in order
to enable F5 debugging for the unpackaged application
@ -104,8 +105,8 @@
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
<Import Project="..\..\..\packages\Microsoft.UI.Xaml.2.6.2-prerelease.210818003\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.2.6.2-prerelease.210818003\build\native\Microsoft.UI.Xaml.targets')" />
<Import Project="..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.3\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets" Condition="Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.3\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets')" />
<!-- <Import Project="..\..\..\packages\Microsoft.UI.Xaml.2.6.2-prerelease.210818003\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.2.6.2-prerelease.210818003\build\native\Microsoft.UI.Xaml.targets')" /> -->
<!-- <Import Project="..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.3\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets" Condition="Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.3\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')" /> -->
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>

View file

@ -0,0 +1,16 @@
#include "pch.h"
#include "Class.h"
#include "Class.g.cpp"
namespace winrt::Microsoft::CardExtension::implementation
{
int32_t Class::MyProperty()
{
throw hresult_not_implemented();
}
void Class::MyProperty(int32_t /* value */)
{
throw hresult_not_implemented();
}
}

View file

@ -0,0 +1,21 @@
#pragma once
#include "Class.g.h"
namespace winrt::Microsoft::CardExtension::implementation
{
struct Class : ClassT<Class>
{
Class() = default;
int32_t MyProperty();
void MyProperty(int32_t value);
};
}
namespace winrt::Microsoft::CardExtension::factory_implementation
{
struct Class : ClassT<Class, implementation::Class>
{
};
}

View file

@ -0,0 +1,9 @@
namespace Microsoft.CardExtension
{
[default_interface]
runtimeclass Class
{
Class();
Int32 MyProperty;
}
}

View file

@ -0,0 +1,3 @@
EXPORTS
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE

View file

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.210806.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.210806.1\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
<MinimalCoreWin>true</MinimalCoreWin>
<ProjectGuid>{2418e803-264a-479c-bfdc-915182bcbf12}</ProjectGuid>
<ProjectName>CardExtension</ProjectName>
<RootNamespace>Microsoft.CardExtension</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.22000.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="PropertySheet.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<WarningLevel>Level4</WarningLevel>
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
<!--Temporarily disable cppwinrt heap enforcement to work around xaml compiler generated std::shared_ptr use -->
<AdditionalOptions Condition="'$(CppWinRTHeapEnforcement)'==''">/DWINRT_NO_MAKE_DETECTION %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<ModuleDefinitionFile>ICardExtension.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="Class.h">
<DependentUpon>Class.idl</DependentUpon>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Class.cpp">
<DependentUpon>Class.idl</DependentUpon>
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<Midl Include="..\TerminalApp\ICardExtension.idl" />
<Midl Include="Class.idl" />
</ItemGroup>
<ItemGroup>
<None Include="ICardExtension.def" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="PropertySheet.props" />
<Text Include="readme.txt">
<DeploymentContent>false</DeploymentContent>
</Text>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.210806.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.210806.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<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>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.210806.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.210806.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.210806.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.210806.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Resources">
<UniqueIdentifier>accd3aa8-1ba0-4223-9bbe-0c431709210b</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{926ab91d-31b4-48c3-b9a4-e681349f27f0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp" />
<ClCompile Include="Class.cpp" />
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<Midl Include="Class.idl" />
<Midl Include="..\TerminalApp\ICardExtension.idl" />
</ItemGroup>
<ItemGroup>
<None Include="ICardExtension.def" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="PropertySheet.props" />
</ItemGroup>
<ItemGroup>
<Text Include="readme.txt" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<!--
To customize common C++/WinRT project properties:
* right-click the project node
* expand the Common Properties item
* select the C++/WinRT property page
For more advanced scenarios, and complete documentation, please see:
https://github.com/Microsoft/cppwinrt/tree/master/nuget
-->
<PropertyGroup />
<ItemDefinitionGroup />
</Project>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.210806.1" targetFramework="native" />
</packages>

View file

@ -0,0 +1 @@
#include "pch.h"

View file

@ -0,0 +1,4 @@
#pragma once
#include <unknwn.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>

View file

@ -0,0 +1,23 @@
========================================================================
C++/WinRT ICardExtension Project Overview
========================================================================
This project demonstrates how to get started authoring Windows Runtime
classes directly with standard C++, using the C++/WinRT SDK component
to generate implementation headers from interface (IDL) files. The
generated Windows Runtime component binary and WinMD files should then
be bundled with the Universal Windows Platform (UWP) app consuming them.
Steps:
1. Create an interface (IDL) file to define your Windows Runtime class,
its default interface, and any other interfaces it implements.
2. Build the project once to generate module.g.cpp, module.h.cpp, and
implementation templates under the "Generated Files" folder, as
well as skeleton class definitions under "Generated Files\sources".
3. Use the skeleton class definitions for reference to implement your
Windows Runtime classes.
========================================================================
Learn more about C++/WinRT here:
http://aka.ms/cppwinrt/
========================================================================

View file

@ -1157,7 +1157,7 @@ namespace winrt::TerminalApp::implementation
};
winrt::guid g{ __uuidof(hack) };
auto iCard = winrt::create_instance<TerminalApp::ICardExtension>(g);
auto iCard = winrt::create_instance<winrt::CardExtension::ICardExtension>(g);
if (iCard)
{
json = iCard.GetJson();

View file

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
namespace TerminalApp
namespace Microsoft.CardExtension
{
interface ICardExtension
{

View file

@ -267,7 +267,6 @@
<Midl Include="ShortcutActionDispatch.idl" />
<Midl Include="AppKeyBindings.idl" />
<Midl Include="AppLogic.idl" />
<Midl Include="ICardExtension.idl" />
<Midl Include="AdaptiveCardContent.idl" />
<Midl Include="TerminalPaneContent.idl" />
<Midl Include="IPaneContent.idl" />
@ -377,6 +376,12 @@
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
</Reference>
<Reference Include="Microsoft.CardExtension">
<HintPath>$(SolutionDir)\$(Platform)\$(Configuration)\ICardExtension\Microsoft.CardExtension.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
</Reference>
</ItemGroup>
<!-- ====================== Compiler & Linker Flags ===================== -->
<ItemDefinitionGroup>
@ -392,7 +397,6 @@
</ItemDefinitionGroup>
<!-- ========================= Globals ======================== -->
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
<Import Project="..\..\..\packages\Microsoft.UI.Xaml.2.7.0-prerelease.210913003\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.2.7.0-prerelease.210913003\build\native\Microsoft.UI.Xaml.targets')" />
<Import Project="..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.3\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets" Condition="Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.3\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets')" />
<Import Project="..\..\..\packages\AdaptiveCards.Rendering.Uwp.2.7.0\build\native\AdaptiveCards.Rendering.Uwp.targets" Condition="Exists('..\..\..\packages\AdaptiveCards.Rendering.Uwp.2.7.0\build\native\AdaptiveCards.Rendering.Uwp.targets')" />

View file

@ -21,9 +21,6 @@
<ClCompile Include="ColorHelper.cpp" />
<ClCompile Include="DebugTapConnection.cpp" />
<ClCompile Include="Jumplist.cpp" />
<ClCompile Include="Tab.cpp">
<Filter>tab</Filter>
</ClCompile>
<ClCompile Include="SettingsTab.cpp">
<Filter>tab</Filter>
</ClCompile>
@ -61,9 +58,6 @@
<ClInclude Include="DebugTapConnection.h" />
<ClInclude Include="ColorHelper.h" />
<ClInclude Include="Jumplist.h" />
<ClInclude Include="Tab.h">
<Filter>tab</Filter>
</ClInclude>
<ClInclude Include="SettingsTab.h">
<Filter>tab</Filter>
</ClInclude>
@ -117,6 +111,10 @@
<Midl Include="PaletteItemTemplateSelector.idl" />
<Midl Include="TabBase.idl" />
<Midl Include="EmptyStringVisibilityConverter.idl" />
<Midl Include="AdaptiveCardContent.idl" />
<Midl Include="TerminalPaneContent.idl" />
<Midl Include="IPaneContent.idl" />
<Midl Include="TaskbarState.idl" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />

View file

@ -56,6 +56,7 @@
#include <winrt/Microsoft.Terminal.TerminalConnection.h>
#include <winrt/Microsoft.Terminal.Settings.Editor.h>
#include <winrt/Microsoft.Terminal.Settings.Model.h>
#include <winrt/Microsoft.CardExtension.h>
#include <winrt/Windows.Storage.h>
#include <winrt/Windows.Storage.Provider.h>
#include <winrt/Windows.Storage.Pickers.h>