Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bin/7zz
Binary file not shown.
10 changes: 9 additions & 1 deletion build-on-linux.spec
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
2 changes: 2 additions & 0 deletions runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down