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 <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2024-09-19 11:42:18 +02:00
parent 8c527a136c
commit 14e04c0325

View File

@@ -279,33 +279,33 @@ def package_qtcreator(args, paths):
if not args.no_cdb: if not args.no_cdb:
common.check_print_call(command + [paths.qtcreatorcdbext_install]) 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_zip:
if not args.no_qtcreator: if not args.no_qtcreator:
common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, common.check_print_call(zip
os.path.join(paths.result, 'qtcreator' + args.zip_infix + '.7z'), + [os.path.join(paths.result, 'qtcreator' + args.zip_infix + '.7z'),
zipPatternForApp(paths)], zipPatternForApp(paths)],
paths.install) paths.install)
common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, common.check_print_call(zip
os.path.join(paths.result, 'qtcreator' + args.zip_infix + '_dev.7z'), + [os.path.join(paths.result, 'qtcreator' + args.zip_infix + '_dev.7z'),
'*'], '*'],
paths.dev_install) paths.dev_install)
if args.with_debug_info: if args.with_debug_info:
common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, common.check_print_call(zip
os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-debug.7z'), + [os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-debug.7z'),
'*'], '*'],
paths.debug_install) paths.debug_install)
if common.is_windows_platform(): if common.is_windows_platform():
# use -mf=off to avoid usage of the ARM executable compression filter, common.check_print_call(zip
# which cannot be extracted by the p7zip version on the machine doing + [os.path.join(paths.result, 'wininterrupt' + args.zip_infix + '.7z'),
# 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'),
'*'],
paths.wininterrupt_install) paths.wininterrupt_install)
if not args.no_cdb: if not args.no_cdb:
common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, '-mf=off', common.check_print_call(zip
os.path.join(paths.result, 'qtcreatorcdbext' + args.zip_infix + '.7z'), + [os.path.join(paths.result, 'qtcreatorcdbext' + args.zip_infix + '.7z'),
'*'], '*'],
paths.qtcreatorcdbext_install) paths.qtcreatorcdbext_install)
if common.is_mac_platform() and not args.no_qtcreator: if common.is_mac_platform() and not args.no_qtcreator:
@@ -319,9 +319,9 @@ def package_qtcreator(args, paths):
app = apps[0] app = apps[0]
common.codesign(os.path.join(signed_install_path, app)) common.codesign(os.path.join(signed_install_path, app))
if not args.no_zip: if not args.no_zip:
common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, common.check_print_call(zip
os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-signed.7z'), + [os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-signed.7z'),
app], app],
signed_install_path) signed_install_path)
if not args.no_dmg: if not args.no_dmg:
common.check_print_call(['python', '-u', common.check_print_call(['python', '-u',