2021-02-11 22:07:50 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<PropertyGroup>
|
2021-03-26 23:09:49 +01:00
|
|
|
<ProjectGuid>{71CC9D78-BA29-4D93-946F-BEF5D9A3A6EF}</ProjectGuid>
|
2021-02-11 22:07:50 +01:00
|
|
|
<Keyword>Win32Proj</Keyword>
|
|
|
|
<RootNamespace>openconsoleproxy</RootNamespace>
|
|
|
|
<ProjectName>OpenConsoleProxy</ProjectName>
|
|
|
|
<TargetName>OpenConsoleProxy</TargetName>
|
2021-03-26 23:09:49 +01:00
|
|
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
2021-02-11 22:07:50 +01:00
|
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(SolutionDir)src\common.build.pre.props" />
|
|
|
|
<ItemGroup>
|
|
|
|
<Midl Include="IConsoleHandoff.idl">
|
2021-10-26 21:08:49 +02:00
|
|
|
<!--
|
2021-02-11 22:07:50 +01:00
|
|
|
In Razzle, IDL files generate %FileName%.h
|
|
|
|
In Visual Studio, IDL files generate %FileName%_h.h
|
|
|
|
Visual Studio is easier to override than Razzle.
|
|
|
|
This has to be built in both the OS and outside, so we
|
|
|
|
override the easier-to-override side to a uniform name.
|
|
|
|
-->
|
|
|
|
<HeaderFileName>IConsoleHandoff.h</HeaderFileName>
|
|
|
|
<MinimumTargetSystem>NT100</MinimumTargetSystem>
|
|
|
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
|
|
|
</Midl>
|
2021-03-26 23:09:49 +01:00
|
|
|
<Midl Include="ITerminalHandoff.idl">
|
|
|
|
<HeaderFileName>ITerminalHandoff.h</HeaderFileName>
|
|
|
|
<MinimumTargetSystem>NT100</MinimumTargetSystem>
|
|
|
|
<OutputDirectory>$(IntDir)</OutputDirectory>
|
|
|
|
</Midl>
|
|
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
|
|
<ClInclude Include="$(IntDir)\IConsoleHandoff.h" />
|
|
|
|
<ClInclude Include="$(IntDir)\ITerminalHandoff.h" />
|
2021-10-26 21:08:49 +02:00
|
|
|
<ClInclude Include="nodefaultlib_shim.h" />
|
2021-03-26 23:09:49 +01:00
|
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
|
|
<ClCompile Include="$(IntDir)\dlldata.c" />
|
|
|
|
<ClCompile Include="$(IntDir)\IConsoleHandoff_i.c" />
|
|
|
|
<ClCompile Include="$(IntDir)\IConsoleHandoff_p.c" />
|
|
|
|
<ClCompile Include="$(IntDir)\ITerminalHandoff_i.c" />
|
|
|
|
<ClCompile Include="$(IntDir)\ITerminalHandoff_p.c" />
|
2021-02-11 22:07:50 +01:00
|
|
|
</ItemGroup>
|
2021-03-26 23:09:49 +01:00
|
|
|
<ItemDefinitionGroup Condition="'$(WindowsTerminalBranding)'=='Release'">
|
|
|
|
<ClCompile>
|
|
|
|
<PreprocessorDefinitions>PROXY_CLSID_IS={0x3171DE52,0x6EFA,0x4AEF,{0x8A,0x9F,0xD0,0x2B,0xD6,0x7E,0x7A,0x4F}};%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
|
|
</ClCompile>
|
|
|
|
</ItemDefinitionGroup>
|
|
|
|
<ItemDefinitionGroup Condition="'$(WindowsTerminalBranding)'=='Preview'">
|
|
|
|
<ClCompile>
|
|
|
|
<PreprocessorDefinitions>PROXY_CLSID_IS={0x1833E661,0xCC81,0x4DD0,{0x87,0xC6,0xC2,0xF7,0x4B,0xD3,0x9E,0xFA}};%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
|
|
</ClCompile>
|
|
|
|
</ItemDefinitionGroup>
|
|
|
|
<ItemDefinitionGroup Condition="'$(WindowsTerminalBranding)'==''">
|
|
|
|
<ClCompile>
|
|
|
|
<PreprocessorDefinitions>PROXY_CLSID_IS={0xDEC4804D,0x56D1,0x4F73,{0x9F,0xBE,0x68,0x28,0xE7,0xC8,0x5C,0x56}};%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
|
|
</ClCompile>
|
|
|
|
</ItemDefinitionGroup>
|
2021-02-11 22:07:50 +01:00
|
|
|
<ItemDefinitionGroup>
|
|
|
|
<ClCompile>
|
2021-10-26 21:08:49 +02:00
|
|
|
<AdditionalIncludeDirectories>.;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
<CallingConvention Condition="'$(Platform)'!='ARM64'">StdCall</CallingConvention>
|
Fix ARM64 build by defining WIN32 (#9654)
By default from ARM64 architecture projects, `WIN32` is not defined. It
is supposed to be for this proxy stub to work. So I've set it with the
preprocessor for this project.
## PR Checklist
* [x] Closes release build failure after #7489
* [x] I work here.
* [x] Built on my machine.
## Detailed Description of the Pull Request / Additional comments
`WIN32` appears to convey two meanings depending on who you are:
- To most of Windows, `WIN32` appears to mean the Win32 API surface and
sometimes the major OS version that goes with it. (Specifically in
contrast to 16-bit Windows.)
- To others, `WIN32` appears to mean a 32-bit processor or a synonym of
`x86`.
This is generally not a problem for a few reasons:
- VS defines `WIN32` in the default targets/props only for the `x86`
processor type. **BUT**
- Windows defines `WIN32` if it's not already defined in both
`minwinbase.h` and `ole2.h` which generally speaking manage to get
compiled into practically everything especially since `minwinbase.h`
tends to sneak itself in somehow through `windows.h` and that's
**THE** include to use the Windows API surface.
- Windows also defines `WIN32` for itself unconditionally and relatively
globally when building itself.
However, it's a problem here because:
- `rpcproxy.h` is the only header included in `dlldata.c`, a file
generated automatically by `midl.exe` in the SDK when making a proxy
stub.
- `rpcproxy.h` only defines its contents for a proxy when `WIN32` or
`_M_AMD64` are found.
- Therefore, it's defined pretty naturally for x86 and AMD64 targets
from VS, but not for ARM64.
- ARM64 support is pretty new and those who are attempting to build for
ARM64 and against the public SDK with Visual Studio for a classic COM
proxy... seems like a relatively unlikely combination.
I will follow up with the Visual Studio, Windows SDK, and MIDL/COM teams
to try to remove this pitfall from the public tooling. But for now, this
is the fix.
2021-03-29 23:43:58 +02:00
|
|
|
<!-- Must be Stdcall on all platforms to resolve _ObjectStublessClient3 -->
|
|
|
|
<PreprocessorDefinitions>REGISTER_PROXY_DLL;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
2021-02-11 22:07:50 +01:00
|
|
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
2021-10-26 21:08:49 +02:00
|
|
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
|
|
|
<SDLCheck>false</SDLCheck>
|
|
|
|
<ForcedIncludeFiles>nodefaultlib_shim.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
2021-02-11 22:07:50 +01:00
|
|
|
</ClCompile>
|
2021-03-26 23:09:49 +01:00
|
|
|
<Link>
|
|
|
|
<ModuleDefinitionFile>OpenConsoleProxy.def</ModuleDefinitionFile>
|
2021-10-26 21:08:49 +02:00
|
|
|
<!--
|
|
|
|
Not depending on the CRT cuts binary size by half and prevents issues if this DLL
|
|
|
|
is copied elsewhere and executed outside of our app package without our bundled CRT present.
|
|
|
|
-->
|
|
|
|
<AdditionalDependencies />
|
|
|
|
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
|
|
|
<EntryPointSymbol>DllMain</EntryPointSymbol>
|
2021-03-26 23:09:49 +01:00
|
|
|
</Link>
|
2021-02-11 22:07:50 +01:00
|
|
|
</ItemDefinitionGroup>
|
|
|
|
<!-- Careful reordering these. Some default props (contained in these files) are order sensitive. -->
|
|
|
|
<Import Project="$(SolutionDir)src\common.build.post.props" />
|
2021-10-26 21:08:49 +02:00
|
|
|
</Project>
|