Add support for Game Cooker on Linux

This commit is contained in:
Wojtek Figat
2021-03-11 22:39:03 +01:00
parent b04321bdd2
commit b4dcaef61a
4 changed files with 51 additions and 8 deletions

View File

@@ -61,6 +61,9 @@ namespace FlaxEditor.Windows
public abstract class Platform
{
[HideInEditor]
public bool IsSupported;
[HideInEditor]
public bool IsAvailable;
@@ -93,6 +96,23 @@ namespace FlaxEditor.Windows
{
Output = output;
// Check if can build on that platform
#if PLATFORM_WINDOWS
IsSupported = true;
#elif PLATFORM_LINUX
switch (BuildPlatform)
{
case BuildPlatform.LinuxX64:
IsSupported = true;
break;
default:
IsSupported = false;
break;
}
#else
#error "Unknown platform."
#endif
// TODO: restore build settings from the Editor cache!
// Check if can find installed tools for this platform
@@ -179,7 +199,11 @@ namespace FlaxEditor.Windows
_platform = proxy.Selector.Selected;
var platformObj = proxy.PerPlatformOptions[_platform];
if (platformObj.IsAvailable)
if (!platformObj.IsSupported)
{
layout.Label("This platform is not supported on this system.", TextAlignment.Center);
}
else if (platformObj.IsAvailable)
{
string name;
switch (_platform)