From 14e04c03252238b771a2cc251cce6b17f2075b96 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 19 Sep 2024 11:42:18 +0200 Subject: [PATCH] Build: Fix archive creation on ARM Windows Prevent 7z from using the "arm executable" compression algorithm, that cannot be extracted by pk7zip Task-number: QTCREATORBUG-31331 Change-Id: I1c6358bad90f4fc0f8e065cdda802c72a97bd129 Reviewed-by: Cristian Adam --- scripts/build.py | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/build.py b/scripts/build.py index 094cc9d6c4b..037ac37a545 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -279,33 +279,33 @@ def package_qtcreator(args, paths): if not args.no_cdb: common.check_print_call(command + [paths.qtcreatorcdbext_install]) + # use -mf=off to avoid usage of the ARM executable compression filter, + # which cannot be extracted by p7zip + zip = ['7z', 'a', '-mmt' + args.zip_threads, '-mf=off'] if not args.no_zip: if not args.no_qtcreator: - common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, - os.path.join(paths.result, 'qtcreator' + args.zip_infix + '.7z'), - zipPatternForApp(paths)], + common.check_print_call(zip + + [os.path.join(paths.result, 'qtcreator' + args.zip_infix + '.7z'), + zipPatternForApp(paths)], paths.install) - common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, - os.path.join(paths.result, 'qtcreator' + args.zip_infix + '_dev.7z'), - '*'], + common.check_print_call(zip + + [os.path.join(paths.result, 'qtcreator' + args.zip_infix + '_dev.7z'), + '*'], paths.dev_install) if args.with_debug_info: - common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, - os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-debug.7z'), - '*'], + common.check_print_call(zip + + [os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-debug.7z'), + '*'], paths.debug_install) if common.is_windows_platform(): - # use -mf=off to avoid usage of the ARM executable compression filter, - # which cannot be extracted by the p7zip version on the machine doing - # the repository builds - common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, '-mf=off', - os.path.join(paths.result, 'wininterrupt' + args.zip_infix + '.7z'), - '*'], + common.check_print_call(zip + + [os.path.join(paths.result, 'wininterrupt' + args.zip_infix + '.7z'), + '*'], paths.wininterrupt_install) if not args.no_cdb: - common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, '-mf=off', - os.path.join(paths.result, 'qtcreatorcdbext' + args.zip_infix + '.7z'), - '*'], + common.check_print_call(zip + + [os.path.join(paths.result, 'qtcreatorcdbext' + args.zip_infix + '.7z'), + '*'], paths.qtcreatorcdbext_install) if common.is_mac_platform() and not args.no_qtcreator: @@ -319,9 +319,9 @@ def package_qtcreator(args, paths): app = apps[0] common.codesign(os.path.join(signed_install_path, app)) if not args.no_zip: - common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, - os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-signed.7z'), - app], + common.check_print_call(zip + + [os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-signed.7z'), + app], signed_install_path) if not args.no_dmg: common.check_print_call(['python', '-u',