Add Mac platform

This commit is contained in:
Wojciech Figat
2021-12-27 14:04:16 +01:00
parent 36a18a0b56
commit d017dd14ca
62 changed files with 2384 additions and 55 deletions

View File

@@ -99,6 +99,12 @@ API_ENUM() enum class BuildPlatform
/// </summary>
API_ENUM(Attributes="EditorDisplay(null, \"PlayStation 5\")")
PS5 = 11,
/// <summary>
/// MacOS (x86-64 Intel)
/// </summary>
API_ENUM(Attributes="EditorDisplay(null, \"Mac x64\")")
MacOSx64 = 12,
};
extern FLAXENGINE_API const Char* ToString(const BuildPlatform platform);

View File

@@ -58,6 +58,10 @@
#if PLATFORM_TOOLS_SWITCH
#include "Platforms/Switch/Editor/PlatformTools/SwitchPlatformTools.h"
#endif
#if PLATFORM_TOOLS_MAC
#include "Platform/Mac/MacPlatformTools.h"
#include "Engine/Platform/Mac/MacPlatformSettings.h"
#endif
namespace GameCookerImpl
{
@@ -129,6 +133,8 @@ const Char* ToString(const BuildPlatform platform)
return TEXT("Switch");
case BuildPlatform::PS5:
return TEXT("PlayStation 5");
case BuildPlatform::MacOSx64:
return TEXT("Mac x64");
default:
return TEXT("?");
}
@@ -325,6 +331,11 @@ PlatformTools* GameCooker::GetTools(BuildPlatform platform)
case BuildPlatform::PS5:
result = New<PS5PlatformTools>();
break;
#endif
#if PLATFORM_TOOLS_MAC
case BuildPlatform::MacOSx64:
result = New<MacPlatformTools>(ArchitectureType::x64);
break;
#endif
}
Tools.Add(platform, result);

View File

@@ -103,6 +103,7 @@ namespace FlaxEditor
case BuildPlatform.AndroidARM64: return PlatformType.Android;
case BuildPlatform.XboxScarlett: return PlatformType.XboxScarlett;
case BuildPlatform.Switch: return PlatformType.Switch;
case BuildPlatform.MacOSx64: return PlatformType.Mac;
default: throw new ArgumentOutOfRangeException(nameof(buildPlatform), buildPlatform, null);
}
}

View File

@@ -186,6 +186,10 @@ bool CompileScriptsStep::Perform(CookingData& data)
platform = TEXT("PS5");
architecture = TEXT("x64");
break;
case BuildPlatform::MacOSx64:
platform = TEXT("Mac");
architecture = TEXT("x64");
break;
default:
LOG(Error, "Unknown or unsupported build platform.");
return true;