You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
[Windows] Improve console handling and execute.
Always build with the GUI subsystem. Redirect stdout and stderr output to the parent process console. Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with non-blocking calls). Add `open_console` argument to the `execute` to open a new console window (for both blocking and non-blocking calls). Remove `interface/editor/hide_console_window` editor setting. Remove `Toggle System Console` menu option. Remove `set_console_visible` and `is_console_visible` functions.
This commit is contained in:
@@ -890,7 +890,7 @@ void OS_JavaScript::finalize() {
|
||||
|
||||
// Miscellaneous
|
||||
|
||||
Error OS_JavaScript::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex) {
|
||||
Error OS_JavaScript::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex, bool p_open_console) {
|
||||
Array args;
|
||||
for (const List<String>::Element *E = p_arguments.front(); E; E = E->next()) {
|
||||
args.push_back(E->get());
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
virtual MainLoop *get_main_loop() const;
|
||||
bool main_loop_iterate();
|
||||
|
||||
virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking = true, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false, Mutex *p_pipe_mutex = NULL);
|
||||
virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking = true, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false, Mutex *p_pipe_mutex = NULL, bool p_open_console = false);
|
||||
virtual Error kill(const ProcessID &p_pid);
|
||||
virtual int get_process_id() const;
|
||||
int get_processor_count() const;
|
||||
|
||||
Reference in New Issue
Block a user