Skip to content
Permalink
Browse files

[Build] Package build improvements (part 2)

  • Loading branch information
xen2 committed Nov 29, 2018
1 parent badb44c commit 32eb5b3dcadb524f6ace77d6a39a672d73e31888
@@ -143,32 +143,32 @@ Example of use:

<Target Name="BuildWindowsDirect3D11" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).Runtime.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties)"/>
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties);XenkoSkipAutoPack=true;XenkoSkipUnitTests=true"/>
</Target>

<Target Name="BuildWindowsDirect3D12" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).Runtime.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties);XenkoGraphicsApi=Direct3D12"/>
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties);XenkoGraphicsApi=Direct3D12;XenkoSkipAutoPack=true;XenkoSkipUnitTests=true"/>
</Target>

<Target Name="BuildWindowsOpenGL" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).Runtime.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties);XenkoGraphicsApi=OpenGL"/>
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties);XenkoGraphicsApi=OpenGL;XenkoSkipAutoPack=true;XenkoSkipUnitTests=true"/>
</Target>

<Target Name="BuildWindowsOpenGLES" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).Runtime.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties);XenkoGraphicsApi=OpenGLES"/>
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties);XenkoGraphicsApi=OpenGLES;XenkoSkipAutoPack=true;XenkoSkipUnitTests=true"/>
</Target>

<Target Name="BuildAndroid" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).Android.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).Android.sln" Properties="$(BuildProperties);XenkoPlatform=Android"/>
<MSBuild Targets="Build" Projects="$(XenkoSolution).Android.sln" Properties="$(BuildProperties);XenkoPlatforms=Android;XenkoSkipAutoPack=true;XenkoSkipUnitTests=true"/>
</Target>

<Target Name="BuildiOS" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).iOS.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).iOS.sln" Properties="$(BuildProperties);XenkoPlatform=iOS"/>
<MSBuild Targets="Build" Projects="$(XenkoSolution).iOS.sln" Properties="$(BuildProperties);XenkoPlatforms=iOS;XenkoSkipAutoPack=true;XenkoSkipUnitTests=true"/>
</Target>

<Target Name="BuildWindowsStore" DependsOnTargets="CopyXenkoKey">
@@ -180,7 +180,7 @@ Example of use:

<Target Name="BuildUWP" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).UWP.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).UWP.sln" Properties="$(BuildProperties);Platform=UWP"/>
<MSBuild Targets="Build" Projects="$(XenkoSolution).UWP.sln" Properties="$(BuildProperties);Platform=UWP;XenkoSkipAutoPack=true;XenkoSkipUnitTests=true"/>
</Target>

<Target Name="BuildWindowsPhone" DependsOnTargets="CopyXenkoKey">
@@ -189,8 +189,8 @@ Example of use:
</Target>

<Target Name="BuildWindowsVulkan" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).Vulkan.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).Vulkan.sln" Properties="$(BuildProperties);Platform=Mixed Platforms"/>
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolution).Runtime.sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolution).Runtime.sln" Properties="$(BuildProperties);XenkoGraphicsApi=Vulkan;XenkoSkipAutoPack=true;XenkoSkipUnitTests=true"/>
</Target>

<Target Name="BuildLinux" DependsOnTargets="CopyXenkoKey">
@@ -44,37 +44,6 @@
<FileAlignment>512</FileAlignment>
</PropertyGroup>

<!--
Settings XenkoPlatform specific
-->
<PropertyGroup>
<XenkoRuntimeTargetFramework>net45</XenkoRuntimeTargetFramework>
<TargetFrameworkTool>net472</TargetFrameworkTool>
<TargetFrameworkVersionTool>v4.7.2</TargetFrameworkVersionTool>
<XenkoPlatformDefines>XENKO_PLATFORM_WINDOWS;XENKO_PLATFORM_WINDOWS_DESKTOP;NET45</XenkoPlatformDefines>

<!-- 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>
<XenkoRuntimeTargetFrameworks Condition="$(_XenkoPlatforms.Contains(';Android;'))">$(XenkoRuntimeTargetFrameworks);monoandroid50</XenkoRuntimeTargetFrameworks>
<XenkoRuntimeTargetFrameworks Condition="$(_XenkoPlatforms.Contains(';iOS;'))">$(XenkoRuntimeTargetFrameworks);xamarinios10</XenkoRuntimeTargetFrameworks>
<XenkoRuntimeTargetFrameworks Condition="$(_XenkoPlatforms.Contains(';Linux;'))">$(XenkoRuntimeTargetFrameworks);netstandard2.0</XenkoRuntimeTargetFrameworks>

<XenkoRuntimeTargetFrameworks>$([MSBuild]::Unescape($(XenkoRuntimeTargetFrameworks.Trim(';'))))</XenkoRuntimeTargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(XenkoRuntime)' == 'true' ">
<TargetFrameworks Condition="$(XenkoRuntimeTargetFrameworks.Contains(';'))">$(XenkoRuntimeTargetFrameworks)</TargetFrameworks>
<TargetFramework Condition="!$(XenkoRuntimeTargetFrameworks.Contains(';'))">$(XenkoRuntimeTargetFrameworks)</TargetFramework>
<!-- UpToDate check doesn't work with multi-TFM projects! https://github.com/dotnet/project-system/issues/2487 -->
<DisableFastUpToDateCheck Condition="$(TargetFrameworks.Contains(';'))">true</DisableFastUpToDateCheck>
<!--<TargetFrameworks>net45;uap10.0;monoandroid50;xamarinios10;netstandard2.0</TargetFrameworks>-->
</PropertyGroup>

<PropertyGroup Condition=" '$(XenkoPlatform)' == 'Windows' ">
<!-- Limited version used by tools but that doesn't require installation of .NET on most computers (4.5.1 is default of many OS, 4.5.2/4.6 isn't) -->
<XenkoPlatformDefines>XENKO_PLATFORM_WINDOWS;XENKO_PLATFORM_WINDOWS_DESKTOP;NET45</XenkoPlatformDefines>
@@ -133,7 +133,7 @@
<Delete Files="$(NuGetPackageRoot)\$(PackageId.ToLowerInvariant())\$(PackageVersion)\$(PackageId).$(PackageVersion).nupkg.sha512"/>
<Delete Files="$(NuGetPackageRoot)\$(PackageId.ToLowerInvariant())\$(PackageVersion)\.nupkg.metadata"/>
</Target>
<PropertyGroup Condition="$(DesignTimeBuild) != 'true'">
<PropertyGroup Condition="$(DesignTimeBuild) != 'true' And '$(XenkoSkipAutoPack)' != 'true'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
@@ -10,6 +10,37 @@
<!--Import Local Pre Settings for the solution being loaded -->
<Import Project="$(SolutionDir)$(SolutionName).PreSettings.Local.targets" Condition="Exists('$(SolutionDir)$(SolutionName).PreSettings.Local.targets')" />
<Import Project="$(SolutionDir)Xenko.Core.PreSettings.Local.targets" Condition="Exists('$(SolutionDir)Xenko.Core.PreSettings.Local.targets')" />

<!--
Settings XenkoPlatform specific
-->
<PropertyGroup>
<XenkoRuntimeTargetFramework>net45</XenkoRuntimeTargetFramework>
<TargetFrameworkTool>net472</TargetFrameworkTool>
<TargetFrameworkVersionTool>v4.7.2</TargetFrameworkVersionTool>
<XenkoPlatformDefines>XENKO_PLATFORM_WINDOWS;XENKO_PLATFORM_WINDOWS_DESKTOP;NET45</XenkoPlatformDefines>

<!-- 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>
<XenkoRuntimeTargetFrameworks Condition="$(_XenkoPlatforms.Contains(';Android;'))">$(XenkoRuntimeTargetFrameworks);monoandroid50</XenkoRuntimeTargetFrameworks>
<XenkoRuntimeTargetFrameworks Condition="$(_XenkoPlatforms.Contains(';iOS;'))">$(XenkoRuntimeTargetFrameworks);xamarinios10</XenkoRuntimeTargetFrameworks>
<XenkoRuntimeTargetFrameworks Condition="$(_XenkoPlatforms.Contains(';Linux;'))">$(XenkoRuntimeTargetFrameworks);netstandard2.0</XenkoRuntimeTargetFrameworks>

<XenkoRuntimeTargetFrameworks>$([MSBuild]::Unescape($(XenkoRuntimeTargetFrameworks.Trim(';'))))</XenkoRuntimeTargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(XenkoRuntime)' == 'true' ">
<TargetFrameworks Condition="$(XenkoRuntimeTargetFrameworks.Contains(';'))">$(XenkoRuntimeTargetFrameworks)</TargetFrameworks>
<TargetFramework Condition="!$(XenkoRuntimeTargetFrameworks.Contains(';'))">$(XenkoRuntimeTargetFrameworks)</TargetFramework>
<!-- UpToDate check doesn't work with multi-TFM projects! https://github.com/dotnet/project-system/issues/2487 -->
<DisableFastUpToDateCheck Condition="$(TargetFrameworks.Contains(';'))">true</DisableFastUpToDateCheck>
<!--<TargetFrameworks>net45;uap10.0;monoandroid50;xamarinios10;netstandard2.0</TargetFrameworks>-->
</PropertyGroup>

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

0 comments on commit 32eb5b3

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