Fix binary modules platform name check issue
This commit is contained in:
@@ -845,6 +845,39 @@ const Char* ToString(PlatformType type)
|
||||
}
|
||||
}
|
||||
|
||||
const Char* ToStringExact(PlatformType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PlatformType::Windows:
|
||||
return TEXT("Windows");
|
||||
case PlatformType::XboxOne:
|
||||
return TEXT("XboxOne");
|
||||
case PlatformType::UWP:
|
||||
return TEXT("UWP");
|
||||
case PlatformType::Linux:
|
||||
return TEXT("Linux");
|
||||
case PlatformType::PS4:
|
||||
return TEXT("PS4");
|
||||
case PlatformType::XboxScarlett:
|
||||
return TEXT("XboxScarlett");
|
||||
case PlatformType::Android:
|
||||
return TEXT("Android");
|
||||
case PlatformType::Switch:
|
||||
return TEXT("Switch");
|
||||
case PlatformType::PS5:
|
||||
return TEXT("PS5");
|
||||
case PlatformType::Mac:
|
||||
return TEXT("Mac");
|
||||
case PlatformType::iOS:
|
||||
return TEXT("iOS");
|
||||
case PlatformType::Web:
|
||||
return TEXT("Web");
|
||||
default:
|
||||
return TEXT("");
|
||||
}
|
||||
}
|
||||
|
||||
const Char* ToString(ArchitectureType type)
|
||||
{
|
||||
switch (type)
|
||||
|
||||
@@ -906,4 +906,5 @@ public:
|
||||
};
|
||||
|
||||
extern FLAXENGINE_API const Char* ToString(PlatformType type);
|
||||
extern FLAXENGINE_API const Char* ToStringExact(PlatformType type);
|
||||
extern FLAXENGINE_API const Char* ToString(ArchitectureType type);
|
||||
|
||||
@@ -369,13 +369,13 @@ bool Scripting::LoadBinaryModules(const String& path, const String& projectFolde
|
||||
const String architecture = JsonTools::GetString(document, "Architecture");
|
||||
const String configuration = JsonTools::GetString(document, "Configuration");
|
||||
const Char* engineConfiguration = BUILD_DEBUG ? TEXT("Debug") : (BUILD_DEVELOPMENT ? TEXT("Development") : TEXT("Release"));
|
||||
if (platform != ToString(PLATFORM_TYPE) ||
|
||||
if (platform != ToStringExact(PLATFORM_TYPE) ||
|
||||
architecture != ToString(PLATFORM_ARCH) ||
|
||||
configuration != engineConfiguration)
|
||||
{
|
||||
LOG(Error, "Incorrect binary modules configuration!");
|
||||
LOG(Error, "Loaded: {}, {}, {}", platform, architecture, configuration);
|
||||
LOG(Error, "Expected: {}, {}, {}", ToString(PLATFORM_TYPE), ToString(PLATFORM_ARCH), engineConfiguration);
|
||||
LOG(Error, "Expected: {}, {}, {}", ToStringExact(PLATFORM_TYPE), ToString(PLATFORM_ARCH), engineConfiguration);
|
||||
}
|
||||
#endif
|
||||
auto versionControlInfoMember = document.FindMember("VersionControlInfo");
|
||||
|
||||
Reference in New Issue
Block a user