Med install

This commit is contained in:
2026-04-10 15:09:37 +02:00
parent e5a4711004
commit 0f54f6d908
8 changed files with 229 additions and 88 deletions

View File

@@ -1,68 +1,44 @@
@echo off
echo ================================================
echo LineDance Player - Byg EXE
echo ================================================
echo === LineDance Player - Windows Build ===
echo.
REM Tjek at vi er i det rigtige bibliotek
if not exist main.py (
echo FEJL: Kør build.bat fra LinedanceAfspiller\linedance-app mappen
pause
exit /b 1
REM Aktiver venv hvis den eksisterer
if exist "venv\Scripts\activate.bat" (
call venv\Scripts\activate.bat
) else (
echo ADVARSEL: venv ikke fundet - bruger system Python
)
REM Aktiver venv
if not exist venv\Scripts\activate.bat (
echo Opretter virtuelt miljø...
python -m venv venv
)
call venv\Scripts\activate.bat
REM Installer/opdater pakker
echo Installerer pakker...
pip install -r requirements.txt --quiet
pip install pyinstaller --quiet
REM Tjek VLC
if not exist "C:\Program Files\VideoLAN\VLC\libvlc.dll" (
if not exist "C:\Program Files (x86)\VideoLAN\VLC\libvlc.dll" (
echo.
echo ADVARSEL: VLC ser ikke ud til at vaere installeret!
echo Download VLC fra: https://www.videolan.org/vlc/
echo Vaelg 64-bit versionen.
echo.
pause
exit /b 1
)
REM Installer PyInstaller hvis ikke installeret
pip show pyinstaller >nul 2>&1
if errorlevel 1 (
echo Installerer PyInstaller...
pip install pyinstaller
)
REM Ryd gamle build-filer
echo Rydder gamle build-filer...
if exist build rmdir /s /q build
if exist dist rmdir /s /q dist
REM Ryd tidligere build
if exist "dist\LineDancePlayer" rmdir /s /q "dist\LineDancePlayer"
if exist "build\LineDancePlayer" rmdir /s /q "build\LineDancePlayer"
REM Byg EXE
echo Bygger LineDance Player...
echo Dette tager 1-3 minutter...
echo.
echo Bygger LineDancePlayer.exe ...
echo (Dette tager typisk 1-3 minutter)
echo.
pyinstaller LineDancePlayer.spec
if %ERRORLEVEL% neq 0 (
pyinstaller build_windows.spec --clean
if errorlevel 1 (
echo.
echo FEJL under build! Se fejlbesked ovenfor.
echo FEJL: Build mislykkedes!
pause
exit /b 1
)
echo.
echo ================================================
echo BUILD FAERDIG!
echo Filen ligger i: dist\LineDancePlayer.exe
echo ================================================
echo === BUILD FAERDIG ===
echo.
echo Programmet ligger i: dist\LineDancePlayer\LineDancePlayer.exe
echo.
echo HUSK: VLC skal stadig vaere installeret paa maskinen!
echo Download VLC fra: https://www.videolan.org/vlc/
echo.
REM Vis filstoerrelse
for %%A in (dist\LineDancePlayer.exe) do echo Filstoerrelse: %%~zA bytes
pause