diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-08-28 19:56:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-08-28 19:56:51 (GMT) |
commit | ca35957a3090dc38cfb71496e9d2d4016bb1bc9b (patch) | |
tree | 008bedd0de3e98be046524f572a196eadbe5e1ba /Swift/QtUI | |
parent | 17444b1ad6e3a14b3fb3c194ba60042ad29c2c03 (diff) | |
download | swift-ca35957a3090dc38cfb71496e9d2d4016bb1bc9b.zip swift-ca35957a3090dc38cfb71496e9d2d4016bb1bc9b.tar.bz2 |
Add SCons tool to dump build version in a file.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/.gitignore | 1 | ||||
-rw-r--r-- | Swift/QtUI/SConscript | 11 |
2 files changed, 8 insertions, 4 deletions
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") |