Convert C++ version string to be define instead of include

This allows Qmake to use the version number as well as not requiring all
other uses of the version string to strip double quotes from it. This
also reduces the fragility of the version string as it was required to
be a valid C++ char*, even in contexts where that wouldn't matter.
This commit is contained in:
Vasily
2019-04-19 22:30:04 +02:00
parent 9bebfe3067
commit 164158330e
6 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ def get_version_string():
def set_version_string(new_version_string):
remove(version_file_path)
with open(version_file_path, "w") as file:
file.write("\"" + new_version_string + "\"")
file.write(new_version_string)
def main():
current_version = get_version_string()
+1 -1
View File
@@ -1 +1 @@
"3.1.0-dev-new"
3.1.0-dev-new
+1 -1
View File
@@ -12,7 +12,7 @@ def get_version_string():
dir_path = os.path.dirname(os.path.realpath(__file__))
with open(dir_path + "/../compile_version_string.txt", "r") as file:
contents = file.readline()
return contents.strip('"')
return contents
#Const globals