Skip to content

Commit

Permalink
Fix non tools build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Relintai committed Jan 2, 2024
1 parent 00a199a commit 7a6f6aa
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
bool quiet_stdout = false;
int rtm = -1;

#ifndef TOOLS_ENABLED
bool has_script = false;
#endif

String remotefs;
String remotefs_pass;

Expand Down Expand Up @@ -600,6 +604,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
goto error;
#endif

#ifndef TOOLS_ENABLED
} else if (I->get() == "-s" || I->get() == "--script") {
has_script = true;

#endif

} else if (I->get() == "-v" || I->get() == "--verbose") { // verbose output

OS::get_singleton()->_verbose_stdout = true;
Expand Down Expand Up @@ -1054,7 +1064,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#ifdef TOOLS_ENABLED
editor = false;
#else
if (script.empty()) {
if (!has_script) {
const String error_msg = "Error: Couldn't load project data at path \"" + project_path + "\". Is the .pck file missing?\nIf you've renamed the executable, the associated .pck file should also be renamed to match the executable's name (without the extension).\n";
OS::get_singleton()->print("%s", error_msg.utf8().get_data());
OS::get_singleton()->alert(error_msg);
Expand Down

0 comments on commit 7a6f6aa

Please sign in to comment.