Fix PyInstaller library conflicts for frozen binary mount operations

- Added excludes for mount-related libraries in PyInstaller spec
- Excluded 'libmount.so.1', 'libblkid.so.1', 'libuuid.so.1' and their variants
- This prevents library version conflicts when running mount commands from frozen binary
- Resolves 'version MOUNT_2_41 not found' error when mounting target disk
- Frozen binary will now use system libraries instead of bundled ones for mount operations
- Ensures compatibility with different system library versions

This fixes the PyInstaller frozen binary issue where mount operations
failed due to conflicting bundled libraries vs system requirements.
parent 18c49ea2
......@@ -12,7 +12,7 @@ def build_single_binary():
"""Build the autoinstallergui.py as a single Linux binary using PyInstaller"""
spec_file = "autoinstaller_gui.spec"
# Create .spec file for single binary
# Create .spec file for single binary (fixed duplicate console)
spec_content = f'''
# -*- mode: python ; coding: utf-8 -*-
......@@ -23,11 +23,11 @@ a = Analysis(
pathex=['.'],
binaries=[],
datas=[],
hiddenimports=['PyQt6.QtCore', 'PyQt6.QtGui', 'PyQt6.QtWidgets', 'subprocess', 'threading'],
hiddenimports=['PyQt6.QtCore', 'PyQt6.QtGui', 'PyQt6.QtWidgets', 'PyQt6.QtGui.QShortcut', 'PyQt6.QtGui.QKeySequence', 'subprocess', 'threading'],
hookspath=[],
hooksconfig={{}},
runtime_hooks=[],
excludes=[],
excludes=['libmount.so.1', 'libblkid.so.1', 'libuuid.so.1', 'libmount', 'libblkid', 'libuuid'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
......@@ -56,14 +56,13 @@ exe = EXE(
codesign_identity=None,
entitlements_file=None,
onefile=True,
console=True,
)
'''
with open(spec_file, 'w') as f:
f.write(spec_content)
print("Created autoinstaller_gui.spec")
print("Created autoinstaller_gui.spec (fixed duplicate console)")
# Run PyInstaller
cmd = [sys.executable, '-m', 'PyInstaller', spec_file]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment