summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-09-17 18:01:03 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-09-17 18:01:03 (GMT)
commit3d6aa3b50090c19b50ae488494f1459bade88da3 (patch)
tree60db50a40f01d2dc4b48e5aee1011f0e72643c39 /Swift
parent7693734b10699b5fc4bfc3d7dc33128d558e202d (diff)
downloadswift-contrib-3d6aa3b50090c19b50ae488494f1459bade88da3.zip
swift-contrib-3d6aa3b50090c19b50ae488494f1459bade88da3.tar.bz2
Support for building swiften as a DLL
Added missing SWIFTEN_API declarations. Changed test infrastructure to extend path before running tests.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/SConscript16
-rw-r--r--Swift/resources/Windows/Swift.rc4
2 files changed, 13 insertions, 7 deletions
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 5ab9c9e..c940d49 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -1,4 +1,4 @@
-import os, shutil, datetime, re
+import os, shutil, datetime, re, time
import Version
def generateDefaultTheme(dir) :
@@ -170,11 +170,17 @@ myenv["SWIFT_VERSION_MAJOR"] = int(version_match.group(1)) if version_match else
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")
+ res_env = myenv.Clone()
+ res_env.Append(CPPDEFINES = [
+ ("SWIFT_COPYRIGHT_YEAR", "\"\\\"2010-%s\\\"\"" % str(time.localtime()[0])),
+ ("SWIFT_VERSION_MAJOR", "${SWIFT_VERSION_MAJOR}"),
+ ("SWIFT_VERSION_MINOR", "${SWIFT_VERSION_MINOR}"),
+ ])
+ res = res_env.RES("#/Swift/resources/Windows/Swift.rc")
# For some reason, SCons isn't picking up the dependency correctly
# Adding it explicitly until i figure out why
- myenv.Depends(res, "../Controllers/BuildVersion.h")
- sources += [
+ myenv.Depends(res, "../Controllers/BuildVersion.h")
+ sources += [
"WinUIHelpers.cpp",
"CAPICertificateSelector.cpp",
"WindowsNotifier.cpp",
@@ -299,7 +305,7 @@ if env["PLATFORM"] == "win32" :
"#/Swift/resources/images",
]
if env["SWIFTEN_DLL"] :
- commonResources[""] = commonResources.get("", []) + ["#/Swiften/Swiften.dll"]
+ commonResources[""] = commonResources.get("", []) + ["#/Swiften/${SWIFTEN_LIBRARY_FILE}"]
qtimageformats = ["gif", "ico", "jpeg", "mng", "svg", "tiff"]
qtlibs = ["QtCore4", "QtGui4", "QtNetwork4", "QtWebKit4", "QtXMLPatterns4", "phonon4"]
myenv.WindowsBundle("Swift",
diff --git a/Swift/resources/Windows/Swift.rc b/Swift/resources/Windows/Swift.rc
index 99201e6..eb02bd1 100644
--- a/Swift/resources/Windows/Swift.rc
+++ b/Swift/resources/Windows/Swift.rc
@@ -1,7 +1,7 @@
#include "Swift/Controllers/BuildVersion.h"
1 VERSIONINFO
-// FILEVERSION 1.0
+ FILEVERSION SWIFT_VERSION_MAJOR, SWIFT_VERSION_MINOR
// PRODUCTVERSION 1.0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@@ -22,7 +22,7 @@ BEGIN
VALUE "FileDescription", "Swift\0"
VALUE "FileVersion", SWIFT_VERSION_STRING
VALUE "InternalName", "Swift\0"
- VALUE "LegalCopyright", "Copyright (C) 2010 Swift Team\0"
+ VALUE "LegalCopyright", "Copyright \251 " SWIFT_COPYRIGHT_YEAR " Swift Team\0"
VALUE "OriginalFilename", "Swift.exe\0"
VALUE "ProductName", "Swift\0"
VALUE "ProductVersion", SWIFT_VERSION_STRING