[Build] Package build improvements (part 2)

This commit is contained in:
Virgile Bello 2018-11-29 10:44:30 +09:00
Родитель badb44c405
Коммит 32eb5b3dca
4 изменённых файлов: 41 добавлений и 41 удалений

Просмотреть файл

@ -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>