From 39342e46bdf3a2b12bff5bd267809bf4dfc277b5 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 7 May 2015 09:52:42 +0200 Subject: Add support for Qt 5.4.1 to build and distribution process on Windows Test-Information: Tested with Qt 5.3.2 and Qt 5.4.1 from qt.io website. Change-Id: Iada3e64e530d8a5b53b8b5c8943bcafbd9bd6c64 diff --git a/BuildTools/SCons/Tools/WindowsBundle.py b/BuildTools/SCons/Tools/WindowsBundle.py index 10821e9..744d5c8 100644 --- a/BuildTools/SCons/Tools/WindowsBundle.py +++ b/BuildTools/SCons/Tools/WindowsBundle.py @@ -16,10 +16,17 @@ def which(program_name): def generate(env) : def captureWinDeployQtMapping(release = True): p = False + + qt_bin_folder = "" + if "QTDIR" in env: + qt_bin_folder = env["QTDIR"] + "\\bin;" + + environ = {"PATH": qt_bin_folder + os.getenv("PATH"), "TEMP": os.getenv("TEMP"), "TMP": os.getenv("TMP")} + if release: - p = subprocess.Popen(['windeployqt', '--release', '--dry-run', '--list', 'mapping', 'Swift.exe'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen(['windeployqt', '--release', '--dry-run', '--list', 'mapping', 'Swift.exe'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=environ) else: - p = subprocess.Popen(['windeployqt', '--debug', '--dry-run', '--list', 'mapping', 'Swift.exe'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen(['windeployqt', '--debug', '--dry-run', '--list', 'mapping', 'Swift.exe'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=environ) if p: stdout, stderr = p.communicate() diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py index be8621b..17292d9 100644 --- a/BuildTools/SCons/Tools/qt4.py +++ b/BuildTools/SCons/Tools/qt4.py @@ -439,6 +439,7 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, version='4' 'QtWidgets', 'QtMultimedia', 'QtWebKitWidgets', + 'QtWebChannel', ] if sys.platform != "win32" and sys.platform != "darwin" and not crosscompiling : validModules += ['QtX11Extras'] @@ -542,6 +543,7 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, version='4' else : self["QT4_MOCCPPPATH"] = self["CPPPATH"] self.AppendUnique(LIBPATH=[os.path.join('$QTDIR','lib')]) + self.PrependUnique(LIBS=["shell32"]) return if sys.platform=="darwin" : diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 86b41d3..fb4d853 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -393,7 +393,7 @@ if env["PLATFORM"] == "win32" : qtlibs.append("phonon") qtlibs = [lib + '4' for lib in qtlibs] else : - qtlibs += ['QtQuick', 'QtQml', 'QtPositioning', 'QtMultimedia', 'QtSql', 'QtSensors', 'QtWidgets', 'QtWebKitWidgets', 'QtMultimediaWidgets', 'QtOpenGL', 'QtPrintSupport'] + qtlibs += ['QtQuick', 'QtQml', 'QtPositioning', 'QtMultimedia', 'QtSql', 'QtSensors', 'QtWidgets', 'QtWebChannel', 'QtWebKitWidgets', 'QtMultimediaWidgets', 'QtOpenGL', 'QtPrintSupport'] qtlibs = [lib.replace('Qt', 'Qt5') for lib in qtlibs] qtlibs += ['icuin51', 'icuuc51', 'icudt51', 'libGLESv2', 'libEGL'] qtplugins["platforms"] = ['windows'] -- cgit v0.10.2-6-g49f6