summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-28 19:56:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-28 19:56:51 (GMT)
commitca35957a3090dc38cfb71496e9d2d4016bb1bc9b (patch)
tree008bedd0de3e98be046524f572a196eadbe5e1ba /Swift
parent17444b1ad6e3a14b3fb3c194ba60042ad29c2c03 (diff)
downloadswift-contrib-ca35957a3090dc38cfb71496e9d2d4016bb1bc9b.zip
swift-contrib-ca35957a3090dc38cfb71496e9d2d4016bb1bc9b.tar.bz2
Add SCons tool to dump build version in a file.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Packaging/nsis/swift.nsi2
-rw-r--r--Swift/QtUI/.gitignore1
-rw-r--r--Swift/QtUI/SConscript11
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")