Skip to content
Permalink
Browse files

Merge branch 'runtimeid_fixes' into master-3.1

  • Loading branch information
xen2 committed Oct 15, 2019
2 parents 238a431 + 98a2a7a commit 297d239cc89ddee88d4cc52448336b35fa93080d
Git LFS file not shown
@@ -244,7 +244,7 @@ private Assembly LoadAssemblyFromPathInternal([NotNull] string assemblyFullPath)
// - need to be fast (make sure to use NuGet caching mechanism)
if (library.RuntimeAssemblyGroups.Count == 0)
{
var runtimeFolder = new[] { "win-d3d11", "win", "any" }
var runtimeFolder = new[] { "win", "any" }
.Select(runtime => Path.Combine(globalPackagesFolder, library.Path, "runtimes", runtime))
.Where(Directory.Exists)
.SelectMany(folder => Directory.EnumerateDirectories(Path.Combine(folder, "lib")))
@@ -2,7 +2,7 @@
setlocal
set XenkoSdkDir=%~dp0..\..\..\..\
set XenkoAssetCompiler=%XenkoSdkDir%sources\assets\Xenko.Core.Assets.CompilerApp\bin\Debug\net472\Xenko.Core.Assets.CompilerApp.exe
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win-d3d11 --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win-opengl --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win-opengles --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win-vulkan --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
@@ -2,7 +2,7 @@
setlocal
set XenkoSdkDir=%~dp0..\..\..\..\
set XenkoAssetCompiler=%XenkoSdkDir%sources\assets\Xenko.Core.Assets.CompilerApp\bin\Debug\net472\Xenko.Core.Assets.CompilerApp.exe
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win-d3d11 --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win-opengl --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win-opengles --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
%XenkoAssetCompiler% --platform=Windows --property:RuntimeIdentifier=win-vulkan --output-path=%~dp0obj\app_data --build-path=%~dp0obj\build_app_data --package-file=Graphics.xkpkg
@@ -28,10 +28,6 @@
<Compile Include="..\..\shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<None Include="build\**\*.targets" PackagePath="build\" Pack="true" />
<None Include="build\**\*.props" PackagePath="build\" Pack="true" />
<None Include="build\**\*.targets" PackagePath="buildTransitive\" Pack="true" />
<None Include="build\**\*.props" PackagePath="buildTransitive\" Pack="true" />
<None Include="runtime.json" Pack="true" PackagePath="/">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>

This file was deleted.

@@ -1,17 +1,5 @@
{
"runtimes": {
"win": {
"#import": [
"win-d3d11",
"any"
]
},
"linux": {
"#import": [
"linux-opengl",
"unix"
]
},
"win-d3d11": {
"#import": [
"win"
@@ -6,19 +6,6 @@
<#@ output extension=".json" #>
{
"runtimes": {
<# // Redefine defaults #>
"win": {
"#import": [
"win-d3d11",
"any"
]
},
"linux": {
"#import": [
"linux-opengl",
"unix"
]
},
<# foreach (var platform in new[] { "win", "win7", "win10", "linux" })
{
foreach (var graphicsPlatform in platform.StartsWith("win") ? new[] { "d3d11", "d3d12", "opengl", "opengles", "vulkan" } : new[] { "opengl", "vulkan" })
@@ -24,7 +24,6 @@ static class RestoreHelper
{
static List<string> SupportedRuntimes = new List<string>
{
"win-d3d11",
"win",
"any",
"none",
@@ -26,27 +26,27 @@
<!-- Include platform dependent assembly when specified -->
<PropertyGroup Condition="'$(XenkoGraphicsApiDependent)' == 'true'">
<!-- Build list of Graphics API -->
<XenkoGraphicsApis Condition="'$(XenkoGraphicsApis)' == '' And '$(XenkoGraphicsApiDependentBuildAll)' == 'true'">Direct3D11;Direct3D12;OpenGL;OpenGLES;Vulkan</XenkoGraphicsApis>
<XenkoGraphicsApis Condition="'$(XenkoGraphicsApiDependentBuildAll)' == 'true'">Direct3D11;Direct3D12;OpenGL;OpenGLES;Vulkan</XenkoGraphicsApis>
<XenkoGraphicsApis Condition="'$(XenkoGraphicsApis)' == '' And '$(XenkoGraphicsApiDependentBuildAll)' != 'true'">$(XenkoGraphicsApiOriginal)</XenkoGraphicsApis>

<_XenkoGraphicsApis Condition="'$(XenkoGraphicsApis)' != ''">;$(XenkoGraphicsApis);</_XenkoGraphicsApis>

<!-- Compute list of runtime identifiers based on platforms and graphics platforms -->
<RuntimeIdentifiers></RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And ($(_XenkoGraphicsApis.Contains(';Direct3D11;')) Or '$(_XenkoGraphicsApis)' == '')">$(RuntimeIdentifiers);win-d3d11</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And ($(_XenkoGraphicsApis.Contains(';Direct3D11;')) Or '$(_XenkoGraphicsApis)' == '')">$(RuntimeIdentifiers);win</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And $(_XenkoGraphicsApis.Contains(';Direct3D12;'))">$(RuntimeIdentifiers);win-d3d12</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And $(_XenkoGraphicsApis.Contains(';OpenGL;'))">$(RuntimeIdentifiers);win-opengl</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And $(_XenkoGraphicsApis.Contains(';OpenGLES;'))">$(RuntimeIdentifiers);win-opengles</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And $(_XenkoGraphicsApis.Contains(';Vulkan;'))">$(RuntimeIdentifiers);win-vulkan</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Linux;')) And '$(TargetFramework)' == 'netstandard2.0' And ($(_XenkoGraphicsApis.Contains(';OpenGL;')) Or '$(_XenkoGraphicsApis)' == '')">$(RuntimeIdentifiers);linux-opengl</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Linux;')) And '$(TargetFramework)' == 'netstandard2.0' And ($(_XenkoGraphicsApis.Contains(';OpenGL;')) Or '$(_XenkoGraphicsApis)' == '')">$(RuntimeIdentifiers);linux</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Linux;')) And '$(TargetFramework)' == 'netstandard2.0' And $(_XenkoGraphicsApis.Contains(';Vulkan;'))">$(RuntimeIdentifiers);linux-vulkan</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';macOS;')) And '$(TargetFramework)' == 'netstandard2.0' And ($(_XenkoGraphicsApis.Contains(';Vulkan;')) Or '$(_XenkoGraphicsApis)' == '')">$(RuntimeIdentifiers);osx-vulkan</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';macOS;')) And '$(TargetFramework)' == 'netstandard2.0' And ($(_XenkoGraphicsApis.Contains(';Vulkan;')) Or '$(_XenkoGraphicsApis)' == '')">$(RuntimeIdentifiers);osx</RuntimeIdentifiers>

<RuntimeIdentifiers>$([MSBuild]::Unescape($(RuntimeIdentifiers.Trim(';'))))</RuntimeIdentifiers>
<!-- Default fallbacks -->
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'netstandard2.0' And '$(XenkoPlatform)' == 'Linux' And '$(RuntimeIdentifiers)' == ''">linux-opengl</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'netstandard2.0' And '$(XenkoPlatform)' == 'Windows' And '$(RuntimeIdentifiers)' == ''">win-d3d11</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'netstandard2.0' And '$(XenkoPlatform)' == 'macOS' And '$(RuntimeIdentifiers)' == ''">osx-vulkan</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'netstandard2.0' And '$(XenkoPlatform)' == 'Linux' And '$(RuntimeIdentifiers)' == ''">linux</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'netstandard2.0' And '$(XenkoPlatform)' == 'Windows' And '$(RuntimeIdentifiers)' == ''">win</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'netstandard2.0' And '$(XenkoPlatform)' == 'macOS' And '$(RuntimeIdentifiers)' == ''">osx</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' != 'netstandard2.0' And '$(RuntimeIdentifiers)' == ''">any</RuntimeIdentifiers>
<RuntimeIdentifierDefault Condition="'$(RuntimeIdentifiers)' != ''">$(RuntimeIdentifiers.Split(';')[0])</RuntimeIdentifierDefault>

@@ -55,20 +55,20 @@
<!-- Compute RuntimeIdentifier (it might be different if passed from a ProjectReference) -->
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' And '$(RuntimeIdentifierDefault)' != ''">$(RuntimeIdentifierDefault)</RuntimeIdentifier>
<!-- Properly setup RuntimeIdentifier if it was not a Graphics-API-specific one -->
<RuntimeIdentifier Condition="'$(XenkoPlatform)' == 'Windows' And '$(RuntimeIdentifier)' != 'win-d3d11' And '$(RuntimeIdentifier)' != 'win-d3d12' And '$(RuntimeIdentifier)' != 'win-opengl' And '$(RuntimeIdentifier)' != 'win-opengles' And '$(RuntimeIdentifier)' != 'win-vulkan'">$(RuntimeIdentifierDefault)</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(XenkoPlatform)' == 'Linux' And '$(RuntimeIdentifier)' != 'linux-opengl' And '$(RuntimeIdentifier)' != 'linux-vulkan'">$(RuntimeIdentifierDefault)</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(XenkoPlatform)' == 'macOS' And '$(RuntimeIdentifier)' != 'osx-vulkan'">$(RuntimeIdentifierDefault)</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(XenkoPlatform)' == 'Windows' And '$(RuntimeIdentifier)' != 'win' And '$(RuntimeIdentifier)' != 'win-d3d12' And '$(RuntimeIdentifier)' != 'win-opengl' And '$(RuntimeIdentifier)' != 'win-opengles' And '$(RuntimeIdentifier)' != 'win-vulkan'">$(RuntimeIdentifierDefault)</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(XenkoPlatform)' == 'Linux' And '$(RuntimeIdentifier)' != 'linux' And '$(RuntimeIdentifier)' != 'linux-vulkan'">$(RuntimeIdentifierDefault)</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(XenkoPlatform)' == 'macOS' And '$(RuntimeIdentifier)' != 'osx'">$(RuntimeIdentifierDefault)</RuntimeIdentifier>

<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win-d3d11'">Direct3D11</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win'">Direct3D11</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win-d3d12'">Direct3D12</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win-opengl'">OpenGL</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win-opengles'">OpenGLES</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win-vulkan'">Vulkan</XenkoGraphicsApi>

<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'linux-opengl'">OpenGL</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'linux'">OpenGL</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'linux-vulkan'">Vulkan</XenkoGraphicsApi>

<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'osx-vulkan'">Vulkan</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'osx'">Vulkan</XenkoGraphicsApi>
</PropertyGroup>

<!-- Workaround: Remove RuntimeIdentifier from Solution references (https://github.com/onovotny/MSBuildSdkExtras/issues/139)

0 comments on commit 297d239

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