Skip to content

Commit

Permalink
Allow running standalone scripts in non-editor builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Relintai committed Jan 2, 2024
1 parent 20ec9e2 commit 00a199a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,11 +1054,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#ifdef TOOLS_ENABLED
editor = false;
#else
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);
if (script.empty()) {
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);

goto error;
goto error;
}
#endif
}

Expand Down

0 comments on commit 00a199a

Please sign in to comment.