Skip to content
Permalink
Browse files

[Build] Escape/Unescape XenkoPlatforms for properly passing info from…

… Xenko.build to targets
  • Loading branch information
xen2 committed Nov 28, 2018
1 parent 5e7e804 commit f3b67810b6c507836eb965497ddea3589ebaea38
Showing with 3 additions and 1 deletion.
  1. +1 −1 build/Xenko.build
  2. +2 −0 sources/targets/Xenko.Core.GlobalSettings.targets
@@ -11,7 +11,7 @@ Example of use:
<XenkoSolution>$(XenkoRoot)build\Xenko</XenkoSolution>
<XenkoSolutionLauncher>$(XenkoRoot)build\Xenko.Launcher</XenkoSolutionLauncher>
<XenkoPlatforms Condition="'$(XenkoPlatforms)' == ''">Windows</XenkoPlatforms>
<BuildProperties>Configuration=Release;NoWarn=1591;DeployExtension=false;XenkoPlatforms=$(XenkoPlatforms)</BuildProperties>
<BuildProperties>Configuration=Release;NoWarn=1591;DeployExtension=false;XenkoPlatforms=$([MSBuild]::Escape('$(XenkoPlatforms)'))</BuildProperties>
<BuildProperties Condition="'$(XenkoSign)' != ''">$(BuildProperties);XenkoSign=$(XenkoSign)</BuildProperties>
<BuildProperties Condition="'$(XenkoOfficialBuild)' != ''">$(BuildProperties);XenkoOfficialBuild=$(XenkoOfficialBuild)</BuildProperties>
<NuGetPath>$(MSBuildThisFileDirectory).nuget\NuGet.exe</NuGetPath>
@@ -55,6 +55,8 @@

<!-- Note: ideally we would split using ItemGroup but then PropertyGroup are not properly evaluated if they contain ItemGroup (unless using Targets) -->
<XenkoPlatforms Condition="'$(XenkoPlatforms)' == ''">Windows</XenkoPlatforms>
<!-- Let's support escaped MSBuild variables, in case it was sent from Xenko.build (not sure why but I couldn't make it work properly when passing to MSBuild.Properties) -->
<XenkoPlatforms>$([MSBuild]::Unescape('$(XenkoPlatforms)'))</XenkoPlatforms>
<_XenkoPlatforms>;$(XenkoPlatforms);</_XenkoPlatforms>
<XenkoRuntimeTargetFrameworks Condition="$(_XenkoPlatforms.Contains(';Windows;'))">$(XenkoRuntimeTargetFrameworks);net45</XenkoRuntimeTargetFrameworks>
<XenkoRuntimeTargetFrameworks Condition="$(_XenkoPlatforms.Contains(';UWP;'))">$(XenkoRuntimeTargetFrameworks);uap10.0</XenkoRuntimeTargetFrameworks>

0 comments on commit f3b6781

Please sign in to comment.
You can’t perform that action at this time.