aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-09-02 14:36:12 +0200
committerEike Ziller <eike.ziller@qt.io>2016-09-15 09:24:36 +0000
commitf4f447c07834d568117b0d74ad46de34b92ab27b (patch)
tree9d55a4c74e16bcc3ff8e7b2d30d216be8df603b1 /scripts
parentb5c3b3159c026db4dc71685e7bc62a5a5a922aa1 (diff)
Ship qtdiag in binary packages
Task-number: QTCREATORBUG-16135 Change-Id: I29aabb697feaf6546c807263b037d70abc0cc5eb Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deployqt.py16
-rwxr-xr-xscripts/deployqtHelper_mac.sh20
2 files changed, 28 insertions, 8 deletions
diff --git a/scripts/deployqt.py b/scripts/deployqt.py
index 11ff8c013b..d2c2e7abac 100755
--- a/scripts/deployqt.py
+++ b/scripts/deployqt.py
@@ -107,7 +107,7 @@ def ignored_qt_lib_files(path, filenames):
return []
return [fn for fn in filenames if is_ignored_windows_file(debug_build, path, fn)]
-def copy_qt_libs(target_qt_prefix_path, qt_libs_dir, qt_plugin_dir, qt_import_dir, qt_qml_dir, plugins, imports):
+def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_plugin_dir, qt_import_dir, qt_qml_dir, plugins, imports):
print "copying Qt libraries..."
if common.is_windows_platform():
@@ -165,6 +165,14 @@ def copy_qt_libs(target_qt_prefix_path, qt_libs_dir, qt_plugin_dir, qt_import_di
print('{0} -> {1}'.format(qt_qml_dir, target))
common.copytree(qt_qml_dir, target, ignore=ignored_qt_lib_files, symlinks=True)
+ print "Copying qtdiag"
+ bin_dest = target_qt_prefix_path if common.is_windows_platform() else os.path.join(target_qt_prefix_path, 'bin')
+ qtdiag_src = os.path.join(qt_bin_dir, 'qtdiag.exe' if common.is_windows_platform() else 'qtdiag')
+ if not os.path.exists(bin_dest):
+ os.makedirs(bin_dest)
+ shutil.copy(qtdiag_src, bin_dest)
+
+
def add_qt_conf(target_path, qt_prefix_path):
qtconf_filepath = os.path.join(target_path, 'qt.conf')
prefix_path = os.path.relpath(qt_prefix_path, target_path).replace('\\', '/')
@@ -172,6 +180,7 @@ def add_qt_conf(target_path, qt_prefix_path):
f = open(qtconf_filepath, 'w')
f.write('[Paths]\n')
f.write('Prefix={0}\n'.format(prefix_path))
+ f.write('Binaries={0}\n'.format('bin' if common.is_linux_platform() else '.'))
f.write('Libraries={0}\n'.format('lib' if common.is_linux_platform() else '.'))
f.write('Plugins=plugins\n')
f.write('Imports=imports\n')
@@ -306,9 +315,9 @@ def main():
debug_build = is_debug_build(install_dir)
if common.is_windows_platform():
- copy_qt_libs(qt_deploy_prefix, QT_INSTALL_BINS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, QT_INSTALL_QML, plugins, imports)
+ copy_qt_libs(qt_deploy_prefix, QT_INSTALL_BINS, QT_INSTALL_BINS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, QT_INSTALL_QML, plugins, imports)
else:
- copy_qt_libs(qt_deploy_prefix, QT_INSTALL_LIBS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, QT_INSTALL_QML, plugins, imports)
+ copy_qt_libs(qt_deploy_prefix, QT_INSTALL_BINS, QT_INSTALL_LIBS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, QT_INSTALL_QML, plugins, imports)
copy_translations(install_dir, QT_INSTALL_TRANSLATIONS)
if "LLVM_INSTALL_DIR" in os.environ:
deploy_libclang(install_dir, os.environ["LLVM_INSTALL_DIR"], chrpath_bin)
@@ -317,6 +326,7 @@ def main():
print "fixing rpaths..."
common.fix_rpaths(install_dir, os.path.join(qt_deploy_prefix, 'lib'), qt_install_info, chrpath_bin)
add_qt_conf(os.path.join(install_dir, 'libexec', 'qtcreator'), qt_deploy_prefix) # e.g. for qml2puppet
+ add_qt_conf(os.path.join(qt_deploy_prefix, 'bin'), qt_deploy_prefix) # e.g. qtdiag
add_qt_conf(os.path.join(install_dir, 'bin'), qt_deploy_prefix)
if __name__ == "__main__":
diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh
index d78758145c..ca91e8dac2 100755
--- a/scripts/deployqtHelper_mac.sh
+++ b/scripts/deployqtHelper_mac.sh
@@ -25,17 +25,26 @@
#
############################################################################
-[ $# -lt 5 ] && echo "Usage: $(basename $0) <app folder> <qt translations folder> <qt plugin folder> <qt quick imports folder> <qt quick 2 imports folder>" && exit 2
+[ $# -lt 5 ] && echo "Usage: $(basename $0) <app folder> <qt bin folder> <qt translations folder> <qt plugin folder> <qt quick imports folder> <qt quick 2 imports folder>" && exit 2
[ $(uname -s) != "Darwin" ] && echo "Run this script on Mac OS X" && exit 2;
app_path="$1"
-translation_src="$2"
-plugin_src="$3"
-quick1_src="$4"
-quick2_src="$5"
+bin_src="$2"
+translation_src="$3"
+plugin_src="$4"
+quick1_src="$5"
+quick2_src="$6"
echo "Deploying Qt"
+# copy qtdiag
+echo "- Copying qtdiag"
+cp "$bin_src/qtdiag" "$app_path/Contents/MacOS/" || exit 1
+# fix rpath if qtdiag was from binary Qt package
+( xcrun install_name_tool -delete_rpath "@loader_path/../lib" "$app_path/Contents/MacOS/qtdiag" &&
+ xcrun install_name_tool -add_rpath "@loader_path/../Frameworks" "$app_path/Contents/MacOS/qtdiag" ) || true
+
+
# collect designer plugins
designerDestDir="$app_path/Contents/PlugIns/designer"
if [ ! -d "$designerDestDir" ]; then
@@ -139,6 +148,7 @@ if [ ! -d "$app_path/Contents/Frameworks/QtCore.framework" ]; then
"-executable=$app_path/Contents/Resources/ios/iossim_1_8_2" \
"-executable=$app_path/Contents/Resources/buildoutputparser" \
"-executable=$app_path/Contents/Resources/cpaster" \
+ "-executable=$app_path/Contents/MacOS/qtdiag" \
"-executable=$qbsapp" \
"-executable=$qbsapp-config" \
"-executable=$qbsapp-config-ui" \