Videre
This commit is contained in:
68
linedance-app/build.bat
Normal file
68
linedance-app/build.bat
Normal file
@@ -0,0 +1,68 @@
|
||||
@echo off
|
||||
echo ================================================
|
||||
echo LineDance Player - Byg EXE
|
||||
echo ================================================
|
||||
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
|
||||
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 Ryd gamle build-filer
|
||||
echo Rydder gamle build-filer...
|
||||
if exist build rmdir /s /q build
|
||||
if exist dist rmdir /s /q dist
|
||||
|
||||
REM Byg EXE
|
||||
echo.
|
||||
echo Bygger LineDancePlayer.exe ...
|
||||
echo (Dette tager typisk 1-3 minutter)
|
||||
echo.
|
||||
pyinstaller LineDancePlayer.spec
|
||||
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo.
|
||||
echo FEJL under build! Se fejlbesked ovenfor.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ================================================
|
||||
echo BUILD FAERDIG!
|
||||
echo Filen ligger i: dist\LineDancePlayer.exe
|
||||
echo ================================================
|
||||
echo.
|
||||
|
||||
REM Vis filstoerrelse
|
||||
for %%A in (dist\LineDancePlayer.exe) do echo Filstoerrelse: %%~zA bytes
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user