mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Fix double compile issue for Launcher and Settings (#2759)
* Fix double compile issue * Removed debugging code * added prebuild event * Updated output folders
This commit is contained in:
@@ -192,8 +192,4 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="rem Check required to avoid a recursive loop of building

IF NOT DEFINED launcherBuildEventCompleted (
setlocal enableDelayedExpansion
SET launcherProfileFolderName=Properties\PublishProfiles\

rem Create the publish profile folder if it doesn't exist
IF NOT EXIST !launcherProfileFolderName! (mkdir !launcherProfileFolderName!)
SET launcherProfileFileName=LauncherProfile.pubxml
SET launcherPublishProfile=!launcherProfileFolderName!!launcherProfileFileName!

rem Create the publish profile pubxml
echo ^<?xml version="1.0" encoding="utf-8"?^> > !launcherPublishProfile!
echo ^<^^!-- >> !launcherPublishProfile!
echo https://go.microsoft.com/fwlink/?LinkID=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 Set a variable to know that the publish event is called to avoid it being called again
SET launcherBuildEventCompleted=1

rem In case of Release we should not use Debug CRT in VCRT forwarders
IF $(ConfigurationName)==Release (
"$(MSBuildBinPath)\msbuild.exe" PowerLauncher.csproj -p:Configuration="$(ConfigurationName)" -p:Platform="$(PlatformName)" -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=!launcherProfileFileName!
"$(MSBuildBinPath)\msbuild.exe" PowerLauncher.csproj -t:Publish -p:Configuration="$(ConfigurationName)" -p:Platform="$(PlatformName)" -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=!launcherProfileFileName!
)
SET launcherBuildEventCompleted=
)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user