diff options
author | Eike Ziller <eike.ziller@qt.io> | 2022-12-20 11:05:01 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-12-20 11:05:01 +0100 |
commit | 3f4c3a3db448a5ddc23a317c95478b108ccebd0b (patch) | |
tree | ee902de2bd973fdd03820f5c11e991e88f47dda3 /scripts | |
parent | 68e15e613f4e3a20a055ad8a1ad0806c742d0770 (diff) | |
parent | 77dfa71f0618278ff974d0f274bb87fc36c91077 (diff) |
Merge remote-tracking branch 'origin/9.0'
Conflicts:
cmake/QtCreatorIDEBranding.cmake
qbs/modules/qtc/qtc.qbs
qtcreator_ide_branding.pri
src/plugins/texteditor/texteditor.cpp
Change-Id: I9c8f1331be3f5442f1fd28aeb0a9bc07128629d1
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_plugin.py | 22 | ||||
-rwxr-xr-x | scripts/deployqt.py | 7 | ||||
-rwxr-xr-x | scripts/deployqtHelper_mac.sh | 3 |
3 files changed, 30 insertions, 2 deletions
diff --git a/scripts/build_plugin.py b/scripts/build_plugin.py index 4e142bcd1e..df06908c9d 100755 --- a/scripts/build_plugin.py +++ b/scripts/build_plugin.py @@ -39,6 +39,13 @@ def get_arguments(): action='store_true', default=False) parser.add_argument('--build-type', help='Build type to pass to CMake (defaults to RelWithDebInfo)', default='RelWithDebInfo') + # zipping + parser.add_argument('--zip-threads', help='Sets number of threads to use for 7z. Use "+" for turning threads on ' + 'without a specific number of threads. This is directly passed to the "-mmt" option of 7z.', + default='2') + # signing + parser.add_argument('--keychain-unlock-script', + help='Path to script for unlocking the keychain used for signing (macOS)') args = parser.parse_args() args.with_debug_info = args.build_type == 'RelWithDebInfo' return args @@ -144,6 +151,21 @@ def package(args, paths): common.check_print_call(['7z', 'a', '-mmt2', os.path.join(paths.result, args.name + '-debug.7z'), '*'], paths.debug_install) + if common.is_mac_platform() and common.codesign_call(): + if args.keychain_unlock_script: + common.check_print_call([args.keychain_unlock_script], paths.install) + if os.environ.get('SIGNING_IDENTITY'): + signed_install_path = paths.install + '-signed' + common.copytree(paths.install, signed_install_path, symlinks=True) + apps = [d for d in os.listdir(signed_install_path) if d.endswith('.app')] + if apps: + app = apps[0] + common.conditional_sign_recursive(os.path.join(signed_install_path, app), + lambda ff: ff.endswith('.dylib')) + common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, + os.path.join(paths.result, args.name + '-signed.7z'), + app], + signed_install_path) def get_paths(args): Paths = collections.namedtuple('Paths', diff --git a/scripts/deployqt.py b/scripts/deployqt.py index 50eb3eb125..05113e43e7 100755 --- a/scripts/deployqt.py +++ b/scripts/deployqt.py @@ -110,9 +110,12 @@ def is_ignored_windows_file(use_debug, basepath, filename): return False def ignored_qt_lib_files(path, filenames): + # Qt ships some unneeded object files in the qml plugins + # On Windows we also do not want to ship the wrong debug/release .dlls or .lib files etc if not common.is_windows_platform(): - return [] - return [fn for fn in filenames if is_ignored_windows_file(debug_build, path, fn)] + return [fn for fn in filenames if fn.endswith('.cpp.o')] + return [fn for fn in filenames + 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_plugin_dir, qt_qml_dir, plugins): print("copying Qt libraries...") diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh index 4109e6f31d..efcde54bdf 100755 --- a/scripts/deployqtHelper_mac.sh +++ b/scripts/deployqtHelper_mac.sh @@ -143,6 +143,9 @@ if [ ! -d "$app_path/Contents/Frameworks/QtCore.framework" ]; then fi +# clean up unneeded object files that are part of Qt for some static libraries +find "$app_path" -ipath "*/objects-*" -delete + # clean up after macdeployqt # it deploys some plugins (and libs for these) that interfere with what we want echo "Cleaning up after macdeployqt..." |