forked from qt-creator/qt-creator
Build/deploy: Move copying imports to deploy.py
Moving things away from deployqtHelper_mac.sh Change-Id: Ib12b3105cb632833b713b04596c8bffd80f15131 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -116,7 +116,7 @@ def ignored_qt_lib_files(path, filenames):
|
|||||||
return [fn for fn in filenames
|
return [fn for fn in filenames
|
||||||
if fn.endswith('.cpp.obj') or is_ignored_windows_file(debug_build, path, fn)]
|
if fn.endswith('.cpp.obj') or is_ignored_windows_file(debug_build, path, fn)]
|
||||||
|
|
||||||
def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_qml_dir):
|
def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir):
|
||||||
print("copying Qt libraries...")
|
print("copying Qt libraries...")
|
||||||
|
|
||||||
if common.is_windows_platform():
|
if common.is_windows_platform():
|
||||||
@@ -146,14 +146,6 @@ def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_qml_dir):
|
|||||||
else:
|
else:
|
||||||
shutil.copy(library, lib_dest)
|
shutil.copy(library, lib_dest)
|
||||||
|
|
||||||
if (os.path.exists(qt_qml_dir)):
|
|
||||||
print("Copying qt quick 2 imports")
|
|
||||||
target = os.path.join(target_qt_prefix_path, 'qml')
|
|
||||||
if (os.path.exists(target)):
|
|
||||||
shutil.rmtree(target)
|
|
||||||
print('{0} -> {1}'.format(qt_qml_dir, target))
|
|
||||||
common.copytree(qt_qml_dir, target, ignore=ignored_qt_lib_files, symlinks=True)
|
|
||||||
|
|
||||||
|
|
||||||
def deploy_qtdiag(qtc_binary_path, qt_install):
|
def deploy_qtdiag(qtc_binary_path, qt_install):
|
||||||
print("Copying qtdiag")
|
print("Copying qtdiag")
|
||||||
@@ -194,6 +186,17 @@ def deploy_plugins(qtc_binary_path, qt_install):
|
|||||||
common.copytree(pluginPath, target, ignore=ignored_qt_lib_files, symlinks=True)
|
common.copytree(pluginPath, target, ignore=ignored_qt_lib_files, symlinks=True)
|
||||||
|
|
||||||
|
|
||||||
|
def deploy_imports(qtc_binary_path, qt_install):
|
||||||
|
print("Copying qt quick 2 imports")
|
||||||
|
destdir = (os.path.join(qtc_binary_path, 'qml') if common.is_windows_platform()
|
||||||
|
else os.path.join(qtc_binary_path, 'Contents', 'Imports', 'qtquick2') if common.is_mac_platform()
|
||||||
|
else os.path.join(qtc_binary_path, '..', 'lib', 'Qt', 'qml'))
|
||||||
|
if (os.path.exists(destdir)):
|
||||||
|
shutil.rmtree(destdir)
|
||||||
|
print('{0} -> {1}'.format(qt_install.qml, destdir))
|
||||||
|
common.copytree(qt_install.qml, destdir, ignore=ignored_qt_lib_files, symlinks=True)
|
||||||
|
|
||||||
|
|
||||||
def add_qt_conf(target_path, qt_prefix_path):
|
def add_qt_conf(target_path, qt_prefix_path):
|
||||||
qtconf_filepath = os.path.join(target_path, 'qt.conf')
|
qtconf_filepath = os.path.join(target_path, 'qt.conf')
|
||||||
prefix_path = os.path.relpath(qt_prefix_path, target_path).replace('\\', '/')
|
prefix_path = os.path.relpath(qt_prefix_path, target_path).replace('\\', '/')
|
||||||
@@ -382,6 +385,7 @@ def main():
|
|||||||
|
|
||||||
deploy_qtdiag(qtcreator_binary_path, qt_install)
|
deploy_qtdiag(qtcreator_binary_path, qt_install)
|
||||||
deploy_plugins(qtcreator_binary_path, qt_install)
|
deploy_plugins(qtcreator_binary_path, qt_install)
|
||||||
|
deploy_imports(qtcreator_binary_path, qt_install)
|
||||||
|
|
||||||
if common.is_mac_platform():
|
if common.is_mac_platform():
|
||||||
deploy_mac(args)
|
deploy_mac(args)
|
||||||
@@ -394,9 +398,9 @@ def main():
|
|||||||
qt_deploy_prefix = os.path.join(install_dir, 'bin')
|
qt_deploy_prefix = os.path.join(install_dir, 'bin')
|
||||||
|
|
||||||
if common.is_windows_platform():
|
if common.is_windows_platform():
|
||||||
copy_qt_libs(qt_deploy_prefix, qt_install.bin, qt_install.bin, qt_install.qml)
|
copy_qt_libs(qt_deploy_prefix, qt_install.bin, qt_install.bin)
|
||||||
else:
|
else:
|
||||||
copy_qt_libs(qt_deploy_prefix, qt_install.bin, qt_install.lib, qt_install.qml)
|
copy_qt_libs(qt_deploy_prefix, qt_install.bin, qt_install.lib)
|
||||||
copy_translations(install_dir, qt_install.translations)
|
copy_translations(install_dir, qt_install.translations)
|
||||||
if args.llvm_path:
|
if args.llvm_path:
|
||||||
deploy_clang(install_dir, args.llvm_path, chrpath_bin)
|
deploy_clang(install_dir, args.llvm_path, chrpath_bin)
|
||||||
|
|||||||
@@ -11,21 +11,9 @@ resource_path="$app_path/Contents/Resources"
|
|||||||
libexec_path="$app_path/Contents/Resources/libexec"
|
libexec_path="$app_path/Contents/Resources/libexec"
|
||||||
bin_src="$2"
|
bin_src="$2"
|
||||||
translation_src="$3"
|
translation_src="$3"
|
||||||
quick2_src="$5"
|
|
||||||
|
|
||||||
echo "Deploying Qt"
|
echo "Deploying Qt"
|
||||||
|
|
||||||
# copy Qt Quick 2 imports
|
|
||||||
imports2Dir="$app_path/Contents/Imports/qtquick2"
|
|
||||||
if [ -d "$quick2_src" ]; then
|
|
||||||
if [ ! -d "$imports2Dir" ]; then
|
|
||||||
echo "- Copying Qt Quick 2 imports"
|
|
||||||
mkdir -p "$imports2Dir"
|
|
||||||
cp -R "$quick2_src"/ "$imports2Dir"/
|
|
||||||
find "$imports2Dir" -path "*.dylib.dSYM*" -delete
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# copy qt creator qt.conf
|
# copy qt creator qt.conf
|
||||||
if [ ! -f "$resource_path/qt.conf" ]; then
|
if [ ! -f "$resource_path/qt.conf" ]; then
|
||||||
echo "- Copying qt.conf"
|
echo "- Copying qt.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user