Bygger hurtigere
This commit is contained in:
@@ -1,57 +1,75 @@
|
|||||||
# -*- mode: python ; coding: utf-8 -*-
|
# -*- mode: python ; coding: utf-8 -*-
|
||||||
from PyInstaller.utils.hooks import collect_all, collect_submodules
|
|
||||||
|
|
||||||
block_cipher = None
|
block_cipher = None
|
||||||
|
|
||||||
# Saml ALT fra PyQt6 inkl. plugins og DLL-filer
|
|
||||||
pyqt6_datas, pyqt6_binaries, pyqt6_hiddenimports = collect_all('PyQt6')
|
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['main.py'],
|
['main.py'],
|
||||||
pathex=['.'],
|
pathex=['.'],
|
||||||
binaries=pyqt6_binaries,
|
binaries=[],
|
||||||
datas=pyqt6_datas,
|
datas=[
|
||||||
hiddenimports=pyqt6_hiddenimports + [
|
('translations', 'translations'),
|
||||||
|
],
|
||||||
|
hiddenimports=[
|
||||||
'PyQt6.sip',
|
'PyQt6.sip',
|
||||||
'PyQt6.QtCore',
|
'PyQt6.QtCore',
|
||||||
'PyQt6.QtGui',
|
'PyQt6.QtGui',
|
||||||
'PyQt6.QtWidgets',
|
'PyQt6.QtWidgets',
|
||||||
# UI moduler
|
'PyQt6.QtNetwork',
|
||||||
'ui.main_window',
|
'ui.main_window', 'ui.playlist_panel', 'ui.library_panel',
|
||||||
'ui.playlist_panel',
|
'ui.library_manager', 'ui.themes', 'ui.vu_meter',
|
||||||
'ui.library_panel',
|
'ui.scan_worker', 'ui.bpm_worker', 'ui.tag_editor',
|
||||||
'ui.library_manager',
|
'ui.settings_dialog', 'ui.playlist_browser',
|
||||||
'ui.themes',
|
'ui.playlist_info_dialog', 'ui.dance_info_dialog',
|
||||||
'ui.vu_meter',
|
'ui.dance_picker_dialog', 'ui.share_dialog',
|
||||||
'ui.scan_worker',
|
'ui.register_dialog',
|
||||||
'ui.tag_editor',
|
|
||||||
'ui.login_dialog',
|
|
||||||
'ui.settings_dialog',
|
|
||||||
'ui.playlist_manager',
|
|
||||||
'ui.next_up_bar',
|
|
||||||
# Player + local
|
|
||||||
'player.player',
|
'player.player',
|
||||||
'local.local_db',
|
'local.local_db', 'local.scanner', 'local.file_watcher',
|
||||||
'local.tag_reader',
|
'local.sync_manager', 'local.linked_playlist',
|
||||||
'local.file_watcher',
|
'translations', 'translations.da', 'translations.en',
|
||||||
# Biblioteker
|
|
||||||
'mutagen', 'mutagen.mp3', 'mutagen.id3', 'mutagen.flac',
|
'mutagen', 'mutagen.mp3', 'mutagen.id3', 'mutagen.flac',
|
||||||
'mutagen.mp4', 'mutagen.oggvorbis', 'mutagen.ogg',
|
'mutagen.mp4', 'mutagen.oggvorbis', 'mutagen.ogg',
|
||||||
'mutagen.wave', 'mutagen.aiff', 'mutagen.asf',
|
'mutagen.wave', 'mutagen.aiff', 'mutagen.asf',
|
||||||
'watchdog', 'watchdog.observers', 'watchdog.events',
|
|
||||||
'watchdog.observers.winapi',
|
|
||||||
'vlc', 'sqlite3',
|
'vlc', 'sqlite3',
|
||||||
],
|
],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
hooksconfig={},
|
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
excludes=['tkinter', 'matplotlib', 'pandas', 'scipy', 'IPython'],
|
excludes=[
|
||||||
win_no_prefer_redirects=False,
|
'tkinter', 'tk', 'tcl',
|
||||||
win_private_assemblies=False,
|
'matplotlib', 'pandas', 'scipy', 'numpy',
|
||||||
|
'IPython', 'jupyter', 'PIL', 'cv2', 'sklearn',
|
||||||
|
'PyQt6.QtWebEngine', 'PyQt6.QtWebEngineWidgets',
|
||||||
|
'PyQt6.QtWebEngineCore', 'PyQt6.QtMultimedia',
|
||||||
|
'PyQt6.QtMultimediaWidgets', 'PyQt6.QtBluetooth',
|
||||||
|
'PyQt6.QtNfc', 'PyQt6.QtPositioning', 'PyQt6.QtLocation',
|
||||||
|
'PyQt6.QtSensors', 'PyQt6.QtSerialPort', 'PyQt6.QtSql',
|
||||||
|
'PyQt6.QtTest', 'PyQt6.QtXml', 'PyQt6.QtOpenGL',
|
||||||
|
'PyQt6.QtOpenGLWidgets', 'PyQt6.Qt3DCore', 'PyQt6.Qt3DRender',
|
||||||
|
'PyQt6.Qt3DInput', 'PyQt6.Qt3DLogic', 'PyQt6.Qt3DAnimation',
|
||||||
|
'PyQt6.Qt3DExtras', 'PyQt6.QtCharts', 'PyQt6.QtDataVisualization',
|
||||||
|
'PyQt6.QtQuick', 'PyQt6.QtQuickWidgets', 'PyQt6.QtQml',
|
||||||
|
'PyQt6.QtRemoteObjects', 'PyQt6.QtScxml', 'PyQt6.QtStateMachine',
|
||||||
|
'PyQt6.QtDesigner', 'PyQt6.QtHelp', 'PyQt6.QtPrintSupport',
|
||||||
|
'unittest', 'doctest', 'pdb', 'pydoc',
|
||||||
|
],
|
||||||
cipher=block_cipher,
|
cipher=block_cipher,
|
||||||
noarchive=False,
|
noarchive=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Fjern store ubrugte Qt DLL-filer
|
||||||
|
REMOVE_PATTERNS = [
|
||||||
|
'Qt6WebEngine', 'Qt6Quick', 'Qt6Qml', 'Qt6Designer',
|
||||||
|
'Qt6Help', 'Qt6Multimedia', 'Qt6Location', 'Qt6Sensors',
|
||||||
|
'Qt6Bluetooth', 'Qt6Nfc', 'Qt63D', 'Qt6Charts',
|
||||||
|
'Qt6DataVisualization', 'Qt6RemoteObjects', 'Qt6Scxml',
|
||||||
|
'Qt6StateMachine', 'Qt6VirtualKeyboard',
|
||||||
|
'd3dcompiler', 'opengl32sw',
|
||||||
|
]
|
||||||
|
a.binaries = [
|
||||||
|
(name, path, kind)
|
||||||
|
for name, path, kind in a.binaries
|
||||||
|
if not any(p.lower() in name.lower() for p in REMOVE_PATTERNS)
|
||||||
|
]
|
||||||
|
|
||||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||||||
|
|
||||||
exe = EXE(
|
exe = EXE(
|
||||||
@@ -63,12 +81,8 @@ exe = EXE(
|
|||||||
debug=False,
|
debug=False,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=False, # UPX kan give problemer med PyQt6 DLL-filer
|
upx=False,
|
||||||
console=False, # Ingen konsol-vindue
|
console=False,
|
||||||
disable_windowed_traceback=False,
|
|
||||||
target_arch=None,
|
|
||||||
codesign_identity=None,
|
|
||||||
entitlements_file=None,
|
|
||||||
icon=None,
|
icon=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -79,6 +93,5 @@ coll = COLLECT(
|
|||||||
a.datas,
|
a.datas,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=False,
|
upx=False,
|
||||||
upx_exclude=[],
|
|
||||||
name='LineDancePlayer',
|
name='LineDancePlayer',
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user