diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-04-24 20:31:58 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-04-24 20:32:32 (GMT) |
commit | 54ebf839511d49007d7fa7fc18be753a8883e057 (patch) | |
tree | 7cb7d2e34fa1860d39dc581a1474576c44f80c34 /Swift/QtUI | |
parent | 08376a65babc16285608b7f8a84f1202b709d4c8 (diff) | |
download | swift-contrib-54ebf839511d49007d7fa7fc18be753a8883e057.zip swift-contrib-54ebf839511d49007d7fa7fc18be753a8883e057.tar.bz2 |
Add version variable to WiX vars.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/SConscript | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index ea13b8d..97b1810 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -1,4 +1,4 @@ -import os, shutil, datetime +import os, shutil, datetime, re import Version def generateDefaultTheme(dir) : @@ -151,6 +151,9 @@ sources = [ ] myenv["SWIFT_VERSION"] = Version.getBuildVersion(env.Dir("#").abspath, "swift") +version_match = re.match("(\d+)\.(\d+).*", myenv["SWIFT_VERSION"]) +myenv["SWIFT_VERSION_MAJOR"] = int(version_match.group(1)) if version_match else 0 +myenv["SWIFT_VERSION_MINOR"] = int(version_match.group(2)) if version_match else 0 if env["PLATFORM"] == "win32" : res = myenv.RES("#/Swift/resources/Windows/Swift.rc") @@ -301,7 +304,10 @@ if env["PLATFORM"] == "win32" : infile.close() env.Command(["Swift/COPYING.rtf"], ["../../COPYING"], convertToRTF) - wixvariables = {'VCCRTFile': env.get("vcredist", "c:\\Program Files\\Common Files\\Merge Modules") + "\\Microsoft_VC90_CRT_x86.msm"} + wixvariables = { + 'VCCRTFile': env.get("vcredist", "c:\\Program Files\\Common Files\\Merge Modules") + "\\Microsoft_VC90_CRT_x86.msm", + 'Version': str(myenv["SWIFT_VERSION_MAJOR"]) + "." + str(myenv["SWIFT_VERSION_MINOR"]) + } wixincludecontent = "<Include>" for key in wixvariables: wixincludecontent += "<?define %s = \"%s\" ?>" % (key, wixvariables[key]) |