mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Pass engine name and version parts as proper strings
Removes the need for _MKSTR all over the place which has the drawback of converting _MKSTR(UNKNOWN_DEFINE) to "UKNOWN_DEFINE" instead of throwing a compilation error.
This commit is contained in:
parent
ecf80fbbba
commit
6947bed015
15 changed files with 28 additions and 31 deletions
10
methods.py
10
methods.py
|
@ -1150,7 +1150,7 @@ def build_gles3_headers(target, source, env):
|
|||
|
||||
|
||||
def add_module_version_string(self,s):
|
||||
self.module_version_string+="."+s
|
||||
self.module_version_string += "." + s
|
||||
|
||||
def update_version(module_version_string=""):
|
||||
|
||||
|
@ -1162,14 +1162,14 @@ def update_version(module_version_string=""):
|
|||
import version
|
||||
|
||||
f = open("core/version_generated.gen.h", "w")
|
||||
f.write("#define VERSION_SHORT_NAME " + str(version.short_name) + "\n")
|
||||
f.write("#define VERSION_NAME " + str(version.name) + "\n")
|
||||
f.write("#define VERSION_SHORT_NAME \"" + str(version.short_name) + "\"\n")
|
||||
f.write("#define VERSION_NAME \"" + str(version.name) + "\"\n")
|
||||
f.write("#define VERSION_MAJOR " + str(version.major) + "\n")
|
||||
f.write("#define VERSION_MINOR " + str(version.minor) + "\n")
|
||||
if (hasattr(version, 'patch')):
|
||||
f.write("#define VERSION_PATCH " + str(version.patch) + "\n")
|
||||
f.write("#define VERSION_REVISION " + str(rev) + "\n")
|
||||
f.write("#define VERSION_STATUS " + str(version.status) + "\n")
|
||||
f.write("#define VERSION_REVISION \"" + str(rev) + "\"\n")
|
||||
f.write("#define VERSION_STATUS \"" + str(version.status) + "\"\n")
|
||||
f.write("#define VERSION_MODULE_CONFIG \"" + str(version.module_config) + module_version_string + "\"\n")
|
||||
import datetime
|
||||
f.write("#define VERSION_YEAR " + str(datetime.datetime.now().year) + "\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue