From 88cccfb79614b2509151c9dd8f93c756e51015fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 28 May 2019 11:19:21 +0200 Subject: [PATCH] Print engine version to stdout when starting Godot Also include website URL and make it configurable via version.py together with the rest of the engine branding. Add mention to MIT license in --help output. (cherry picked from commit b10dd110e525ee7ce2dcf7721a51c93d782347de) --- main/main.cpp | 6 +++++- methods.py | 1 + version.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/main/main.cpp b/main/main.cpp index efcfb1a749e..88def7dccda 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -204,7 +204,8 @@ void finalize_physics() { void Main::print_help(const char *p_binary) { - print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - https://godotengine.org"); + print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE)); + OS::get_singleton()->print("Free and open source software under the terms of the MIT license.\n"); OS::get_singleton()->print("(c) 2007-2019 Juan Linietsky, Ariel Manzur.\n"); OS::get_singleton()->print("(c) 2014-2019 Godot Engine contributors.\n"); OS::get_singleton()->print("\n"); @@ -1087,6 +1088,9 @@ error: Error Main::setup2(Thread::ID p_main_tid_override) { + // Print engine name and version + print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE)); + if (p_main_tid_override) { Thread::_main_thread_id = p_main_tid_override; } diff --git a/methods.py b/methods.py index 11551a51d22..4f9a6ca470f 100644 --- a/methods.py +++ b/methods.py @@ -61,6 +61,7 @@ def update_version(module_version_string=""): f.write("#define VERSION_BUILD \"" + str(build_name) + "\"\n") f.write("#define VERSION_MODULE_CONFIG \"" + str(version.module_config) + module_version_string + "\"\n") f.write("#define VERSION_YEAR " + str(version.year) + "\n") + f.write("#define VERSION_WEBSITE \"" + str(version.website) + "\"\n") f.close() # NOTE: It is safe to generate this file here, since this is still executed serially diff --git a/version.py b/version.py index ae094ede520..f0958d0ba2b 100644 --- a/version.py +++ b/version.py @@ -6,3 +6,4 @@ patch = 2 status = "devel" module_config = "" year = 2019 +website = "https://godotengine.org"