aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/bld_module.py
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-09-17 12:43:35 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-10-21 09:15:58 +0000
commitd7f7e78640355ed98125b0ec370e00fb14c117cd (patch)
tree0d8a69e85a4a296becf25a9bb6f4d6dd8c0b2b4a /packaging-tools/bld_module.py
parent0b96a2ce9eef119c1d03a1bf8ecb1f52fae60c8c (diff)
Share code for downloading and installing Qt
It was duplicated between bld_module and bld_qtcreator, and will probably be interesting for later things as well. Change-Id: Iaab7cd84d01f5f7a35eb0511a5e014c38e01a258 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
Diffstat (limited to 'packaging-tools/bld_module.py')
-rwxr-xr-xpackaging-tools/bld_module.py32
1 files changed, 6 insertions, 26 deletions
diff --git a/packaging-tools/bld_module.py b/packaging-tools/bld_module.py
index 285e7869b..81aa43f99 100755
--- a/packaging-tools/bld_module.py
+++ b/packaging-tools/bld_module.py
@@ -256,37 +256,17 @@ if not os.path.lexists(callerArguments.qt5path) and not callerArguments.qt5_modu
qmakeBinary = os.path.abspath(os.path.join(callerArguments.qt5path, 'bin', 'qmake'))
if not os.path.lexists(callerArguments.qt5path):
+ # get Qt
myGetQtBinaryWork = ThreadedWork("get and extract Qt 5 binary")
- ### add get Qt module tasks
- for qt5_url in callerArguments.qt5_module_urls:
- myGetQtBinaryWork.addTaskObject(
- bldinstallercommon.create_download_extract_task(qt5_url, callerArguments.qt5path, tempPath, callerArguments))
-
- ### add get icu lib task
- if not bldinstallercommon.is_mac_platform() and callerArguments.icu7z:
- if os.name == 'nt':
- targetPath = os.path.join(callerArguments.qt5path, 'bin')
- else:
- targetPath = os.path.join(callerArguments.qt5path, 'lib')
- myGetQtBinaryWork.addTaskObject(
- bldinstallercommon.create_download_extract_task(callerArguments.icu7z, targetPath, tempPath, callerArguments))
-
- ### run get Qt 5 tasks
+ bldinstallercommon.add_qt_download(myGetQtBinaryWork, callerArguments.qt5_module_urls,
+ callerArguments.qt5path, tempPath, callerArguments)
myGetQtBinaryWork.run()
# Save QT_INSTALL_PREFIX
qt_install_prefix = get_qt_install_prefix(callerArguments.qt5path)
- print("##### {0} #####".format("patch Qt"))
- qtConfFile = open(os.path.join(callerArguments.qt5path, 'bin', 'qt.conf'), "w")
- qtConfFile.write("[Paths]" + os.linesep)
- qtConfFile.write("Prefix=.." + os.linesep)
- qtConfFile.close()
- if sys.platform.startswith('linux'):
- bldinstallercommon.handle_component_rpath(callerArguments.qt5path, 'lib')
- print("##### {0} ##### ... done".format("patch Qt"))
- runCommand(qmakeBinary + " -query", qtModuleBuildDirectory, callerArguments)
-
+ # "install" Qt
+ bldinstallercommon.patch_qt(callerArguments.qt5path)
### lets start building
@@ -320,7 +300,7 @@ qmakeCommandArguments = [qmakeBinary]
if os.environ.get('EXTRA_QMAKE_ARGS'):
qmakeCommandArguments += [os.environ["EXTRA_QMAKE_ARGS"]]
qmakeCommandArguments += ["{0}".format(qtModuleProFile)]
-bldinstallercommon.do_execute_sub_process(qmakeCommandArguments, qtModuleBuildDirectory)
+bldinstallercommon.runCommand(qmakeCommandArguments, qtModuleBuildDirectory)
makeCommand = 'make'
if os.name == 'nt' or sys.platform == "darwin":