/ src / modules / FileLocksmith / FileLocksmithContextMenu / FileLocksmithContextMenu.vcxproj
FileLocksmithContextMenu.vcxproj
  1  <?xml version="1.0" encoding="utf-8"?>
  2  <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  4    <Import Project="$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
  5    <Target Name="GenerateResourceFiles" BeforeTargets="PrepareForBuild">
  6      <Exec Command="powershell -NonInteractive -executionpolicy Unrestricted $(RepoRoot)tools\build\convert-resx-to-rc.ps1 $(MSBuildThisFileDirectory) resource.base.h resource.h FileLocksmithContextMenu.base.rc FileLocksmithContextMenu.rc" />
  7    </Target>
  8    <PropertyGroup Label="Globals">
  9      <VCProjectVersion>17.0</VCProjectVersion>
 10      <Keyword>Win32Proj</Keyword>
 11      <ProjectGuid>{799a50d8-de89-4ed1-8ff8-ad5a9ed8c0ca}</ProjectGuid>
 12      <RootNamespace>FileLocksmithContextMenu</RootNamespace>
 13    </PropertyGroup>
 14    <PropertyGroup>
 15      <TargetName>PowerToys.FileLocksmithContextMenu</TargetName>
 16      <!-- Needs a different int dir to avoid conflicts in msix creation. -->
 17      <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\TemporaryBuild\obj\$(ProjectName)\</IntDir>
 18      <OutDir>$(RepoRoot)$(Platform)\$(Configuration)\WinUI3Apps\</OutDir>
 19    </PropertyGroup>
 20    <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
 21      <ConfigurationType>DynamicLibrary</ConfigurationType>
 22      <UseDebugLibraries>true</UseDebugLibraries>
 23      
 24      <CharacterSet>Unicode</CharacterSet>
 25    </PropertyGroup>
 26    <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
 27      <ConfigurationType>DynamicLibrary</ConfigurationType>
 28      <UseDebugLibraries>false</UseDebugLibraries>
 29      
 30      <WholeProgramOptimization>true</WholeProgramOptimization>
 31      <CharacterSet>Unicode</CharacterSet>
 32    </PropertyGroup>
 33    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
 34    <ImportGroup Label="ExtensionSettings">
 35    </ImportGroup>
 36    <ImportGroup Label="Shared">
 37    </ImportGroup>
 38    <ImportGroup Label="PropertySheets">
 39      <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 40    </ImportGroup>
 41    <PropertyGroup Label="UserMacros" />
 42    <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
 43      <ClCompile>
 44        <WarningLevel>Level3</WarningLevel>
 45        <SDLCheck>true</SDLCheck>
 46        <PreprocessorDefinitions>WIN32;_DEBUG;FILELOCKSMITHCONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 47        <ConformanceMode>true</ConformanceMode>
 48        <AdditionalIncludeDirectories>..;../../..;</AdditionalIncludeDirectories>
 49      </ClCompile>
 50      <Link>
 51        <SubSystem>Windows</SubSystem>
 52        <GenerateDebugInformation>true</GenerateDebugInformation>
 53        <EnableUAC>false</EnableUAC>
 54        <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
 55        <ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
 56      </Link>
 57      <PreBuildEvent>
 58        <Command>del $(OutDir)\FileLocksmithContextMenuPackage.msix /q
 59  MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv</Command>
 60      </PreBuildEvent>
 61    </ItemDefinitionGroup>
 62    <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
 63      <ClCompile>
 64        <WarningLevel>Level3</WarningLevel>
 65        <FunctionLevelLinking>true</FunctionLevelLinking>
 66        <IntrinsicFunctions>true</IntrinsicFunctions>
 67        <SDLCheck>true</SDLCheck>
 68        <PreprocessorDefinitions>WIN32;NDEBUG;FILELOCKSMITHCONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 69        <ConformanceMode>true</ConformanceMode>
 70        <AdditionalIncludeDirectories>..;../../..;</AdditionalIncludeDirectories>
 71      </ClCompile>
 72      <Link>
 73        <SubSystem>Windows</SubSystem>
 74        <EnableCOMDATFolding>true</EnableCOMDATFolding>
 75        <OptimizeReferences>true</OptimizeReferences>
 76        <GenerateDebugInformation>true</GenerateDebugInformation>
 77        <EnableUAC>false</EnableUAC>
 78        <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
 79        <ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
 80      </Link>
 81      <PreBuildEvent>
 82        <Command>del $(OutDir)\FileLocksmithContextMenuPackage.msix /q
 83  MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv</Command>
 84      </PreBuildEvent>
 85    </ItemDefinitionGroup>
 86    <ItemGroup>
 87      <ClInclude Include="framework.h" />
 88      <ClInclude Include="pch.h" />
 89      <ClInclude Include="resource.base.h" />
 90    </ItemGroup>
 91    <ItemGroup>
 92      <ClCompile Include="dllmain.cpp" />
 93      <ClCompile Include="pch.cpp">
 94        <PrecompiledHeader Condition="'$(UsePrecompiledHeaders)' != 'false'">Create</PrecompiledHeader>
 95      </ClCompile>
 96    </ItemGroup>
 97    <ItemGroup>
 98      <None Include="packages.config" />
 99      <None Include="Resources.resx" />
