From a74f0cad49fbce42785136f9a0bb3e9742a80264 Mon Sep 17 00:00:00 2001 From: Vasily Date: Fri, 19 Apr 2019 17:22:08 +0200 Subject: [PATCH] Make NSIS and Win build scripts remove " character It is not strictly necessary in the Python version because it's being appended to a batch command, but in order to have things make sense if the mechanism of dispatching commands changes the program will strip double quotes. --- build_scripts/win/common.py | 2 +- installer/installer.nsi | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build_scripts/win/common.py b/build_scripts/win/common.py index 2057909..7b3ae9a 100644 --- a/build_scripts/win/common.py +++ b/build_scripts/win/common.py @@ -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 + return contents.strip('"') #Const globals diff --git a/installer/installer.nsi b/installer/installer.nsi index 69d5fd9..7303aea 100644 --- a/installer/installer.nsi +++ b/installer/installer.nsi @@ -11,7 +11,8 @@ !define THIRDDIR "..\third-party" !define PACKAGEDIR "..\src\package_files" !define PROJECTDIR "..\" - !define /file VERSION_STRING "..\build_scripts\compile_version_string.txt" + !define /file VERSION_STRING_QUOTES "..\build_scripts\compile_version_string.txt" + !searchreplace VERSION_STRING ${VERSION_STRING_QUOTES} "$\"" "" ;Installer icon