mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-19 15:03:36 +08:00
5471735419
* Fix double compile issue * Removed debugging code * added prebuild event * Updated output folders
151 lines
9.5 KiB
XML
151 lines
9.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<Import Project="..\packages\WiX.3.11.2\build\wix.props" Condition="Exists('..\packages\WiX.3.11.2\build\wix.props')" />
|
|
<Import Project="$(SolutionDir)Version.props" />
|
|
<PropertyGroup>
|
|
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
|
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
|
|
<ProductVersion>3.10</ProductVersion>
|
|
<ProjectGuid>022a9d30-7c4f-416d-a9df-5ff2661cc0ad</ProjectGuid>
|
|
<SchemaVersion>2.0</SchemaVersion>
|
|
<OutputName>PowerToysSetup-$(Version)-$(Platform)</OutputName>
|
|
<OutputType>Package</OutputType>
|
|
<SuppressAclReset>True</SuppressAclReset>
|
|
<NuGetPackageImportStamp>
|
|
</NuGetPackageImportStamp>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
|
<OutputPath>$(Platform)\$(Configuration)\</OutputPath>
|
|
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
|
<OutputPath>$(Platform)\$(Configuration)\</OutputPath>
|
|
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<Compile Include="CustomDialogs\PTInstallDirDlg.wxs" />
|
|
<Compile Include="CustomDialogs\PTLicenseDlg.wxs" />
|
|
<Compile Include="CustomDialogs\WixUI_PTInstallDir.wxs" />
|
|
<Compile Include="Product.wxs" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<WixExtension Include="WixUtilExtension">
|
|
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
|
|
<Name>WixUtilExtension</Name>
|
|
</WixExtension>
|
|
<WixExtension Include="WixUIExtension">
|
|
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
|
|
<Name>WixUIExtension</Name>
|
|
</WixExtension>
|
|
<WixExtension Include="WixNetFxExtension">
|
|
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
|
|
<Name>WixNetFxExtension</Name>
|
|
</WixExtension>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Folder Include="CustomDialogs" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\PowerToysSetupCustomActions\PowerToysSetupCustomActions.vcxproj">
|
|
<Name>PowerToysSetupCustomActions</Name>
|
|
<Project>{32f3882b-f2d6-4586-b5ed-11e39e522bd3}</Project>
|
|
<Private>True</Private>
|
|
<DoNotHarvest>True</DoNotHarvest>
|
|
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
|
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
|
|
</ProjectReference>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Content Include="packages.config" />
|
|
</ItemGroup>
|
|
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
|
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
|
|
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
|
|
<Error Text="The WiX Toolset v3 build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
|
|
</Target>
|
|
<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\WiX.3.11.2\build\wix.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\WiX.3.11.2\build\wix.props'))" />
|
|
</Target>
|
|
|
|
<PropertyGroup>
|
|
<PreBuildEvent>setlocal enableDelayedExpansion
|
|
|
|
rem Publish Settings
|
|
SET settingsProfileFolderName=..\..\..\..\src\core\Microsoft.PowerToys.Settings.UI.Runner\Properties\PublishProfiles\
|
|
rem Create the publish profile folder if it doesn%27t exist
|
|
IF NOT EXIST !settingsProfileFolderName! (mkdir !settingsProfileFolderName!)
|
|
SET settingsProfileFileName=SettingsProfile.pubxml
|
|
SET settingsPublishProfile=!settingsProfileFolderName!!settingsProfileFileName!
|
|
|
|
rem Create the publish profile pubxml
|
|
echo ^<%3fxml version="1.0" encoding="utf-8"%3f^> > !settingsPublishProfile!
|
|
echo ^<^^!-- >> !settingsPublishProfile!
|
|
echo https://go.microsoft.com/fwlink/%3fLinkID=208121. >> !settingsPublishProfile!
|
|
echo --^> >> !settingsPublishProfile!
|
|
echo ^<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"^> >> !settingsPublishProfile!
|
|
echo ^<PropertyGroup^> >> !settingsPublishProfile!
|
|
echo ^<PublishProtocol^>FileSystem^</PublishProtocol^> >> !settingsPublishProfile!
|
|
echo ^<Configuration^>$(ConfigurationName)^</Configuration^> >> !settingsPublishProfile!
|
|
echo ^<Platform^>$(PlatformName)^</Platform^> >> !settingsPublishProfile!
|
|
echo ^<TargetFramework^>netcoreapp3.1^</TargetFramework^> >> !settingsPublishProfile!
|
|
echo ^<PublishDir^>..\..\..\$(PlatformName)\$(ConfigurationName)\SettingsUIRunner^</PublishDir^> >> !settingsPublishProfile!
|
|
echo ^<RuntimeIdentifier^>win-x64^</RuntimeIdentifier^> >> !settingsPublishProfile!
|
|
echo ^<SelfContained^>false^</SelfContained^> >> !settingsPublishProfile!
|
|
echo ^<PublishSingleFile^>False^</PublishSingleFile^> >> !settingsPublishProfile!
|
|
echo ^<PublishReadyToRun^>False^</PublishReadyToRun^> >> !settingsPublishProfile!
|
|
echo ^</PropertyGroup^> >> !settingsPublishProfile!
|
|
echo ^</Project^> >> !settingsPublishProfile!
|
|
|
|
rem In case of Release we should not use Debug CRT in VCRT forwarders
|
|
IF $(ConfigurationName)==Release (
|
|
"$(MSBuildBinPath)\msbuild.exe" ..\..\..\..\src\core\Microsoft.PowerToys.Settings.UI.Runner\Microsoft.PowerToys.Settings.UI.Runner.csproj -t:Publish -p:Configuration="$(ConfigurationName)" -p:Platform="$(PlatformName)" -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=!settingsProfileFileName!
|
|
) ELSE (
|
|
"$(MSBuildBinPath)\msbuild.exe" ..\..\..\..\src\core\Microsoft.PowerToys.Settings.UI.Runner\Microsoft.PowerToys.Settings.UI.Runner.csproj -t:Publish -p:Configuration="$(ConfigurationName)" -p:Platform="$(PlatformName)" -p:AppxBundle=Never -p:PublishProfile=!settingsProfileFileName!
|
|
)
|
|
|
|
rem Publish Launcher
|
|
SET launcherProfileFolderName=..\..\..\..\src\modules\launcher\PowerLauncher\Properties\PublishProfiles\
|
|
|
|
rem Create the publish profile folder if it doesn%27t exist
|
|
IF NOT EXIST !launcherProfileFolderName! (mkdir !launcherProfileFolderName!)
|
|
SET launcherProfileFileName=LauncherProfile.pubxml
|
|
SET launcherPublishProfile=!launcherProfileFolderName!!launcherProfileFileName!
|
|
|
|
rem Create the publish profile pubxml
|
|
echo ^<%3fxml version="1.0" encoding="utf-8"%3f^> > !launcherPublishProfile!
|
|
echo ^<^^!-- >> !launcherPublishProfile!
|
|
echo https://go.microsoft.com/fwlink/%3fLinkID=208121. >> !launcherPublishProfile!
|
|
echo --^> >> !launcherPublishProfile!
|
|
echo ^<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"^> >> !launcherPublishProfile!
|
|
echo ^<PropertyGroup^> >> !launcherPublishProfile!
|
|
echo ^<PublishProtocol^>FileSystem^</PublishProtocol^> >> !launcherPublishProfile!
|
|
echo ^<Configuration^>$(ConfigurationName)^</Configuration^> >> !launcherPublishProfile!
|
|
echo ^<Platform^>$(PlatformName)^</Platform^> >> !launcherPublishProfile!
|
|
echo ^<TargetFramework^>netcoreapp3.1^</TargetFramework^> >> !launcherPublishProfile!
|
|
echo ^<PublishDir^>..\..\..\..\$(PlatformName)\$(ConfigurationName)\modules\launcher^</PublishDir^> >> !launcherPublishProfile!
|
|
echo ^<RuntimeIdentifier^>win-x64^</RuntimeIdentifier^> >> !launcherPublishProfile!
|
|
echo ^<SelfContained^>false^</SelfContained^> >> !launcherPublishProfile!
|
|
echo ^<PublishSingleFile^>False^</PublishSingleFile^> >> !launcherPublishProfile!
|
|
echo ^<PublishReadyToRun^>False^</PublishReadyToRun^> >> !launcherPublishProfile!
|
|
echo ^</PropertyGroup^> >> !launcherPublishProfile!
|
|
echo ^</Project^> >> !launcherPublishProfile!
|
|
|
|
rem In case of Release we should not use Debug CRT in VCRT forwarders
|
|
IF $(ConfigurationName)==Release (
|
|
"$(MSBuildBinPath)\msbuild.exe" ..\..\..\..\src\modules\launcher\PowerLauncher\PowerLauncher.csproj -t:Publish -p:Configuration="$(ConfigurationName)" -p:Platform="$(PlatformName)" -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=!launcherProfileFileName!
|
|
) ELSE (
|
|
"$(MSBuildBinPath)\msbuild.exe" ..\..\..\..\src\modules\launcher\PowerLauncher\PowerLauncher.csproj -t:Publish -p:Configuration="$(ConfigurationName)" -p:Platform="$(PlatformName)" -p:AppxBundle=Never -p:PublishProfile=!launcherProfileFileName!
|
|
)</PreBuildEvent>
|
|
</PropertyGroup>
|
|
<!--
|
|
To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
Other similar extension points exist, see Wix.targets.
|
|
<Target Name="BeforeBuild">
|
|
</Target>
|
|
<Target Name="AfterBuild">
|
|
</Target>
|
|
-->
|
|
</Project> |