builds godot
patch updated
bendn 2023-01-24
parent 8f8d5da · commit 3760f17
-rw-r--r--patches/no-arg-handling.patch56
1 files changed, 9 insertions, 47 deletions
diff --git a/patches/no-arg-handling.patch b/patches/no-arg-handling.patch
index be286df..692fe34 100644
--- a/patches/no-arg-handling.patch
+++ b/patches/no-arg-handling.patch
@@ -1,5 +1,5 @@
diff --git a/main/main.cpp b/main/main.cpp
-index 2d0843a331..2f46159c45 100644
+index 2326e519bf..dddcae0be2 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -156,10 +156,10 @@ static bool editor = false;
@@ -14,7 +14,7 @@ index 2d0843a331..2f46159c45 100644
static bool found_project = false;
static bool auto_build_solutions = false;
static String debug_server_uri;
-@@ -301,6 +301,7 @@ void finalize_theme_db() {
+@@ -302,6 +302,7 @@ void finalize_theme_db() {
#define MAIN_PRINT(m_txt)
#endif
@@ -22,19 +22,7 @@ index 2d0843a331..2f46159c45 100644
void Main::print_help(const char *p_binary) {
print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE));
OS::get_singleton()->print("Free and open source software under the terms of the MIT license.\n");
-@@ -319,11 +320,9 @@ void Main::print_help(const char *p_binary) {
-
- OS::get_singleton()->print("Run options:\n");
- OS::get_singleton()->print(" --, ++ Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n");
--#ifdef TOOLS_ENABLED
- OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
- OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
- OS::get_singleton()->print(" --debug-server <uri> Start the editor debug server (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007)\n");
--#endif
- OS::get_singleton()->print(" --quit Quit after the first iteration.\n");
- OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n");
- OS::get_singleton()->print(" --path <directory> Path to a project (<directory> must contain a 'project.godot' file).\n");
-@@ -429,6 +428,7 @@ void Main::print_help(const char *p_binary) {
+@@ -435,6 +436,7 @@ void Main::print_help(const char *p_binary) {
#endif
OS::get_singleton()->print("\n");
}
@@ -42,7 +30,7 @@ index 2d0843a331..2f46159c45 100644
#ifdef TESTS_ENABLED
// The order is the same as in `Main::setup()`, only core and some editor types
-@@ -669,7 +669,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
+@@ -679,7 +681,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
List<String> args;
List<String> main_args;
List<String> user_args;
@@ -52,7 +40,7 @@ index 2d0843a331..2f46159c45 100644
List<String> platform_args = OS::get_singleton()->get_cmdline_platform_args();
// Add command line arguments.
-@@ -764,6 +766,19 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
+@@ -774,6 +778,19 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
#endif
@@ -72,33 +60,7 @@ index 2d0843a331..2f46159c45 100644
if (adding_user_args) {
user_args.push_back(I->get());
} else if (I->get() == "-h" || I->get() == "--help" || I->get() == "/?") { // display help
-@@ -1028,7 +1043,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- OS::get_singleton()->print("Missing render thread mode argument, aborting.\n");
- goto error;
- }
--#ifdef TOOLS_ENABLED
- } else if (I->get() == "-e" || I->get() == "--editor") { // starts editor
-
- editor = true;
-@@ -1116,7 +1130,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- audio_driver = "Dummy";
- display_driver = "headless";
- main_args.push_back(I->get());
--#endif
- } else if (I->get() == "--path") { // set path of project to start or edit
-
- if (I->next()) {
-@@ -1148,9 +1161,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- } else {
- project_path = path;
- }
--#ifdef TOOLS_ENABLED
- editor = true;
--#endif
- } else if (I->get() == "-b" || I->get() == "--breakpoints") { // add breakpoints
-
- if (I->next()) {
-@@ -1293,18 +1304,15 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
+@@ -1315,18 +1328,15 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else {
main_args.push_back(I->get());
}
@@ -118,7 +80,7 @@ index 2d0843a331..2f46159c45 100644
// Network file system needs to be configured before globals, since globals are based on the
// 'project.godot' file which will only be available through the network if this is enabled
FileAccessNetwork::configure();
-@@ -1326,7 +1334,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
+@@ -1348,7 +1358,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
FileAccess::make_default<FileAccessNetwork>(FileAccess::ACCESS_RESOURCES);
}
@@ -127,7 +89,7 @@ index 2d0843a331..2f46159c45 100644
if (globals->setup(project_path, main_pack, upwards, editor) == OK) {
#ifdef TOOLS_ENABLED
found_project = true;
-@@ -1886,9 +1894,11 @@ error:
+@@ -1848,9 +1858,11 @@ error:
args.clear();
main_args.clear();
@@ -139,7 +101,7 @@ index 2d0843a331..2f46159c45 100644
EngineDebugger::deinitialize();
-@@ -1935,7 +1945,7 @@ error:
+@@ -1897,7 +1909,7 @@ error:
Error Main::setup2(Thread::ID p_main_tid_override) {
// Print engine name and version