bedre installer
This commit is contained in:
@@ -83,7 +83,7 @@ exe = EXE(
|
|||||||
strip=False,
|
strip=False,
|
||||||
upx=False,
|
upx=False,
|
||||||
console=False,
|
console=False,
|
||||||
icon=None,
|
icon='installer\\icon.ico',
|
||||||
)
|
)
|
||||||
|
|
||||||
coll = COLLECT(
|
coll = COLLECT(
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
!define APP_VERSION "1.0.0"
|
!define APP_VERSION "1.0.0"
|
||||||
!define APP_PUBLISHER "LineDance Player"
|
!define APP_PUBLISHER "LineDance Player"
|
||||||
!define APP_URL "https://linedanceplayer.dk"
|
!define APP_URL "https://linedanceplayer.dk"
|
||||||
!define INSTALL_DIR "$LOCALAPPDATA\Programs\LineDancePlayer"
|
!define INSTALL_DIR "$LOCALAPPDATA\LineDancePlayer"
|
||||||
!define REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\LineDancePlayer"
|
!define REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\LineDancePlayer"
|
||||||
|
|
||||||
; ── Generelle indstillinger ───────────────────────────────────────────────────
|
; ── Generelle indstillinger ───────────────────────────────────────────────────
|
||||||
@@ -50,16 +50,17 @@ Section "LineDance Player" SecMain
|
|||||||
SectionIn RO ; Obligatorisk
|
SectionIn RO ; Obligatorisk
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
|
File "dist\LineDancePlayer\LineDancePlayer.exe"
|
||||||
|
|
||||||
; Kopiér alle filer fra dist\LineDancePlayer\
|
SetOutPath "$INSTDIR\_internal"
|
||||||
File /r "dist\LineDancePlayer\*.*"
|
File /r "dist\LineDancePlayer\_internal\*"
|
||||||
|
|
||||||
; Start-menu genvej
|
; Start-menu genvej
|
||||||
CreateDirectory "$SMPROGRAMS\${APP_NAME}"
|
CreateDirectory "$SMPROGRAMS\${APP_NAME}"
|
||||||
CreateShortcut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" \
|
CreateShortcut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" \
|
||||||
"$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APP_EXE}" 0
|
"$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APP_EXE}" 0
|
||||||
|
|
||||||
; Skrivebords-genvej (valgfri — spørg brugeren)
|
; Skrivebords-genvej
|
||||||
CreateShortcut "$DESKTOP\${APP_NAME}.lnk" \
|
CreateShortcut "$DESKTOP\${APP_NAME}.lnk" \
|
||||||
"$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APP_EXE}" 0
|
"$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APP_EXE}" 0
|
||||||
|
|
||||||
@@ -84,18 +85,33 @@ Section "LineDance Player" SecMain
|
|||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
; ── VLC tjek (advarsel hvis ikke installeret) ─────────────────────────────────
|
; ── VLC tjek ──────────────────────────────────────────────────────────────────
|
||||||
Section -VLCCheck
|
Section -VLCCheck
|
||||||
|
; Tjek alle kendte VLC registry-stier
|
||||||
ReadRegStr $0 HKLM "SOFTWARE\VideoLAN\VLC" ""
|
ReadRegStr $0 HKLM "SOFTWARE\VideoLAN\VLC" ""
|
||||||
ReadRegStr $1 HKCU "SOFTWARE\VideoLAN\VLC" ""
|
ReadRegStr $1 HKCU "SOFTWARE\VideoLAN\VLC" ""
|
||||||
${If} $0 == ""
|
ReadRegStr $2 HKLM "SOFTWARE\WOW6432Node\VideoLAN\VLC" ""
|
||||||
${AndIf} $1 == ""
|
; Tjek også om vlc.exe eksisterer
|
||||||
MessageBox MB_YESNO|MB_ICONINFORMATION \
|
IfFileExists "$PROGRAMFILES\VideoLAN\VLC\vlc.exe" VLCFound 0
|
||||||
"LineDance Player bruger VLC til afspilning.$\n$\nVLC er ikke installeret. Vil du åbne download-siden?$\n$\n(Du kan installere det senere)" \
|
IfFileExists "$PROGRAMFILES64\VideoLAN\VLC\vlc.exe" VLCFound 0
|
||||||
IDNO VLCSkip
|
${If} $0 != ""
|
||||||
ExecShell "open" "https://www.videolan.org/vlc/"
|
Goto VLCFound
|
||||||
VLCSkip:
|
|
||||||
${EndIf}
|
${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
|
SectionEnd
|
||||||
|
|
||||||
; ── Afinstaller ───────────────────────────────────────────────────────────────
|
; ── Afinstaller ───────────────────────────────────────────────────────────────
|
||||||
@@ -111,6 +127,13 @@ Section "Uninstall"
|
|||||||
; Slet registry
|
; Slet registry
|
||||||
DeleteRegKey HKCU "${REG_KEY}"
|
DeleteRegKey HKCU "${REG_KEY}"
|
||||||
|
|
||||||
; Bevar brugernes data i %APPDATA%\.linedance — slet IKKE
|
; Spørg om brugerdata skal slettes
|
||||||
|
IfFileExists "$PROFILE\.linedance\*" AskDelete SkipDelete
|
||||||
|
AskDelete:
|
||||||
|
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||||
|
"Vil du slette dine lokale data?$\n$\nDette fjerner din musikdatabase, indstillinger og playlister fra:$\n$PROFILE\.linedance$\n$\nVaelg Nej for at beholde dine data." \
|
||||||
|
IDNO SkipDelete
|
||||||
|
RMDir /r "$PROFILE\.linedance"
|
||||||
|
SkipDelete:
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|||||||
Reference in New Issue
Block a user