diff --git a/bin/7zz b/bin/7zz index b9aaac27..bf33538b 100755 Binary files a/bin/7zz and b/bin/7zz differ diff --git a/build-on-linux.spec b/build-on-linux.spec index b18cb3a7..37ba9f46 100644 --- a/build-on-linux.spec +++ b/build-on-linux.spec @@ -1,10 +1,18 @@ # -*- mode: python ; coding: utf-8 -*- +import os +import platform block_cipher = None +# Use 7zzs (static) on x86_64, 7zz (dynamic) on aarch64 +if platform.machine() == 'aarch64': + seven_zip_bin = 'bin/7zz' +else: + seven_zip_bin = 'bin/7zzs' + a = Analysis(['PixelFlasher.py'], pathex=['.'], - binaries=[('bin/7zzs', 'bin')], + binaries=[(seven_zip_bin, 'bin')], datas=[ ("images/icon-64.png", "images"), ("images/icon-dark-64.png", "images"), diff --git a/runtime.py b/runtime.py index 6e2bbe8b..69d54b72 100644 --- a/runtime.py +++ b/runtime.py @@ -1612,6 +1612,8 @@ def get_path_to_7z() -> str | None: path_to_7z = os.path.join(get_bundle_dir(),'bin', '7zz') else: path_to_7z = os.path.join(get_bundle_dir(),'bin', '7zzs') + if not os.path.exists(path_to_7z): + path_to_7z = os.path.join(get_bundle_dir(),'bin', '7zz') if not os.path.exists(path_to_7z): print(f"\n❌ {datetime.now():%Y-%m-%d %H:%M:%S} ERROR: {path_to_7z} is not found")