From 43ae7c6a54270a27551b030d27d017bf0b5cdc88 Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Tue, 13 Aug 2024 10:58:35 +0800 Subject: [PATCH] bypy/macos: use ULMO ULMO, available in 10.15+, uses LZMA compression, which is both stronger and faster than the deprecated bzip2 (UDBZ). --- bypy/macos/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bypy/macos/__main__.py b/bypy/macos/__main__.py index bc6f423e11..99fee29194 100644 --- a/bypy/macos/__main__.py +++ b/bypy/macos/__main__.py @@ -801,8 +801,8 @@ class Freeze: print('Signing completed in %d minutes %d seconds' % tuple(times)) os.symlink('/Applications', join(tdir, 'Applications')) size_in_mb = int(subprocess.check_output(['du', '-s', '-k', tdir]).decode('utf-8').split()[0]) / 1024. - # UDBZ gives the best compression, better than ULFO - cmd = ['/usr/bin/hdiutil', 'create', '-srcfolder', tdir, '-volname', volname, '-format', 'UDBZ'] + # ULMO (10.15+) gives the best compression, better than ULFO and better+faster than UDBZ + cmd = ['/usr/bin/hdiutil', 'create', '-srcfolder', tdir, '-volname', volname, '-format', 'ULMO'] if 190 < size_in_mb < 250: # We need -size 255m because of a bug in hdiutil. When the size of # srcfolder is close to 200MB hdiutil fails with