summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2021-12-16 15:00:55 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2021-12-18 10:14:07 +0200
commitea5bb8b47dce95aa98f47d13ada8297670559c8b (patch)
tree17868fd701035115690b9d751a47da7858b9870f /core/os
parentb0e93711b36bae3d2bb3a7e9a4a88faf055499fb (diff)
[Windows] Improve console handling and execute/create_process.
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 `create_process`). Add `open_console` argument to the `execute` and `create_process` to open a new console window. Remove `interface/editor/hide_console_window` editor setting. Remove `Toggle System Console` menu option. Remove `set_console_visible` and `is_console_visible` functions.
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/os/os.h b/core/os/os.h
index 3042696cce..59a7052f42 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -149,8 +149,8 @@ public:
virtual int get_low_processor_usage_mode_sleep_usec() const;
virtual String get_executable_path() const;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr) = 0;
- virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr) = 0;
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) = 0;
+ virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) = 0;
virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) { return create_process(get_executable_path(), p_arguments, r_child_id); };
virtual Error kill(const ProcessID &p_pid) = 0;
virtual int get_process_id() const;