summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp31
1 files changed, 22 insertions, 9 deletions
diff --git a/main/main.cpp b/main/main.cpp
index a5196da939..5b998d98ce 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -407,10 +407,11 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" -s, --script <script> Run a script.\n");
OS::get_singleton()->print(" --check-only Only parse for errors and quit (use with --script).\n");
#ifdef TOOLS_ENABLED
- OS::get_singleton()->print(" --export <preset> <path> Export the project using the given preset and matching release template. The preset name should match one defined in export_presets.cfg.\n");
- OS::get_singleton()->print(" <path> should be absolute or relative to the project directory, and include the filename for the binary (e.g. 'builds/game.exe'). The target directory should exist.\n");
- OS::get_singleton()->print(" --export-debug <preset> <path> Same as --export, but using the debug template.\n");
- OS::get_singleton()->print(" --export-pack <preset> <path> Same as --export, but only export the game pack for the given preset. The <path> extension determines whether it will be in PCK or ZIP format.\n");
+ OS::get_singleton()->print(" --export-release <preset> <path> Export the project in release mode using the given preset and output path. The preset name should match one defined in export_presets.cfg.\n");
+ OS::get_singleton()->print(" <path> should be absolute or relative to the project directory, and include the filename for the binary (e.g. 'builds/game.exe').\n");
+ OS::get_singleton()->print(" The target directory must exist.\n");
+ OS::get_singleton()->print(" --export-debug <preset> <path> Export the project in debug mode using the given preset and output path. The preset name should match one defined in export_presets.cfg.\n");
+ OS::get_singleton()->print(" --export-pack <preset> <path> Export the project data only using the given preset and output path. The <path> extension determines whether it will be in PCK or ZIP format.\n");
OS::get_singleton()->print(" --convert-3to4 [<max_file_kb>] [<max_line_size>] Converts project from Godot 3.x to Godot 4.x.\n");
OS::get_singleton()->print(" --validate-conversion-3to4 [<max_file_kb>] [<max_line_size>] Shows what elements will be renamed when converting project from Godot 3.x to Godot 4.x.\n");
OS::get_singleton()->print(" --doctool [<path>] Dump the engine API reference to the given <path> (defaults to current dir) in XML format, merging if existing files are found.\n");
@@ -620,7 +621,7 @@ int Main::test_entrypoint(int argc, char *argv[], bool &tests_need_run) {
* - setup(execpath, argc, argv, p_second_phase) is the main entry point for all platforms,
* responsible for the initialization of all low level singletons and core types, and parsing
* command line arguments to configure things accordingly.
- * If p_second_phase is true, it will chain into setup2() (default behaviour). This is
+ * If p_second_phase is true, it will chain into setup2() (default behavior). This is
* disabled on some platforms (Android, iOS, UWP) which trigger the second step in their
* own time.
*
@@ -1077,7 +1078,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// run the project instead of a cmdline tool.
// Needs full refactoring to fix properly.
main_args.push_back(I->get());
- } else if (I->get() == "--export" || I->get() == "--export-debug" ||
+ } else if (I->get() == "--export-release" || I->get() == "--export-debug" ||
I->get() == "--export-pack") { // Export project
// Actually handling is done in start().
editor = true;
@@ -1543,6 +1544,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if (default_renderer_mobile.is_empty()) {
default_renderer_mobile = "gl_compatibility";
}
+ // Default to Compatibility when using the project manager.
+ if (rendering_driver.is_empty() && rendering_method.is_empty() && project_manager) {
+ rendering_driver = "opengl3";
+ rendering_method = "gl_compatibility";
+ }
#endif
if (renderer_hints.is_empty()) {
ERR_PRINT("No renderers available.");
@@ -1603,11 +1609,17 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// Now validate whether the selected driver matches with the renderer.
bool valid_combination = false;
Vector<String> available_drivers;
+#ifdef VULKAN_ENABLED
if (rendering_method == "forward_plus" || rendering_method == "mobile") {
available_drivers.push_back("vulkan");
- } else if (rendering_method == "gl_compatibility") {
+ }
+#endif
+#ifdef GLES3_ENABLED
+ if (rendering_method == "gl_compatibility") {
available_drivers.push_back("opengl3");
- } else {
+ }
+#endif
+ if (available_drivers.is_empty()) {
OS::get_singleton()->print("Unknown renderer name '%s', aborting.\n", rendering_method.utf8().get_data());
goto error;
}
@@ -1820,6 +1832,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
PROPERTY_HINT_RANGE,
"0,33200,1,or_greater")); // No negative numbers
+ GLOBAL_DEF("display/window/ios/allow_high_refresh_rate", true);
GLOBAL_DEF("display/window/ios/hide_home_indicator", true);
GLOBAL_DEF("display/window/ios/hide_status_bar", true);
GLOBAL_DEF("display/window/ios/suppress_ui_gesture", true);
@@ -2461,7 +2474,7 @@ bool Main::start() {
doc_tool_path = ".";
parsed_pair = false;
}
- } else if (args[i] == "--export") {
+ } else if (args[i] == "--export-release") {
editor = true; //needs editor
_export_preset = args[i + 1];
} else if (args[i] == "--export-debug") {