Ny installer

This commit is contained in:
2026-04-22 12:59:13 +02:00
parent d28aafb2c6
commit c3453d8d55
5 changed files with 34 additions and 32 deletions

View File

@@ -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.

View File

@@ -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"

View File

@@ -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 (

View File

@@ -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__))