Fix support for codeless game projects
This commit is contained in:
@@ -211,7 +211,7 @@ void ScriptsBuilder::Compile()
|
||||
_isCompileRequested = true;
|
||||
}
|
||||
|
||||
bool ScriptsBuilder::RunBuildTool(const StringView& args)
|
||||
bool ScriptsBuilder::RunBuildTool(const StringView& args, const StringView& workingDir)
|
||||
{
|
||||
PROFILE_CPU();
|
||||
const String buildToolPath = Globals::StartupFolder / TEXT("Binaries/Tools/Flax.Build.exe");
|
||||
@@ -242,7 +242,7 @@ bool ScriptsBuilder::RunBuildTool(const StringView& args)
|
||||
// TODO: Set env var for the mono MONO_GC_PARAMS=nursery-size64m to boost build performance -> profile it
|
||||
|
||||
// Call build tool
|
||||
const int32 result = Platform::RunProcess(StringView(*cmdLine, cmdLine.Length()), StringView::Empty);
|
||||
const int32 result = Platform::RunProcess(StringView(*cmdLine, cmdLine.Length()), workingDir);
|
||||
return result != 0;
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ void ScriptsBuilder::GetBinariesConfiguration(const Char*& target, const Char*&
|
||||
else
|
||||
{
|
||||
target = TEXT("");
|
||||
LOG(Error, "Missing editor/game targets in project. Please specify EditorTarget and GameTarget properties in .flaxproj file.");
|
||||
LOG(Warning, "Missing editor/game targets in project. Please specify EditorTarget and GameTarget properties in .flaxproj file.");
|
||||
}
|
||||
|
||||
#if PLATFORM_WINDOWS
|
||||
@@ -395,7 +395,7 @@ bool ScriptsBuilderImpl::compileGameScriptsAsyncInner()
|
||||
// Call compilation
|
||||
const Char *target, *platform, *architecture, *configuration;
|
||||
ScriptsBuilder::GetBinariesConfiguration(target, platform, architecture, configuration);
|
||||
if (!target)
|
||||
if (StringUtils::Length(target) == 0)
|
||||
{
|
||||
LOG(Info, "Missing EditorTarget in project. Skipping compilation.");
|
||||
CallEvent(EventType::ReloadCalled);
|
||||
@@ -580,7 +580,7 @@ bool ScriptsBuilderService::Init()
|
||||
// Remove any remaining files from previous Editor run hot-reloads
|
||||
const Char *target, *platform, *architecture, *configuration;
|
||||
ScriptsBuilder::GetBinariesConfiguration(target, platform, architecture, configuration);
|
||||
if (target)
|
||||
if (StringUtils::Length(target) != 0)
|
||||
{
|
||||
const String targetOutput = Globals::ProjectFolder / TEXT("Binaries") / target / platform / architecture / configuration;
|
||||
Array<String> files;
|
||||
|
||||
Reference in New Issue
Block a user