2020-12-11 22:34:21 +01:00
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion= "15.0" DefaultTargets= "Build" xmlns= "http://schemas.microsoft.com/developer/msbuild/2003" >
<!--
We're explicitly telling our references to be non-private so that they won't
be copied into our folder. In the case of Microsoft.Ui.Xaml, it seems to copy
literally everything EXCEPT its .winmd file, which allows us to keep building.
-->
<ItemDefinitionGroup >
<Reference >
<Private > false</Private>
</Reference>
</ItemDefinitionGroup>
<PropertyGroup Label= "Globals" >
<ProjectGuid > {CA5CAD1A-0b5e-45c3-96a8-bb496bfe4e32}</ProjectGuid>
<ProjectName > Microsoft.Terminal.Settings.Editor</ProjectName>
<RootNamespace > Microsoft.Terminal.Settings.Editor</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>
2021-05-13 23:12:30 +02:00
<PgoTarget > true</PgoTarget>
2020-12-11 22:34:21 +01:00
<!-- C++/WinRT sets the depth to 1 if there is a XAML file in the project
Unfortunately for us, we need it to be 3. When the namespace merging
2021-03-17 21:47:24 +01:00
depth is 1, Microsoft.Terminal.Control becomes "Microsoft",
2020-12-11 22:34:21 +01:00
and our WinMD file becomes "Microsoft". Because WinRT is very
namespace-driven, this winmd is considered to contain the entire
Microsoft namespace. This is, obviously, not great. None of our other
projects compile properly when they depend on this "Microsoft.winmd."
-->
<CppWinRTNamespaceMergeDepth > 4</CppWinRTNamespaceMergeDepth>
<XamlComponentResourceLocation > nested</XamlComponentResourceLocation>
</PropertyGroup>
<Import Project= "..\..\..\common.openconsole.props" Condition= "'$(OpenConsoleDir)'==''" />
<Import Project= "$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
<!-- ========================= Headers ======================== -->
<ItemGroup >
2021-02-24 00:37:23 +01:00
<ClInclude Include= "Actions.h" >
<DependentUpon > Actions.xaml</DependentUpon>
</ClInclude>
2021-05-05 06:15:25 +02:00
<ClInclude Include= "AddProfile.h" >
<DependentUpon > AddProfile.xaml</DependentUpon>
</ClInclude>
2021-08-04 00:25:23 +02:00
<ClInclude Include= "Converters.h" >
2021-01-18 23:34:07 +01:00
<DependentUpon > Converters.idl</DependentUpon>
2021-08-04 00:25:23 +02:00
<SubType > Code</SubType>
2020-12-11 22:34:21 +01:00
</ClInclude>
<ClInclude Include= "EnumEntry.h" >
<DependentUpon > EnumEntry.idl</DependentUpon>
</ClInclude>
<ClInclude Include= "GlobalAppearance.h" >
<DependentUpon > GlobalAppearance.xaml</DependentUpon>
</ClInclude>
<ClInclude Include= "ColorSchemes.h" >
<DependentUpon > ColorSchemes.xaml</DependentUpon>
<SubType > Code</SubType>
</ClInclude>
<ClInclude Include= "Interaction.h" >
<DependentUpon > Interaction.xaml</DependentUpon>
</ClInclude>
2021-08-04 00:25:23 +02:00
<ClInclude Include= "KeyChordListener.h" >
<DependentUpon > KeyChordListener.xaml</DependentUpon>
</ClInclude>
2020-12-11 22:34:21 +01:00
<ClInclude Include= "Launch.h" >
<DependentUpon > Launch.xaml</DependentUpon>
</ClInclude>
<ClInclude Include= "pch.h" />
<ClInclude Include= "MainPage.h" >
<DependentUpon > MainPage.xaml</DependentUpon>
</ClInclude>
<ClInclude Include= "Profiles.h" >
<DependentUpon > Profiles.xaml</DependentUpon>
<SubType > Code</SubType>
</ClInclude>
2021-07-09 22:43:58 +02:00
<ClInclude Include= "Appearances.h" >
<DependentUpon > Appearances.xaml</DependentUpon>
<SubType > Code</SubType>
</ClInclude>
2020-12-11 22:34:21 +01:00
<ClInclude Include= "Rendering.h" >
<DependentUpon > Rendering.xaml</DependentUpon>
</ClInclude>
2021-02-08 19:04:43 +01:00
<ClInclude Include= "SettingContainer.h" >
<DependentUpon > SettingContainer.idl</DependentUpon>
</ClInclude>
2020-12-11 22:34:21 +01:00
<ClInclude Include= "Utils.h" />
2021-05-17 04:26:47 +02:00
<ClInclude Include= "PreviewConnection.h" />
2020-12-11 22:34:21 +01:00
</ItemGroup>
<!-- ========================= XAML files ======================== -->
<ItemGroup >
2021-02-24 00:37:23 +01:00
<Page Include= "Actions.xaml" >
<SubType > Designer</SubType>
</Page>
2021-05-05 06:15:25 +02:00
<Page Include= "AddProfile.xaml" >
<SubType > Designer</SubType>
</Page>
2020-12-11 22:34:21 +01:00
<Page Include= "CommonResources.xaml" >
<SubType > Designer</SubType>
</Page>
<Page Include= "GlobalAppearance.xaml" >
<SubType > Designer</SubType>
</Page>
<Page Include= "ColorSchemes.xaml" >
<SubType > Designer</SubType>
</Page>
<Page Include= "Interaction.xaml" >
<SubType > Designer</SubType>
</Page>
2021-07-17 00:11:55 +02:00
<Page Include= "KeyChordListener.xaml" >
<SubType > Designer</SubType>
</Page>
2020-12-11 22:34:21 +01:00
<Page Include= "Launch.xaml" >
<SubType > Designer</SubType>
</Page>
<Page Include= "MainPage.xaml" >
<SubType > Designer</SubType>
</Page>
<Page Include= "Profiles.xaml" >
<SubType > Designer</SubType>
</Page>
2021-07-09 22:43:58 +02:00
<Page Include= "Appearances.xaml" >
<SubType > Designer</SubType>
</Page>
2020-12-11 22:34:21 +01:00
<Page Include= "Rendering.xaml" >
<SubType > Designer</SubType>
</Page>
2021-02-08 19:04:43 +01:00
<Page Include= "SettingContainerStyle.xaml" >
<Type > DefaultStyle</Type>
</Page>
2020-12-11 22:34:21 +01:00
</ItemGroup>
<!-- ========================= Cpp Files ======================== -->
<ItemGroup >
2021-02-24 00:37:23 +01:00
<ClCompile Include= "Actions.cpp" >
<DependentUpon > Actions.xaml</DependentUpon>
</ClCompile>
2021-05-05 06:15:25 +02:00
<ClCompile Include= "AddProfile.cpp" >
<DependentUpon > AddProfile.xaml</DependentUpon>
</ClCompile>
2021-08-04 00:25:23 +02:00
<ClCompile Include= "Converters.cpp" >
2021-01-18 23:34:07 +01:00
<DependentUpon > Converters.idl</DependentUpon>
2021-08-04 00:25:23 +02:00
<SubType > Code</SubType>
2020-12-11 22:34:21 +01:00
</ClCompile>
<ClCompile Include= "GlobalAppearance.cpp" >
<DependentUpon > GlobalAppearance.xaml</DependentUpon>
</ClCompile>
<ClCompile Include= "ColorSchemes.cpp" >
<DependentUpon > ColorSchemes.xaml</DependentUpon>
<SubType > Code</SubType>
</ClCompile>
<ClCompile Include= "Interaction.cpp" >
<DependentUpon > Interaction.xaml</DependentUpon>
</ClCompile>
2021-08-04 00:25:23 +02:00
<ClCompile Include= "KeyChordListener.cpp" >
<DependentUpon > KeyChordListener.xaml</DependentUpon>
</ClCompile>
2020-12-11 22:34:21 +01:00
<ClCompile Include= "Launch.cpp" >
<DependentUpon > Launch.xaml</DependentUpon>
</ClCompile>
<ClCompile Include= "pch.cpp" >
<PrecompiledHeader > Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include= "MainPage.cpp" >
<DependentUpon > MainPage.xaml</DependentUpon>
</ClCompile>
<ClCompile Include= "$(GeneratedFilesDir)module.g.cpp" />
<ClCompile Include= "Profiles.cpp" >
<DependentUpon > Profiles.xaml</DependentUpon>
<SubType > Code</SubType>
</ClCompile>
2021-07-09 22:43:58 +02:00
<ClCompile Include= "Appearances.cpp" >
<DependentUpon > Appearances.xaml</DependentUpon>
<SubType > Code</SubType>
</ClCompile>
2020-12-11 22:34:21 +01:00
<ClCompile Include= "Rendering.cpp" >
<DependentUpon > Rendering.xaml</DependentUpon>
</ClCompile>
2021-02-08 19:04:43 +01:00
<ClCompile Include= "SettingContainer.cpp" >
<DependentUpon > SettingContainer.idl</DependentUpon>
</ClCompile>
2020-12-11 22:34:21 +01:00
<ClCompile Include= "Utils.cpp" />
2021-05-17 04:26:47 +02:00
<ClCompile Include= "PreviewConnection.cpp" >
<DependentUpon > PreviewConnection.h</DependentUpon>
</ClCompile>
2020-12-11 22:34:21 +01:00
</ItemGroup>
<!-- ========================= idl Files ======================== -->
<ItemGroup >
2021-02-24 00:37:23 +01:00
<Midl Include= "Actions.idl" >
<DependentUpon > Actions.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
2021-05-05 06:15:25 +02:00
<Midl Include= "AddProfile.idl" >
<DependentUpon > AddProfile.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
2021-01-18 23:34:07 +01:00
<Midl Include= "Converters.idl" />
2020-12-11 22:34:21 +01:00
<Midl Include= "EnumEntry.idl" />
<Midl Include= "GlobalAppearance.idl" >
<DependentUpon > GlobalAppearance.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
<Midl Include= "ColorSchemes.idl" >
<DependentUpon > ColorSchemes.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
2021-07-17 00:11:55 +02:00
<Midl Include= "KeyChordListener.idl" >
<DependentUpon > KeyChordListener.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
2020-12-11 22:34:21 +01:00
<Midl Include= "Launch.idl" >
<DependentUpon > Launch.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
<Midl Include= "Interaction.idl" >
<DependentUpon > Interaction.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
<Midl Include= "Rendering.idl" >
<DependentUpon > Rendering.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
<Midl Include= "MainPage.idl" >
<DependentUpon > MainPage.xaml</DependentUpon>
</Midl>
<Midl Include= "Profiles.idl" >
<DependentUpon > Profiles.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
2021-07-09 22:43:58 +02:00
<Midl Include= "Appearances.idl" >
<DependentUpon > Appearances.xaml</DependentUpon>
<SubType > Code</SubType>
</Midl>
2021-02-08 19:04:43 +01:00
<Midl Include= "SettingContainer.idl" >
<SubType > Code</SubType>
</Midl>
2020-12-11 22:34:21 +01:00
</ItemGroup>
<!-- ========================= Misc Files ======================== -->
<ItemGroup >
<PRIResource Include= "Resources\en-US\Resources.resw" >
<SubType > Designer</SubType>
</PRIResource>
<OCResourceDirectory Include= "Resources" />
Fix build break where Microsoft.Terminal.Control.dll is empty (#9537)
TIL that the `<None Include="Foo.def" />` line in our projects is
actually totally meaningless. The important line is the one that's in
`cppwinrt.build.pre.props`, where we declare
```xml
<ModuleDefinitionFile Condition="Exists('$(ProjectName).def')">$(ProjectName).def</ModuleDefinitionFile>
```
So if you change a project's name, and not the `.def` file, then the
linker will just _not use the `.def` file at all_.
More importantly, this seemingly doesn't matter in debug builds. In a
Debug build, the linker will happily still include `WINRT_CanUnloadNow`
and `WINRT_GetActivationFactory` in the exports from the dll, even
without the `.def`. But in a Release build, the linker is much more
agressive about pruning symbols that aren't referenced, and without
those two, NONE of the symbols are eventually referenced.
This PR fixes `Microsoft.Terminal.Control` by renaming the `.def`, and
makes it marginally harder for someone to make the same mistake in the
future.
## References
* Regressed in #9472
## PR Checklist
* [x] Closes #9529
* [x] I work here
2021-03-18 17:14:21 +01:00
<None Include= "$(ProjectName).def" />
2020-12-11 22:34:21 +01:00
<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" >
<Project > {18D09A24-8240-42D6-8CB6-236EEE820263}</Project>
</ProjectReference>
<ProjectReference Include= "$(OpenConsoleDir)src\cascadia\WinRTUtils\WinRTUtils.vcxproj" >
<Project > {CA5CAD1A-039A-4929-BA2A-8BEB2E4106FE}</Project>
<ReferenceOutputAssembly > false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include= "$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" >
<Private > false</Private>
</ProjectReference>
2021-01-13 02:23:17 +01:00
2021-03-17 21:47:24 +01:00
<ProjectReference Include= "$(OpenConsoleDir)src\cascadia\TerminalControl\dll\TerminalControl.vcxproj" >
2021-01-13 02:23:17 +01:00
<!-- Private:false and ReferenceOutputAssembly:false, in combination with
the manual reference to TerminalControl.winmd below make sure that this
project will compile correct, and that we won't roll up the TermControl
xbf's into the packaging project twice. -->
<Private > true</Private>
<ReferenceOutputAssembly > false</ReferenceOutputAssembly>
2020-12-11 22:34:21 +01:00
</ProjectReference>
<ProjectReference Include= "$(OpenConsoleDir)src\cascadia\TerminalSettingsModel\dll\Microsoft.Terminal.Settings.Model.vcxproj" >
<Private > false</Private>
</ProjectReference>
</ItemGroup>
2021-01-13 02:23:17 +01:00
<ItemGroup >
<!-- Manually add a reference to TerminalControl here. We need this so
MDMERGE will know where the TermControl types are defined. However, we need
to do it exactly like this so the packaging project won't roll up
TermControl's .xbf's from both the TermControl project and this one. -->
2021-03-17 21:47:24 +01:00
<Reference Include= "Microsoft.Terminal.Control" >
<HintPath > $(OpenConsoleCommonOutDir)Microsoft.Terminal.Control\Microsoft.Terminal.Control.winmd</HintPath>
<IsWinMDFile > true</IsWinMDFile>
<Private > false</Private>
<CopyLocalSatelliteAssemblies > false</CopyLocalSatelliteAssemblies>
</Reference>
<Reference Include= "Microsoft.Terminal.Core" >
<HintPath > $(OpenConsoleCommonOutDir)TerminalCore\Microsoft.Terminal.Core.winmd</HintPath>
2021-01-13 02:23:17 +01:00
<IsWinMDFile > true</IsWinMDFile>
<Private > false</Private>
<CopyLocalSatelliteAssemblies > false</CopyLocalSatelliteAssemblies>
</Reference>
</ItemGroup>
2021-04-12 15:12:08 +02:00
<ItemDefinitionGroup >
<Link >
<AdditionalDependencies > shell32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
2020-12-11 22:34:21 +01:00
<Import Project= "$(OpenConsoleDir)src\cppwinrt.build.post.props" />
2021-09-21 00:08:55 +02:00
<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')" />
2020-12-11 22:34:21 +01:00
<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>
2021-09-21 00:08:55 +02:00
<Error Condition= "!Exists('$(OpenConsoleDir)\packages\Microsoft.UI.Xaml.2.7.0-prerelease.210913003\build\native\Microsoft.UI.Xaml.targets')" Text= "$([System.String]::Format('$(ErrorText)', '$(OpenConsoleDir)\packages\Microsoft.UI.Xaml.2.7.0-prerelease.210913003\build\native\Microsoft.UI.Xaml.targets'))" />
2020-12-11 22:34:21 +01:00
</Target>
<Import Project= "$(SolutionDir)build\rules\CollectWildcardResources.targets" />
2021-08-04 00:25:23 +02:00
</Project>