mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-08-29 10:09:43 +02:00
84 lines
3.8 KiB
XML
84 lines
3.8 KiB
XML
|
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||
|
|
<PropertyGroup Label="NuGet">
|
||
|
|
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
|
||
|
|
<NuGetTargetMoniker>native,Version=v0.0</NuGetTargetMoniker>
|
||
|
|
<NuGetTargetPlatformIdentifier>Windows</NuGetTargetPlatformIdentifier>
|
||
|
|
<NuGetTargetPlatformVersion>$(WindowsTargetPlatformVersion)</NuGetTargetPlatformVersion>
|
||
|
|
</PropertyGroup>
|
||
|
|
<ItemGroup>
|
||
|
|
<PackageReference Include="Microsoft.Windows.ImplementationLibrary" GeneratePathProperty="true" />
|
||
|
|
</ItemGroup>
|
||
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||
|
|
<PropertyGroup Label="Globals">
|
||
|
|
<ProjectGuid>{8A7FB7FA-65EA-4004-BA73-1B237435A57B}</ProjectGuid>
|
||
|
|
<Keyword>Win32Proj</Keyword>
|
||
|
|
<RootNamespace>PowerToysCliShim</RootNamespace>
|
||
|
|
<ProjectName>PowerToys.CliShim</ProjectName>
|
||
|
|
<UsePrecompiledHeaders>false</UsePrecompiledHeaders>
|
||
|
|
<OutDir>$(RepoRoot)$(Platform)\$(Configuration)\CliShim\</OutDir>
|
||
|
|
<TargetName>PowerToys.CliShim</TargetName>
|
||
|
|
</PropertyGroup>
|
||
|
|
<PropertyGroup Label="Configuration">
|
||
|
|
<ConfigurationType>Application</ConfigurationType>
|
||
|
|
</PropertyGroup>
|
||
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||
|
|
<Import Project="CliShimManifest.props" />
|
||
|
|
|
||
|
|
<PropertyGroup>
|
||
|
|
<VcpkgEnabled>false</VcpkgEnabled>
|
||
|
|
<VcpkgManifestEnabled>false</VcpkgManifestEnabled>
|
||
|
|
</PropertyGroup>
|
||
|
|
<ItemDefinitionGroup>
|
||
|
|
<ClCompile>
|
||
|
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||
|
|
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||
|
|
</ClCompile>
|
||
|
|
<Link>
|
||
|
|
<SubSystem>Console</SubSystem>
|
||
|
|
</Link>
|
||
|
|
</ItemDefinitionGroup>
|
||
|
|
<ItemGroup>
|
||
|
|
<ClCompile Include="main.cpp" />
|
||
|
|
<ClCompile Include="CommandLine.cpp" />
|
||
|
|
<ClInclude Include="CommandLine.h" />
|
||
|
|
<ResourceCompile Include="CliShim.rc" />
|
||
|
|
<None Include="CliShimManifest.props" />
|
||
|
|
</ItemGroup>
|
||
|
|
<ItemGroup>
|
||
|
|
<ProjectReference Include="..\..\src\common\version\version.vcxproj">
|
||
|
|
<Project>{CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}</Project>
|
||
|
|
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||
|
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||
|
|
</ProjectReference>
|
||
|
|
</ItemGroup>
|
||
|
|
|
||
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||
|
|
|
||
|
|
<!--
|
||
|
|
Keep the explicit WiX components synchronized with the shared manifest. This lives in the
|
||
|
|
product project rather than the wixproj so drift fails on any ordinary build instead of only
|
||
|
|
when someone builds the installer.
|
||
|
|
-->
|
||
|
|
<Target Name="ValidateCliShimInstallerManifest"
|
||
|
|
BeforeTargets="ClCompile"
|
||
|
|
Condition="'$(DesignTimeBuild)' != 'true'">
|
||
|
|
<PropertyGroup>
|
||
|
|
<_CliShimWxsPath>$(RepoRoot)installer\PowerToysSetupVNext\CliShims.wxs</_CliShimWxsPath>
|
||
|
|
<_CliShimWxsText>$([System.IO.File]::ReadAllText('$(_CliShimWxsPath)'))</_CliShimWxsText>
|
||
|
|
<!-- Anchored to <File> so unrelated Name="*.exe" attributes cannot inflate the count. -->
|
||
|
|
<_CliShimWxsCount>$([System.Text.RegularExpressions.Regex]::Matches('$(_CliShimWxsText)', '<File\b[^>]*\bName="[^"]+\.exe"').Count)</_CliShimWxsCount>
|
||
|
|
<_CliShimManifestCount>@(CliShim->Count())</_CliShimManifestCount>
|
||
|
|
</PropertyGroup>
|
||
|
|
<ItemGroup>
|
||
|
|
<CliShim>
|
||
|
|
<InWxs>$(_CliShimWxsText.Contains('Name="%(Identity).exe"'))</InWxs>
|
||
|
|
</CliShim>
|
||
|
|
</ItemGroup>
|
||
|
|
<Error Condition="'%(CliShim.InWxs)' != 'True'"
|
||
|
|
Text="CliShim installer drift: command '%(CliShim.Identity)' is missing from CliShims.wxs." />
|
||
|
|
<Error Condition="'$(_CliShimWxsCount)' != '$(_CliShimManifestCount)'"
|
||
|
|
Text="CliShim installer drift: CliShims.wxs installs $(_CliShimWxsCount) command executables, but CliShimManifest.props defines $(_CliShimManifestCount)." />
|
||
|
|
</Target>
|
||
|
|
</Project>
|