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(): ...@@ -12,7 +12,7 @@ def build_single_binary():
"""Build the autoinstallergui.py as a single Linux binary using PyInstaller""" """Build the autoinstallergui.py as a single Linux binary using PyInstaller"""
spec_file = "autoinstaller_gui.spec" spec_file = "autoinstaller_gui.spec"
# Create .spec file for single binary # Create .spec file for single binary (fixed duplicate console)
spec_content = f''' spec_content = f'''
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
...@@ -23,11 +23,11 @@ a = Analysis( ...@@ -23,11 +23,11 @@ a = Analysis(
pathex=['.'], pathex=['.'],
binaries=[], binaries=[],
datas=[], 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=[], hookspath=[],
hooksconfig={{}}, hooksconfig={{}},
runtime_hooks=[], runtime_hooks=[],
excludes=[], excludes=['libmount.so.1', 'libblkid.so.1', 'libuuid.so.1', 'libmount', 'libblkid', 'libuuid'],
win_no_prefer_redirects=False, win_no_prefer_redirects=False,
win_private_assemblies=False, win_private_assemblies=False,
cipher=block_cipher, cipher=block_cipher,
...@@ -56,14 +56,13 @@ exe = EXE( ...@@ -56,14 +56,13 @@ exe = EXE(
codesign_identity=None, codesign_identity=None,
entitlements_file=None, entitlements_file=None,
onefile=True, onefile=True,
console=True,
) )
''' '''
with open(spec_file, 'w') as f: with open(spec_file, 'w') as f:
f.write(spec_content) f.write(spec_content)
print("Created autoinstaller_gui.spec") print("Created autoinstaller_gui.spec (fixed duplicate console)")
# Run PyInstaller # Run PyInstaller
cmd = [sys.executable, '-m', 'PyInstaller', spec_file] 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