diff options
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/Packaging/nsis/swift.nsi | 2 | ||||
-rw-r--r-- | Swift/QtUI/.gitignore | 1 | ||||
-rw-r--r-- | Swift/QtUI/SConscript | 11 |
3 files changed, 9 insertions, 5 deletions
diff --git a/Swift/Packaging/nsis/swift.nsi b/Swift/Packaging/nsis/swift.nsi index afbee3c..6a9f0d2 100644 --- a/Swift/Packaging/nsis/swift.nsi +++ b/Swift/Packaging/nsis/swift.nsi @@ -2,7 +2,7 @@ !define msvccRedistributableExe "vcredist_x86.exe" # define installer name -outFile "Swift-installer-win32-${buildDate}.exe" +outFile "Swift-installer-win32-${buildVersion}.exe" # set desktop as install directory installDir "$PROGRAMFILES\Swift" diff --git a/Swift/QtUI/.gitignore b/Swift/QtUI/.gitignore index c1390ab..b776b0d 100644 --- a/Swift/QtUI/.gitignore +++ b/Swift/QtUI/.gitignore @@ -1 +1,2 @@ Swift +BuildVersion.h diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 384dcd4..43211a9 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -1,4 +1,5 @@ import os, shutil, datetime +import Version def generateDefaultTheme(env, target, source) : sourceDir = source[0].abspath @@ -77,6 +78,8 @@ sources = [ "qrc_Swift.cc", ] +myenv.BuildVersion("BuildVersion.h", version = ARGUMENTS.get("swift_version", None)) + if env["PLATFORM"] == "win32" : myenv.RES("../resources/Windows/Swift.rc") sources += ["../resources/Windows/Swift.res"] @@ -91,10 +94,10 @@ myenv.Uic4("QtAddContactDialog.ui") myenv.Qrc("DefaultTheme.qrc") myenv.Qrc("Swift.qrc") +buildVersion = Version.getBuildVersion(ARGUMENTS.get("swift_version", None)) + if env["PLATFORM"] == "darwin" : - myenv.AppBundle("Swift", resources = [ - "../resources/MacOSX/Swift.icns" - ]) + myenv.AppBundle("Swift", version = buildVersion, resources = ["../resources/MacOSX/Swift.icns"]) if env["PLATFORM"] == "win32" : if "dist" in COMMAND_LINE_TARGETS or env.GetOption("clean") : @@ -106,6 +109,6 @@ if env["PLATFORM"] == "win32" : myenv.Append(NSIS_OPTIONS = [ "/DmsvccRedistributableDir=\"" + env["vcredist"] + "\"", - "/DbuildDate=" + datetime.date.today().strftime("%Y%m%d") + "/DbuildVersion=" + buildVersion ]) myenv.Nsis("../Packaging/nsis/swift.nsi") |