diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-10-07 09:10:30 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-10-07 09:10:30 (GMT) |
commit | b01e339e89143684f7f1406bf3ce07481e98b5bc (patch) | |
tree | 906668380cea28070550ed96f0dca15bd8e8e91f | |
parent | de3228cf736a154ebfebe55e972e451211bf0df0 (diff) | |
download | swift-contrib-b01e339e89143684f7f1406bf3ce07481e98b5bc.zip swift-contrib-b01e339e89143684f7f1406bf3ce07481e98b5bc.tar.bz2 |
Fixed & cleaned up some of the WiX stuff.
-rw-r--r-- | BuildTools/SCons/Tools/WindowsBundle.py | 12 | ||||
-rw-r--r-- | Swift/QtUI/SConscript | 30 |
2 files changed, 13 insertions, 29 deletions
diff --git a/BuildTools/SCons/Tools/WindowsBundle.py b/BuildTools/SCons/Tools/WindowsBundle.py index e351884..c3c77aa 100644 --- a/BuildTools/SCons/Tools/WindowsBundle.py +++ b/BuildTools/SCons/Tools/WindowsBundle.py @@ -2,19 +2,21 @@ import SCons.Util, os def generate(env) : def createWindowsBundle(env, bundle, resources = {}, qtimageformats = [], qtlibs = []) : - env.Install(bundle, bundle + ".exe") + all_files = [] + all_files += env.Install(bundle, bundle + ".exe") for lib in qtlibs : - env.Install(bundle, os.path.join(env["QTDIR"], "bin", lib + ".dll")) - env.Install(os.path.join(bundle, "imageformats"), [os.path.join(env["QTDIR"], "plugins", "imageformats", "q" + codec + "4.dll") for codec in qtimageformats]) + all_files += env.Install(bundle, os.path.join(env["QTDIR"], "bin", lib + ".dll")) + all_files += env.Install(os.path.join(bundle, "imageformats"), [os.path.join(env["QTDIR"], "plugins", "imageformats", "q" + codec + "4.dll") for codec in qtimageformats]) for dir, resourceFiles in resources.items() : for resource in resourceFiles : e = env.Entry(resource) if e.isdir() : for subresource in env.Glob(str(e) + "/*") : - env.Install(os.path.join(bundle, dir, e.name), subresource) + all_files += env.Install(os.path.join(bundle, dir, e.name), subresource) else : - env.Install(os.path.join(bundle, dir), resource) + all_files += env.Install(os.path.join(bundle, dir), resource) + return all_files env.AddMethod(createWindowsBundle, "WindowsBundle") diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 5e6f924..02d9ded 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -310,7 +310,7 @@ if env["PLATFORM"] == "win32" : commonResources[""] = commonResources.get("", []) + ["#/Swiften/${SWIFTEN_LIBRARY_FILE}"] qtimageformats = ["gif", "ico", "jpeg", "mng", "svg", "tiff"] qtlibs = ["QtCore4", "QtGui4", "QtNetwork4", "QtWebKit4", "QtXMLPatterns4", "phonon4"] - myenv.WindowsBundle("Swift", + windowsBundleFiles = myenv.WindowsBundle("Swift", resources = commonResources, qtimageformats = qtimageformats, qtlibs = qtlibs) @@ -320,7 +320,6 @@ if env["PLATFORM"] == "win32" : # "/DbuildVersion=" + myenv["SWIFT_VERSION"] # ]) #myenv.Nsis("../Packaging/nsis/swift.nsi") - #myenv.WiX("../Packaging/wix/swift.msi", ["../Packaging/WiX/Swift.wxs"]) if env["SCONS_STAGE"] == "build" and env.get("wix_bindir", None): def convertToRTF(env, target, source) : infile = open(source[0].abspath, 'r') @@ -352,28 +351,11 @@ if env["PLATFORM"] == "win32" : wixincludecontent += "<?define %s = \"%s\" ?>" % (key, wixvariables[key]) wixincludecontent += "</Include>" myenv.WriteVal("..\\Packaging\\Wix\\variables.wxs", env.Value(wixincludecontent)) - heatDependencies = ['Swift/COPYING.rtf', 'Swift/Swift.exe'] - for dir, resourceFiles in commonResources.items(): - for resource in resourceFiles: - e = env.Entry(resource) - if e.isdir(): - for subresource in env.Glob(str(e) + "/*") : - heatDependencies.append("Swift/" + e.name + "/" + subresource.name) - else: - if resource[-3:] != ".qm": - heatDependencies.append("Swift/" + resource) - for resource in qtlibs: - heatDependencies.append("Swift/" + resource + ".dll") - for resource in qtimageformats: - heatDependencies.append("Swift/imageformats/q" + resource + "4.dll") - for lang in translation_languages: - heatDependencies.append("Swift/translations/swift_" + lang + ".qm") - myenv.WiX_Heat('..\\Packaging\\WiX\\gen_files.wxs', heatDependencies) - myenv.WiX_Light('..\\..\\..\\Packages\\Swift\\Swift-' + myenv["SWIFT_VERSION"] + '.msi', [ - myenv.WiX_Candle('..\\Packaging\\WiX\\Swift.wixobj', '..\\Packaging\\WiX\\Swift.wxs') + - myenv.WiX_Candle('..\\Packaging\\WiX\\gen_files.wixobj', '..\\Packaging\\WiX\\gen_files.wxs') - ] - ) + myenv.WiX_Heat('..\\Packaging\\WiX\\gen_files.wxs', windowsBundleFiles) + myenv.WiX_Candle('..\\Packaging\\WiX\\Swift.wixobj', '..\\Packaging\\WiX\\Swift.wxs') + myenv.WiX_Candle('..\\Packaging\\WiX\\gen_files.wixobj', '..\\Packaging\\WiX\\gen_files.wxs') + myenv.WiX_Light('#/Packages/Swift-' + myenv["SWIFT_VERSION"] + '.msi', ['..\\Packaging\\WiX\\gen_files.wixobj','..\\Packaging\\WiX\\Swift.wixobj']) + if myenv["debug"] : myenv.InstallAs('#/Packages/Swift/Swift-' + myenv["SWIFT_VERSION"] + '.pdb', "Swift.pdb") |