You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Overhaul CLI argument forwarding to processes started by the editor
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_themes.h"
|
||||
#include "editor/editor_vcs_interface.h"
|
||||
#include "main/main.h"
|
||||
#include "scene/gui/center_container.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
@@ -2109,27 +2110,15 @@ void ProjectManager::_open_selected_projects() {
|
||||
|
||||
List<String> args;
|
||||
|
||||
for (const String &a : Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_TOOL)) {
|
||||
args.push_back(a);
|
||||
}
|
||||
|
||||
args.push_back("--path");
|
||||
args.push_back(path);
|
||||
|
||||
args.push_back("--editor");
|
||||
|
||||
if (OS::get_singleton()->is_stdout_debug_enabled()) {
|
||||
args.push_back("--debug");
|
||||
}
|
||||
|
||||
if (OS::get_singleton()->is_stdout_verbose()) {
|
||||
args.push_back("--verbose");
|
||||
}
|
||||
|
||||
if (OS::get_singleton()->is_disable_crash_handler()) {
|
||||
args.push_back("--disable-crash-handler");
|
||||
}
|
||||
|
||||
if (OS::get_singleton()->is_single_window()) {
|
||||
args.push_back("--single-window");
|
||||
}
|
||||
|
||||
Error err = OS::get_singleton()->create_instance(args);
|
||||
ERR_FAIL_COND(err);
|
||||
}
|
||||
@@ -2242,13 +2231,13 @@ void ProjectManager::_run_project_confirm() {
|
||||
|
||||
List<String> args;
|
||||
|
||||
for (const String &a : Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_PROJECT)) {
|
||||
args.push_back(a);
|
||||
}
|
||||
|
||||
args.push_back("--path");
|
||||
args.push_back(path);
|
||||
|
||||
if (OS::get_singleton()->is_disable_crash_handler()) {
|
||||
args.push_back("--disable-crash-handler");
|
||||
}
|
||||
|
||||
Error err = OS::get_singleton()->create_instance(args);
|
||||
ERR_FAIL_COND(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user