From 32b8a344a6f59641f0887064d5e67246bb618e92 Mon Sep 17 00:00:00 2001 From: Arjun Balgovind <32061677+arjunbalgovind@users.noreply.github.com> Date: Wed, 20 May 2020 09:35:02 -0700 Subject: [PATCH] Moved publishing to publish.cmd script (#3259) --- .pipelines/build.cmd | 2 + .../PowerToysSetup/PowerToysSetup.wixproj | 70 +------------------ installer/PowerToysSetup/publish.cmd | 63 +++++++++++++++++ 3 files changed, 66 insertions(+), 69 deletions(-) create mode 100644 installer/PowerToysSetup/publish.cmd diff --git a/.pipelines/build.cmd b/.pipelines/build.cmd index 84226c0139..67d558378b 100644 --- a/.pipelines/build.cmd +++ b/.pipelines/build.cmd @@ -4,3 +4,5 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Too call msbuild ../PowerToys.sln /p:Configuration=Release /p:Platform=x64 || exit /b 1 call msbuild ../src/common/notifications/notifications_dll.vcxproj /p:Configuration=Release /p:Platform=x64 || exit /b 1 call msbuild ../src/common/notifications_winrt/notifications.vcxproj /p:Configuration=Release /p:Platform=x64 || exit /b 1 +SET PTRoot=.. +call "..\installer\PowerToysSetup\publish.cmd" diff --git a/installer/PowerToysSetup/PowerToysSetup.wixproj b/installer/PowerToysSetup/PowerToysSetup.wixproj index 8b2e3a0004..cfceaf70fd 100644 --- a/installer/PowerToysSetup/PowerToysSetup.wixproj +++ b/installer/PowerToysSetup/PowerToysSetup.wixproj @@ -69,76 +69,8 @@ - - 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! -) +