forked from qt-creator/qt-creator
Ship qtdiag in binary packages
Task-number: QTCREATORBUG-16135 Change-Id: I29aabb697feaf6546c807263b037d70abc0cc5eb Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
[Paths]
|
||||
Binaries = MacOS
|
||||
Imports = Imports/qtquick1
|
||||
Qml2Imports = Imports/qtquick2
|
||||
Plugins = PlugIns
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ macx {
|
||||
APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
|
||||
BINDIST_SOURCE = "$$OUT_PWD/bin/Qt Creator.app"
|
||||
BINDIST_INSTALLER_SOURCE = $$BINDIST_SOURCE
|
||||
deployqt.commands = $$PWD/scripts/deployqtHelper_mac.sh \"$${APPBUNDLE}\" \"$$[QT_INSTALL_TRANSLATIONS]\" \"$$[QT_INSTALL_PLUGINS]\" \"$$[QT_INSTALL_IMPORTS]\" \"$$[QT_INSTALL_QML]\"
|
||||
deployqt.commands = $$PWD/scripts/deployqtHelper_mac.sh \"$${APPBUNDLE}\" \"$$[QT_INSTALL_BINS]\" \"$$[QT_INSTALL_TRANSLATIONS]\" \"$$[QT_INSTALL_PLUGINS]\" \"$$[QT_INSTALL_IMPORTS]\" \"$$[QT_INSTALL_QML]\"
|
||||
codesign.commands = codesign --deep -s \"$(SIGNING_IDENTITY)\" $(SIGNING_FLAGS) \"$${APPBUNDLE}\"
|
||||
dmg.commands = $$PWD/scripts/makedmg.sh $$OUT_PWD/bin $${BASENAME}.dmg
|
||||
#dmg.depends = deployqt
|
||||
|
||||
+13
-3
@@ -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__":
|
||||
|
||||
@@ -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" \
|
||||
|
||||
Reference in New Issue
Block a user