100    </ItemGroup>
101    <ItemGroup>
102      <None Include="Assets\FileLocksmith\FileLocksmith.ico">
103        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
104      </None>
105      <None Include="Assets\FileLocksmith\LargeTile.png">
106        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
107      </None>
108      <None Include="Assets\FileLocksmith\SmallTile.png">
109        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
110      </None>
111      <None Include="Assets\FileLocksmith\SplashScreen.png">
112        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
113      </None>
114      <None Include="Assets\FileLocksmith\Square150x150Logo.png">
115        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
116      </None>
117      <None Include="Assets\FileLocksmith\Square44x44Logo.png">
118        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
119      </None>
120      <None Include="Assets\FileLocksmith\storelogo.png">
121        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
122      </None>
123      <None Include="Assets\FileLocksmith\Wide310x150Logo.png">
124        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
125      </None>
126    </ItemGroup>
127    <ItemGroup>
128      <ProjectReference Include="$(RepoRoot)src\common\SettingsAPI\SettingsAPI.vcxproj">
129        <Project>{6955446d-23f7-4023-9bb3-8657f904af99}</Project>
130      </ProjectReference>
131      <ProjectReference Include="$(RepoRoot)src\common\Telemetry\EtwTrace\EtwTrace.vcxproj">
132        <Project>{8f021b46-362b-485c-bfba-ccf83e820cbd}</Project>
133      </ProjectReference>
134      <ProjectReference Include="$(RepoRoot)src\common\version\version.vcxproj">
135        <Project>{cc6e41ac-8174-4e8a-8d22-85dd7f4851df}</Project>
136      </ProjectReference>
137      <ProjectReference Include="..\FileLocksmithLib\FileLocksmithLib.vcxproj">
138        <Project>{9d52fd25-ef90-4f9a-a015-91efc5daf54f}</Project>
139      </ProjectReference>
140    </ItemGroup>
141    <ItemGroup>
142      <ResourceCompile Include="FileLocksmithContextMenu.base.rc" />
143    </ItemGroup>
144    <Import Project="$(RepoRoot)deps\spdlog.props" />
145    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
146    <ImportGroup Label="ExtensionTargets">
147      <Import Project="$(RepoRoot)packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('$(RepoRoot)packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
148      <Import Project="$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
149    </ImportGroup>
150    <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
151      <PropertyGroup>
152        <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>
153      </PropertyGroup>
154      <Error Condition="!Exists('$(RepoRoot)packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(RepoRoot)packages\Microsoft.Windows.ImplementationLibrary.1.0.231216.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
155      <Error Condition="!Exists('$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
156      <Error Condition="!Exists('$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(RepoRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
157    </Target>
158  </Project>