diff --git a/linedance-api/web/public/download/LineDancePlayer-Setup.exe b/linedance-api/web/public/download/LineDancePlayer-Setup.exe index 602e2522..0ecb3d34 100644 Binary files a/linedance-api/web/public/download/LineDancePlayer-Setup.exe and b/linedance-api/web/public/download/LineDancePlayer-Setup.exe differ diff --git a/linedance-app/build.bat b/linedance-app/build.bat index 834356d3..47608e3e 100644 --- a/linedance-app/build.bat +++ b/linedance-app/build.bat @@ -44,6 +44,25 @@ echo. echo OK: dist\LineDancePlayer\ er klar echo. +:: ── Kopiér VLC DLL-filer ind i app-mappen ───────────────────────────────────── +echo Kopierer VLC DLL-filer... +set "VLC_PATH=" +if exist "C:\Program Files\VideoLAN\VLC\libvlc.dll" set "VLC_PATH=C:\Program Files\VideoLAN\VLC" +if exist "C:\Program Files (x86)\VideoLAN\VLC\libvlc.dll" set "VLC_PATH=C:\Program Files (x86)\VideoLAN\VLC" + +if defined VLC_PATH ( + copy /Y "!VLC_PATH!\libvlc.dll" "dist\LineDancePlayer\libvlc.dll" >nul + copy /Y "!VLC_PATH!\libvlccore.dll" "dist\LineDancePlayer\libvlccore.dll" >nul + :: Kopiér også plugins-mappen som VLC kræver + if exist "!VLC_PATH!\plugins" ( + xcopy /E /I /Y /Q "!VLC_PATH!\plugins" "dist\LineDancePlayer\plugins" >nul + ) + echo OK: VLC DLL-filer kopieret fra !VLC_PATH! +) else ( + echo ADVARSEL: VLC ikke fundet - brugere skal have VLC installeret selv +) +echo. + :: ── NSIS installer ──────────────────────────────────────────────────────────── echo [4/4] Bygger NSIS installer... echo. @@ -120,4 +139,4 @@ if exist "dist\LineDancePlayer-Setup.exe" ( echo Kør makensis installer.nsi manuelt naar NSIS er installeret ) echo. -pause +pause \ No newline at end of file diff --git a/linedance-app/installer.nsi b/linedance-app/installer.nsi index ae0852c4..65acce37 100644 --- a/linedance-app/installer.nsi +++ b/linedance-app/installer.nsi @@ -85,34 +85,7 @@ Section "LineDance Player" SecMain SectionEnd -; ── VLC tjek ────────────────────────────────────────────────────────────────── -Section -VLCCheck - ; Tjek alle kendte VLC registry-stier - ReadRegStr $0 HKLM "SOFTWARE\VideoLAN\VLC" "" - ReadRegStr $1 HKCU "SOFTWARE\VideoLAN\VLC" "" - ReadRegStr $2 HKLM "SOFTWARE\WOW6432Node\VideoLAN\VLC" "" - ; Tjek også om vlc.exe eksisterer - IfFileExists "$PROGRAMFILES\VideoLAN\VLC\vlc.exe" VLCFound 0 - IfFileExists "$PROGRAMFILES64\VideoLAN\VLC\vlc.exe" VLCFound 0 - ${If} $0 != "" - Goto VLCFound - ${EndIf} - ${If} $1 != "" - Goto VLCFound - ${EndIf} - ${If} $2 != "" - Goto VLCFound - ${EndIf} - ; VLC ikke fundet - MessageBox MB_YESNO|MB_ICONINFORMATION \ - "LineDance Player bruger VLC til afspilning.$\n$\nVLC ser ikke ud til at vaere installeret.$\n$\nVil du aabne download-siden nu?$\n$\n(Du kan installere VLC senere)" \ - IDNO VLCSkip - ExecShell "open" "https://www.videolan.org/vlc/" - VLCSkip: - Goto VLCDone - VLCFound: - VLCDone: -SectionEnd +; VLC DLL-filer er bundlet med appen — intet VLC-tjek nødvendigt ; ── Afinstaller ─────────────────────────────────────────────────────────────── Section "Uninstall" diff --git a/linedance-app/local/local_db.py b/linedance-app/local/local_db.py index de5660ac..0abc1981 100644 --- a/linedance-app/local/local_db.py +++ b/linedance-app/local/local_db.py @@ -123,8 +123,13 @@ CREATE TABLE IF NOT EXISTS song_alt_dances ( UNIQUE(song_id, dance_id) ); -CREATE INDEX IF NOT EXISTS idx_song_dances ON song_dances(song_id); -CREATE INDEX IF NOT EXISTS idx_song_alt_dances ON song_alt_dances(song_id); +CREATE INDEX IF NOT EXISTS idx_song_dances ON song_dances(song_id); +CREATE INDEX IF NOT EXISTS idx_song_alt_dances ON song_alt_dances(song_id); +CREATE INDEX IF NOT EXISTS idx_dances_name ON dances(name COLLATE NOCASE); +CREATE INDEX IF NOT EXISTS idx_dances_use_count ON dances(use_count DESC); +CREATE INDEX IF NOT EXISTS idx_songs_title ON songs(title); +CREATE INDEX IF NOT EXISTS idx_songs_artist ON songs(artist); +CREATE INDEX IF NOT EXISTS idx_files_song_path ON files(song_id, file_missing); -- Playlister CREATE TABLE IF NOT EXISTS playlists ( diff --git a/linedance-app/main.py b/linedance-app/main.py index 8534ced1..6d71c996 100644 --- a/linedance-app/main.py +++ b/linedance-app/main.py @@ -8,7 +8,12 @@ Start: import sys import os -APP_VERSION = "0.8.3" +if getattr(sys, 'frozen', False): + # Kørende som PyInstaller .exe — sæt VLC sti til app-mappen + _app_dir = os.path.dirname(sys.executable) + os.environ.setdefault("VLC_PLUGIN_PATH", os.path.join(_app_dir, "plugins")) + +APP_VERSION = "0.9.5" sys.path.insert(0, os.path.dirname(__file__))