Fixes for Editor on Linux
This commit is contained in:
@@ -113,9 +113,9 @@ Action ScriptsBuilder::OnCompilationFailed;
|
||||
void ScriptsBuilderImpl::sourceDirEvent(const String& path, FileSystemAction action)
|
||||
{
|
||||
// Discard non-source files or generated files
|
||||
if (!path.EndsWith(TEXT(".cs")) &&
|
||||
if ((!path.EndsWith(TEXT(".cs")) &&
|
||||
!path.EndsWith(TEXT(".cpp")) &&
|
||||
!path.EndsWith(TEXT(".h")) ||
|
||||
!path.EndsWith(TEXT(".h"))) ||
|
||||
path.EndsWith(TEXT(".Gen.cs")))
|
||||
return;
|
||||
|
||||
@@ -344,8 +344,8 @@ void ScriptsBuilder::GetBinariesConfiguration(StringView& target, StringView& pl
|
||||
|
||||
void ScriptsBuilder::GetBinariesConfiguration(const Char*& target, const Char*& platform, const Char*& architecture, const Char*& configuration)
|
||||
{
|
||||
// Special case when opening engine project
|
||||
if (Editor::Project->ProjectFolderPath == Globals::StartupFolder)
|
||||
// Special case when opening engine project
|
||||
{
|
||||
target = platform = architecture = configuration = nullptr;
|
||||
return;
|
||||
@@ -354,12 +354,18 @@ void ScriptsBuilder::GetBinariesConfiguration(const Char*& target, const Char*&
|
||||
|
||||
#if PLATFORM_WINDOWS
|
||||
platform = TEXT("Windows");
|
||||
#elif PLATFORM_LINUX
|
||||
platform = TEXT("Linux");
|
||||
#else
|
||||
#error "Unknown platform"
|
||||
#endif
|
||||
|
||||
#if PLATFORM_ARCH_X64
|
||||
architecture = TEXT("x64");
|
||||
#elif PLATFORM_ARCH_X86
|
||||
architecture = TEXT("x86");
|
||||
#else
|
||||
#error "Unknown architecture"
|
||||
#endif
|
||||
|
||||
#if BUILD_DEBUG
|
||||
@@ -368,6 +374,8 @@ void ScriptsBuilder::GetBinariesConfiguration(const Char*& target, const Char*&
|
||||
configuration = TEXT("Development");
|
||||
#elif BUILD_RELEASE
|
||||
configuration = TEXT("Release");
|
||||
#else
|
||||
#error "Unknown configuration"
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,6 @@ bool MCore::LoadEngine()
|
||||
}
|
||||
|
||||
#if MONO_DEBUG_ENABLE
|
||||
|
||||
StringAnsi debuggerIp = "127.0.0.1";
|
||||
uint16 debuggerPort = 41000 + Platform::GetCurrentProcessId() % 1000;
|
||||
if (CommandLine::Options.DebuggerAddress.HasValue())
|
||||
@@ -426,6 +425,10 @@ bool MCore::LoadEngine()
|
||||
// Hint to use default system assemblies location
|
||||
const MString assembliesPath = (Globals::MonoPath / TEXT("/lib/mono/2.1")).ToStringAnsi();
|
||||
mono_set_assemblies_path(*assembliesPath);
|
||||
#elif PLATFORM_LINUX
|
||||
// Adjust GC threads suspending mode on Linux
|
||||
Platform::SetEnvironmentVariable(TEXT("MONO_THREADS_SUSPEND"), TEXT("preemptive"));
|
||||
#endif
|
||||
#endif
|
||||
mono_config_parse(nullptr);
|
||||
|
||||
@@ -459,7 +462,6 @@ bool MCore::LoadEngine()
|
||||
configDir += "\\Mono";
|
||||
#endif
|
||||
mono_domain_set_config(monoRootDomain, configDir.Get(), configFilename.Get());
|
||||
|
||||
mono_thread_set_main(mono_thread_current());
|
||||
|
||||
// Register for threads ending to cleanup after managed runtime usage
|
||||
@@ -556,7 +558,7 @@ void MCore::GC::WaitForPendingFinalizers()
|
||||
}
|
||||
}
|
||||
|
||||
#if PLATFORM_WIN32
|
||||
#if PLATFORM_WIN32 && !USE_MONO_DYNAMIC_LIB
|
||||
|
||||
// Export Mono functions
|
||||
#pragma comment(linker, "/export:mono_add_internal_call")
|
||||
|
||||
Reference in New Issue
Block a user