From 7ff184d4c980752d6e0c4f38a2eaadce4dead6f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sun, 1 Nov 2009 16:08:17 +0100
Subject: Fix incorrectly bundled Qt image plugins.


diff --git a/BuildTools/SCons/Tools/WindowsBundle.py b/BuildTools/SCons/Tools/WindowsBundle.py
index 1cada9d..bc690af 100644
--- a/BuildTools/SCons/Tools/WindowsBundle.py
+++ b/BuildTools/SCons/Tools/WindowsBundle.py
@@ -1,10 +1,12 @@
 import SCons.Util, os
 
 def generate(env) :
-  def createWindowsBundle(env, bundle, resources = [], qtlibs = []) :
+  def createWindowsBundle(env, bundle, resources = [], qtimageformats = [], qtlibs = []) :
     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])
+
     for resource in resources :
       env.Install(bundle, resource)
 
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index c70f8a0..ee1c762 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -110,8 +110,9 @@ if env["PLATFORM"] == "win32" :
 		myenv.WindowsBundle("Swift", resources = [
 				os.path.join(env["OPENSSL_DIR"], "bin", "ssleay32.dll"),	
 				os.path.join(env["OPENSSL_DIR"], "bin", "libeay32.dll"),	
-				[os.path.join(env["QTDIR"], "plugins", "imageformats", "q" + codec + "4.dll") for codec in ["gif", "ico", "jpeg", "mng", "svg", "tiff"]]
-			], qtlibs = ["QtCore4", "QtGui4", "QtNetwork4", "QtWebKit4", "phonon4"])
+			],	
+			qtimageformats = ["gif", "ico", "jpeg", "mng", "svg", "tiff"],
+			qtlibs = ["QtCore4", "QtGui4", "QtNetwork4", "QtWebKit4", "phonon4"])
 
 		myenv.Append(NSIS_OPTIONS = [
 				"/DmsvccRedistributableDir=\"" + env["vcredist"] + "\"", 
-- 
cgit v0.10.2-6-g49f6