Overhaul CLI argument forwarding to processes started by the editor

This commit is contained in:
Pedro J. Estébanez
2022-08-13 21:52:03 +02:00
parent f2a6168414
commit e886d662ec
8 changed files with 58 additions and 38 deletions

View File

@@ -35,6 +35,9 @@
#include "core/os/thread.h"
#include "core/typedefs.h"
template <class T>
class Vector;
class Main {
static void print_help(const char *p_binary);
static uint64_t last_ticks;
@@ -47,6 +50,14 @@ class Main {
public:
static bool is_cmdline_tool();
#ifdef TOOLS_ENABLED
enum CLIScope {
CLI_SCOPE_TOOL, // Editor and project manager.
CLI_SCOPE_PROJECT,
};
static const Vector<String> &get_forwardable_cli_arguments(CLIScope p_scope);
#endif
static int test_entrypoint(int argc, char *argv[], bool &tests_need_run);
static Error setup(const char *execpath, int argc, char *argv[], bool p_second_phase = true);
static Error setup2(Thread::ID p_main_tid_override = 0);