This commit is contained in:
2026-04-10 15:14:13 +02:00
parent 0f54f6d908
commit de04ba84eb
2 changed files with 58 additions and 22 deletions

View File

@@ -2,43 +2,34 @@
echo === LineDance Player - Windows Build === echo === LineDance Player - Windows Build ===
echo. echo.
REM Aktiver venv hvis den eksisterer
if exist "venv\Scripts\activate.bat" ( if exist "venv\Scripts\activate.bat" (
call venv\Scripts\activate.bat call venv\Scripts\activate.bat
) else ( ) else (
echo ADVARSEL: venv ikke fundet - bruger system Python echo ADVARSEL: venv ikke fundet
) )
REM Installer PyInstaller hvis ikke installeret pip install pyinstaller >nul 2>&1
pip show pyinstaller >nul 2>&1
if errorlevel 1 (
echo Installerer PyInstaller...
pip install pyinstaller
)
REM Ryd tidligere build
if exist "dist\LineDancePlayer" rmdir /s /q "dist\LineDancePlayer" if exist "dist\LineDancePlayer" rmdir /s /q "dist\LineDancePlayer"
if exist "build\LineDancePlayer" rmdir /s /q "build\LineDancePlayer" if exist "build\LineDancePlayer" rmdir /s /q "build\LineDancePlayer"
echo Bygger LineDance Player... echo Bygger... (1-3 minutter)
echo Dette tager 1-3 minutter...
echo. echo.
pyinstaller build_windows.spec --clean pyinstaller build_windows.spec --clean --noconfirm
if errorlevel 1 ( if errorlevel 1 (
echo. echo.
echo FEJL: Build mislykkedes! echo FEJL: Se fejlbesked ovenfor
pause pause
exit /b 1 exit /b 1
) )
echo. echo.
echo === BUILD FAERDIG === echo === FAERDIG ===
echo Program: dist\LineDancePlayer\LineDancePlayer.exe
echo. echo.
echo Programmet ligger i: dist\LineDancePlayer\LineDancePlayer.exe echo HUSK: Kopieer hele dist\LineDancePlayer\ mappen - ikke kun .exe!
echo. echo HUSK: VLC skal vaere installeret paa maskinen.
echo HUSK: VLC skal stadig vaere installeret paa maskinen!
echo Download VLC fra: https://www.videolan.org/vlc/
echo. echo.
pause pause

View File

@@ -1,5 +1,4 @@
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
# PyInstaller spec-fil til LineDance Player
block_cipher = None block_cipher = None
@@ -9,25 +8,71 @@ a = Analysis(
binaries=[], binaries=[],
datas=[], datas=[],
hiddenimports=[ hiddenimports=[
# PyQt6 — skal alle med eksplicit
'PyQt6',
'PyQt6.QtCore', 'PyQt6.QtCore',
'PyQt6.QtGui', 'PyQt6.QtGui',
'PyQt6.QtWidgets', 'PyQt6.QtWidgets',
'PyQt6.QtNetwork',
'PyQt6.sip',
'PyQt6.QtPrintSupport',
# UI moduler
'ui.main_window',
'ui.playlist_panel',
'ui.library_panel',
'ui.library_manager',
'ui.themes',
'ui.vu_meter',
'ui.scan_worker',
'ui.tag_editor',
'ui.login_dialog',
'ui.settings_dialog',
'ui.playlist_manager',
'ui.next_up_bar',
# Player
'player.player',
# Local
'local.local_db',
'local.tag_reader',
'local.file_watcher',
# Biblioteker
'mutagen', 'mutagen',
'mutagen.mp3', 'mutagen.mp3',
'mutagen.id3', 'mutagen.id3',
'mutagen.flac', 'mutagen.flac',
'mutagen.mp4', 'mutagen.mp4',
'mutagen.oggvorbis', 'mutagen.oggvorbis',
'mutagen.ogg',
'mutagen.wave',
'mutagen.aiff',
'mutagen.asf',
'watchdog', 'watchdog',
'watchdog.observers', 'watchdog.observers',
'watchdog.observers.fsevents',
'watchdog.observers.inotify',
'watchdog.observers.winapi',
'watchdog.events', 'watchdog.events',
'watchdog.tricks',
'vlc', 'vlc',
'sqlite3', 'sqlite3',
'json',
'threading',
'pathlib',
'urllib.request',
'urllib.parse',
], ],
hookspath=[], hookspath=[],
hooksconfig={}, hooksconfig={},
runtime_hooks=[], runtime_hooks=[],
excludes=['tkinter', 'matplotlib', 'numpy', 'pandas'], excludes=[
'tkinter',
'matplotlib',
'pandas',
'scipy',
'PIL',
'IPython',
'jupyter',
],
win_no_prefer_redirects=False, win_no_prefer_redirects=False,
win_private_assemblies=False, win_private_assemblies=False,
cipher=block_cipher, cipher=block_cipher,
@@ -46,12 +91,12 @@ exe = EXE(
bootloader_ignore_signals=False, bootloader_ignore_signals=False,
strip=False, strip=False,
upx=True, upx=True,
console=False, # Ingen sort konsol-vindue console=True, # Slå til så du kan se fejlbeskeder
disable_windowed_traceback=False, disable_windowed_traceback=False,
target_arch=None, target_arch=None,
codesign_identity=None, codesign_identity=None,
entitlements_file=None, entitlements_file=None,
icon=None, # Tilføj .ico fil her hvis du har et ikon icon=None,
) )
coll = COLLECT( coll = COLLECT(