@@ -279,10 +279,10 @@ PlatformTools* GameCooker::GetTools(BuildPlatform platform)
|
||||
#endif
|
||||
#if PLATFORM_TOOLS_UWP
|
||||
case BuildPlatform::UWPx86:
|
||||
result = New<WSAPlatformTools>(ArchitectureType::x86);
|
||||
result = New<UWPPlatformTools>(ArchitectureType::x86);
|
||||
break;
|
||||
case BuildPlatform::UWPx64:
|
||||
result = New<WSAPlatformTools>(ArchitectureType::x64);
|
||||
result = New<UWPPlatformTools>(ArchitectureType::x64);
|
||||
break;
|
||||
#endif
|
||||
#if PLATFORM_TOOLS_XBOX_ONE
|
||||
|
||||
@@ -16,6 +16,26 @@
|
||||
|
||||
IMPLEMENT_SETTINGS_GETTER(UWPPlatformSettings, UWPPlatform);
|
||||
|
||||
const Char* UWPPlatformTools::GetDisplayName() const
|
||||
{
|
||||
return TEXT("Windows Store");
|
||||
}
|
||||
|
||||
const Char* UWPPlatformTools::GetName() const
|
||||
{
|
||||
return TEXT("UWP");
|
||||
}
|
||||
|
||||
PlatformType UWPPlatformTools::GetPlatform() const
|
||||
{
|
||||
return PlatformType::UWP;
|
||||
}
|
||||
|
||||
ArchitectureType UWPPlatformTools::GetArchitecture() const
|
||||
{
|
||||
return _arch;
|
||||
}
|
||||
|
||||
bool UWPPlatformTools::UseAOT() const
|
||||
{
|
||||
return true;
|
||||
@@ -38,9 +58,8 @@ bool UWPPlatformTools::OnScriptsStepDone(CookingData& data)
|
||||
|
||||
bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
||||
{
|
||||
bool isXboxOne = data.Platform == BuildPlatform::XboxOne;
|
||||
const auto platformDataPath = Globals::StartupFolder / TEXT("Source/Platforms");
|
||||
const auto uwpDataPath = platformDataPath / (isXboxOne ? TEXT("XboxOne") : TEXT("UWP")) / TEXT("Binaries");
|
||||
const auto uwpDataPath = platformDataPath / TEXT("UWP/Binaries");
|
||||
const auto gameSettings = GameSettings::Get();
|
||||
const auto platformSettings = UWPPlatformSettings::Get();
|
||||
StringAnsi fileTemplate;
|
||||
@@ -83,7 +102,6 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
||||
mode = "x86";
|
||||
break;
|
||||
case BuildPlatform::UWPx64:
|
||||
case BuildPlatform::XboxOne:
|
||||
mode = "x64";
|
||||
break;
|
||||
default:
|
||||
@@ -240,8 +258,6 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
||||
autoRotationPreferences += "DisplayOrientations.PortraitFlipped";
|
||||
}
|
||||
StringAnsi preferredLaunchWindowingMode = platformSettings->PreferredLaunchWindowingMode == UWPPlatformSettings::WindowMode::FullScreen ? "FullScreen" : "PreferredLaunchViewSize";
|
||||
if (isXboxOne)
|
||||
preferredLaunchWindowingMode = "FullScreen";
|
||||
|
||||
// Write data to file
|
||||
auto file = FileWriteStream::Open(dstFlaxGeneratedPath);
|
||||
@@ -503,24 +519,4 @@ bool UWPPlatformTools::OnPostProcess(CookingData& data)
|
||||
return false;
|
||||
}
|
||||
|
||||
const Char* WSAPlatformTools::GetDisplayName() const
|
||||
{
|
||||
return TEXT("Windows Store");
|
||||
}
|
||||
|
||||
const Char* WSAPlatformTools::GetName() const
|
||||
{
|
||||
return TEXT("UWP");
|
||||
}
|
||||
|
||||
PlatformType WSAPlatformTools::GetPlatform() const
|
||||
{
|
||||
return PlatformType::UWP;
|
||||
}
|
||||
|
||||
ArchitectureType WSAPlatformTools::GetArchitecture() const
|
||||
{
|
||||
return _arch;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,29 +11,13 @@
|
||||
/// </summary>
|
||||
class UWPPlatformTools : public PlatformTools
|
||||
{
|
||||
public:
|
||||
|
||||
// [PlatformTools]
|
||||
bool UseAOT() const override;
|
||||
bool OnScriptsStepDone(CookingData& data) override;
|
||||
bool OnDeployBinaries(CookingData& data) override;
|
||||
void OnConfigureAOT(CookingData& data, AotConfig& config) override;
|
||||
bool OnPerformAOT(CookingData& data, AotConfig& config, const String& assemblyPath) override;
|
||||
bool OnPostProcess(CookingData& data) override;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The Windows Store platform support tools.
|
||||
/// </summary>
|
||||
class WSAPlatformTools : public UWPPlatformTools
|
||||
{
|
||||
private:
|
||||
|
||||
ArchitectureType _arch;
|
||||
|
||||
public:
|
||||
|
||||
WSAPlatformTools(ArchitectureType arch)
|
||||
UWPPlatformTools(ArchitectureType arch)
|
||||
: _arch(arch)
|
||||
{
|
||||
}
|
||||
@@ -45,7 +29,12 @@ public:
|
||||
const Char* GetName() const override;
|
||||
PlatformType GetPlatform() const override;
|
||||
ArchitectureType GetArchitecture() const override;
|
||||
bool UseAOT() const override;
|
||||
bool OnScriptsStepDone(CookingData& data) override;
|
||||
bool OnDeployBinaries(CookingData& data) override;
|
||||
void OnConfigureAOT(CookingData& data, AotConfig& config) override;
|
||||
bool OnPerformAOT(CookingData& data, AotConfig& config, const String& assemblyPath) override;
|
||||
bool OnPostProcess(CookingData& data) override;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -67,7 +67,6 @@ public class Audio : EngineModule
|
||||
switch (options.Platform.Target)
|
||||
{
|
||||
case TargetPlatform.Windows:
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.UWP:
|
||||
options.OutputFiles.Add(Path.Combine(depsRoot, "OpenAL32.lib"));
|
||||
options.DependencyFiles.Add(Path.Combine(depsRoot, "OpenAL32.dll"));
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
#pragma once
|
||||
|
||||
#define COMPILE_WITH_DEV_ENV 0
|
||||
#define OFFICIAL_BUILD 1
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace FlaxEditor.Content.Settings
|
||||
|
||||
#if FLAX_EDITOR || PLATFORM_XBOX_ONE
|
||||
/// <summary>
|
||||
/// Reference to Xbox One Platform Settings asset. Used to apply configuration on Xbox ScOnearlett platform.
|
||||
/// Reference to Xbox One Platform Settings asset. Used to apply configuration on Xbox One platform.
|
||||
/// </summary>
|
||||
[EditorOrder(2050), EditorDisplay("Platform Settings", "Xbox One"), AssetReference(XboxOnePlatformSettingsTypename, true), Tooltip("Reference to Xbox One Platform Settings asset")]
|
||||
public JsonAsset XboxOnePlatform;
|
||||
|
||||
@@ -57,10 +57,10 @@ public class Main : EngineModule
|
||||
case TargetPlatform.PS4:
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Main"));
|
||||
break;
|
||||
case TargetPlatform.XboxOne:
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Main"));
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
case TargetPlatform.XboxOne:
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Main"));
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxScarlett", "Engine", "Main"));
|
||||
break;
|
||||
case TargetPlatform.Android:
|
||||
|
||||
@@ -176,7 +176,7 @@ API_ENUM() enum class ArchitectureType
|
||||
#define PLATFORM_32BITS (!PLATFORM_64BITS)
|
||||
|
||||
// Platform family defines
|
||||
#define PLATFORM_WINDOWS_FAMILY (PLATFORM_WINDOWS || PLATFORM_UWP)
|
||||
#define PLATFORM_WINDOWS_FAMILY (PLATFORM_WINDOWS || PLATFORM_UWP || PLATFORM_XBOX_ONE || PLATFORM_XBOX_SCARLETT)
|
||||
#define PLATFORM_MICROSOFT_FAMILY (PLATFORM_WINDOWS_FAMILY)
|
||||
#define PLATFORM_UNIX_FAMILY (PLATFORM_LINUX || PLATFORM_ANDROID || PLATFORM_PS4)
|
||||
#define PLATFORM_APPLE_FAMILY (PLATFORM_IOS || PLATFORM_OSX)
|
||||
|
||||
@@ -56,11 +56,11 @@ public class Platform : EngineModule
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "Unix"));
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Platform"));
|
||||
break;
|
||||
case TargetPlatform.XboxOne:
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "Win32"));
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Platform"));
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
case TargetPlatform.XboxOne:
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "Win32"));
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Platform"));
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "Win32"));
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxScarlett", "Engine", "Platform"));
|
||||
break;
|
||||
|
||||
4
Source/ThirdParty/PhysX/PhysX.Build.cs
vendored
4
Source/ThirdParty/PhysX/PhysX.Build.cs
vendored
@@ -54,8 +54,8 @@ public class PhysX : DepsModule
|
||||
case TargetPlatform.Windows:
|
||||
case TargetPlatform.UWP:
|
||||
case TargetPlatform.Linux:
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett:
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett:
|
||||
switch (options.Architecture)
|
||||
{
|
||||
case TargetArchitecture.x86:
|
||||
|
||||
@@ -63,6 +63,17 @@ namespace Flax.Deps.Dependencies
|
||||
break;
|
||||
}
|
||||
case TargetPlatform.UWP:
|
||||
{
|
||||
var solutionPath = Path.Combine(root, "DirectXTex_Windows10_2017.sln");
|
||||
var binFolder = Path.Combine(root, "DirectXTex", "Bin", "Windows10_2017");
|
||||
Deploy.VCEnvironment.BuildSolution(solutionPath, configuration, "x64");
|
||||
var depsFolder = GetThirdPartyFolder(options, platform, TargetArchitecture.x64);
|
||||
foreach (var file in outputFileNames)
|
||||
{
|
||||
Utilities.FileCopy(Path.Combine(binFolder, "x64", configuration, file), Path.Combine(depsFolder, file));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TargetPlatform.XboxOne:
|
||||
{
|
||||
var solutionPath = Path.Combine(root, "DirectXTex_GXDK_2017.sln");
|
||||
|
||||
@@ -152,8 +152,8 @@ namespace Flax.Deps.Dependencies
|
||||
suppressBitsPostfix = true;
|
||||
binariesPrefix = "lib";
|
||||
break;
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett:
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett:
|
||||
binariesSubDir = "win.x86_64.vc142.md";
|
||||
break;
|
||||
case TargetPlatform.Android:
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<Compile Include="Platforms\Unix\*.cs" />
|
||||
<Compile Include="Platforms\UWP\*.cs" />
|
||||
<Compile Include="Platforms\Windows\*.cs" />
|
||||
<Compile Include="Platforms\XboxOne\*.cs" />
|
||||
<Compile Include="Platforms\GDK\*.cs" />
|
||||
<Compile Include="..\..\Platforms\XboxOne\Flax.Build\*.cs" />
|
||||
<Compile Include="..\..\Platforms\XboxScarlett\Flax.Build\*.cs" />
|
||||
<Compile Include="..\..\Platforms\Switch\Flax.Build\*.cs" />
|
||||
|
||||
@@ -58,8 +58,8 @@ namespace Flax.Build.Platforms
|
||||
case TargetPlatform.Windows: return GetSDKs().Count != 0;
|
||||
case TargetPlatform.UWP: return GetSDKs().FirstOrDefault(x => x.Key != WindowsPlatformSDK.v8_1).Value != null;
|
||||
case TargetPlatform.PS4: return Sdk.HasValid("PS4Sdk");
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett: return GetSDKs().ContainsKey(WindowsPlatformSDK.v10_0_19041_0) && Sdk.HasValid("GDK");
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett: return GetSDKs().ContainsKey(WindowsPlatformSDK.v10_0_19041_0) && Sdk.HasValid("GDK");
|
||||
case TargetPlatform.Android: return AndroidSdk.Instance.IsValid && AndroidNdk.Instance.IsValid;
|
||||
case TargetPlatform.Switch: return Sdk.HasValid("SwitchSdk");
|
||||
default: return false;
|
||||
|
||||
Reference in New Issue
Block a user