macdeploy: subprocess out to zip rather than shutil.make_archive

Calling shutil.make_archive(), does not preserve symlinks when using the
zip format, see https://github.com/python/cpython/issues/139679.

Call `zip` using subprocess instead. This code is only run when using a
macos machine, and I think it's safe to assume that zip is available, same
as codesign, and all other tools we call in this script.

Github-Pull: #34787
Rebased-From: ab137cbfe2
This commit is contained in:
fanquake
2026-03-10 16:42:59 +00:00
parent e2f6e3a80f
commit 671980e779

View File

@@ -499,7 +499,7 @@ if platform.system() == "Darwin":
# ------------------------------------------------
if config.zip is not None:
shutil.make_archive('{}'.format(appname), format='zip', root_dir='dist', base_dir='Bitcoin-Qt.app')
subprocess.check_call(["zip", "-ry", os.path.abspath(appname + ".zip"), 'Bitcoin-Qt.app'], cwd='dist')
# ------------------------------------------------