Skip to content
Permalink
Browse files

[Build] Added new CPU-specific variants to runtime.json (#370)

  • Loading branch information
xen2 committed Feb 12, 2019
1 parent 062066d commit d52b6ac6a4e01968c211f5f95806b530f3b0aedb
Showing with 316 additions and 4 deletions.
  1. +12 −1 sources/engine/Xenko/Xenko.csproj
  2. +255 −3 sources/engine/Xenko/runtime.json
  3. +49 −0 sources/engine/Xenko/runtime.tt
@@ -28,7 +28,11 @@
<Compile Include="..\..\shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<None Include="runtime.json" Pack="true" PackagePath="/" />
<None Include="runtime.json" Pack="true" PackagePath="/">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>runtime.tt</DependentUpon>
</None>
</ItemGroup>

<ItemGroup>
@@ -43,6 +47,13 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>

<ItemGroup>
<None Update="runtime.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>runtime.json</LastGenOutput>
</None>
</ItemGroup>

<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />

@@ -6,47 +6,299 @@
"any"
]
},
"linux": {
"#import": [
"linux-opengl",
"unix"
]
},
"win-d3d11": {
"#import": [
"win"
]
},
"win-d3d11-x86": {
"#import": [
"win-d3d11",
"win-x86"
]
},
"win-d3d11-x64": {
"#import": [
"win-d3d11",
"win-x64"
]
},
"win-d3d12": {
"#import": [
"win"
]
},
"win-d3d12-x86": {
"#import": [
"win-d3d12",
"win-x86"
]
},
"win-d3d12-x64": {
"#import": [
"win-d3d12",
"win-x64"
]
},
"win-opengl": {
"#import": [
"win"
]
},
"win-opengl-x86": {
"#import": [
"win-opengl",
"win-x86"
]
},
"win-opengl-x64": {
"#import": [
"win-opengl",
"win-x64"
]
},
"win-opengles": {
"#import": [
"win"
]
},
"win-opengles-x86": {
"#import": [
"win-opengles",
"win-x86"
]
},
"win-opengles-x64": {
"#import": [
"win-opengles",
"win-x64"
]
},
"win-vulkan": {
"#import": [
"win"
]
},
"linux": {
"win-vulkan-x86": {
"#import": [
"linux-opengl",
"unix"
"win-vulkan",
"win-x86"
]
},
"win-vulkan-x64": {
"#import": [
"win-vulkan",
"win-x64"
]
},
"win7-d3d11": {
"#import": [
"win-d3d11",
"win7"
]
},
"win7-d3d11-x86": {
"#import": [
"win7-d3d11",
"win7-x86"
]
},
"win7-d3d11-x64": {
"#import": [
"win7-d3d11",
"win7-x64"
]
},
"win7-d3d12": {
"#import": [
"win-d3d12",
"win7"
]
},
"win7-d3d12-x86": {
"#import": [
"win7-d3d12",
"win7-x86"
]
},
"win7-d3d12-x64": {
"#import": [
"win7-d3d12",
"win7-x64"
]
},
"win7-opengl": {
"#import": [
"win-opengl",
"win7"
]
},
"win7-opengl-x86": {
"#import": [
"win7-opengl",
"win7-x86"
]
},
"win7-opengl-x64": {
"#import": [
"win7-opengl",
"win7-x64"
]
},
"win7-opengles": {
"#import": [
"win-opengles",
"win7"
]
},
"win7-opengles-x86": {
"#import": [
"win7-opengles",
"win7-x86"
]
},
"win7-opengles-x64": {
"#import": [
"win7-opengles",
"win7-x64"
]
},
"win7-vulkan": {
"#import": [
"win-vulkan",
"win7"
]
},
"win7-vulkan-x86": {
"#import": [
"win7-vulkan",
"win7-x86"
]
},
"win7-vulkan-x64": {
"#import": [
"win7-vulkan",
"win7-x64"
]
},
"win10-d3d11": {
"#import": [
"win-d3d11",
"win10"
]
},
"win10-d3d11-x86": {
"#import": [
"win10-d3d11",
"win10-x86"
]
},
"win10-d3d11-x64": {
"#import": [
"win10-d3d11",
"win10-x64"
]
},
"win10-d3d12": {
"#import": [
"win-d3d12",
"win10"
]
},
"win10-d3d12-x86": {
"#import": [
"win10-d3d12",
"win10-x86"
]
},
"win10-d3d12-x64": {
"#import": [
"win10-d3d12",
"win10-x64"
]
},
"win10-opengl": {
"#import": [
"win-opengl",
"win10"
]
},
"win10-opengl-x86": {
"#import": [
"win10-opengl",
"win10-x86"
]
},
"win10-opengl-x64": {
"#import": [
"win10-opengl",
"win10-x64"
]
},
"win10-opengles": {
"#import": [
"win-opengles",
"win10"
]
},
"win10-opengles-x86": {
"#import": [
"win10-opengles",
"win10-x86"
]
},
"win10-opengles-x64": {
"#import": [
"win10-opengles",
"win10-x64"
]
},
"win10-vulkan": {
"#import": [
"win-vulkan",
"win10"
]
},
"win10-vulkan-x86": {
"#import": [
"win10-vulkan",
"win10-x86"
]
},
"win10-vulkan-x64": {
"#import": [
"win10-vulkan",
"win10-x64"
]
},
"linux-opengl": {
"#import": [
"linux"
]
},
"linux-opengl-x64": {
"#import": [
"linux-opengl",
"linux-x64"
]
},
"linux-vulkan": {
"#import": [
"linux"
]
},
"linux-vulkan-x64": {
"#import": [
"linux-vulkan",
"linux-x64"
]
},
"osx": {
"#import": [
"osx-vulkan",
@@ -0,0 +1,49 @@
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ 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" })
{
var platformForGraphicsPlatformVariant = platform.StartsWith("win") ? "win" : platform;
foreach (var cpuVariant in platform.StartsWith("win") ? new[] { string.Empty, "-x86", "-x64" } : new[] { string.Empty, "-x64" })
{ #>
"<#=platform#>-<#= graphicsPlatform #><#= cpuVariant #>": {
"#import": [
<# if (cpuVariant != string.Empty) { #>
"<#= platform #>-<#= graphicsPlatform #>",
<# } else if (platformForGraphicsPlatformVariant != platform) { #>
"<#= platformForGraphicsPlatformVariant #>-<#= graphicsPlatform #>",
<# } #>
"<#= platform #><#= cpuVariant #>"
]
},
<# }
}
} #>
"osx": {
"#import": [
"osx-vulkan",
"unix"
]
}
}
}

0 comments on commit d52b6ac

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