summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorMalcolm Nixon <Malcolm.nixon@gmail.com>2023-12-05 23:35:52 -0500
committerMalcolm Nixon <Malcolm.nixon@gmail.com>2023-12-08 09:00:25 -0500
commit988c1bf2980d1243f7502213fabd21de74b27432 (patch)
tree314f78acbeaaf16dc11fa9bc87708f02f96d35a2 /main
parent7233bc6736e6a9e12758a52402660f9a3a892a78 (diff)
downloadredot-engine-988c1bf2980d1243f7502213fabd21de74b27432.tar.gz
Add option to install android build template for export
This PR adds a new "--install-android-build-template" command-line option which causes the android build template to be installed before exporting the project.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 3d703578a0..41332b0d01 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -510,6 +510,7 @@ void Main::print_help(const char *p_binary) {
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. See --export-release description for other considerations.\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(" --install-android-build-template Install the android build template. Used in conjunction with --export-release or --export-debug.\n");
#ifndef DISABLE_DEPRECATED
OS::get_singleton()->print(" --convert-3to4 [<max_file_kb>] [<max_line_size>]\n");
OS::get_singleton()->print(" Converts project from Godot 3.x to Godot 4.x.\n");
@@ -2793,6 +2794,7 @@ bool Main::start() {
String _export_preset;
bool export_debug = false;
bool export_pack_only = false;
+ bool install_android_build_template = false;
#ifdef MODULE_GDSCRIPT_ENABLED
String gdscript_docs_path;
#endif
@@ -2825,6 +2827,8 @@ bool Main::start() {
editor = true;
} else if (args[i] == "-p" || args[i] == "--project-manager") {
project_manager = true;
+ } else if (args[i] == "--install-android-build-template") {
+ install_android_build_template = true;
#endif // TOOLS_ENABLED
} else if (args[i].length() && args[i][0] != '-' && positional_arg.is_empty()) {
positional_arg = args[i];
@@ -3274,7 +3278,7 @@ bool Main::start() {
sml->get_root()->add_child(editor_node);
if (!_export_preset.is_empty()) {
- editor_node->export_preset(_export_preset, positional_arg, export_debug, export_pack_only);
+ editor_node->export_preset(_export_preset, positional_arg, export_debug, export_pack_only, install_android_build_template);
game_path = ""; // Do not load anything.
}