mirror of
https://github.com/pvrzz/atmosphere.git
synced 2026-11-29 05:22:26 +00:00
7329bd673b
- Mini player with optional cover art, blurred backdrop, reorderable queue and always-on-top - Direct .mp3/.wav/.flac/.mp4 links are verified and read for real bitrate, tags and cover - Lyrics soften with distance from the sung line; hovering brings a line into focus - Browser sign-in check with clear guidance, plus cookies.txt file support - Backup and restore of settings, stats, liked songs and artist photos - Uninstaller keeps data by default and offers a backup before deleting it - Stalled partial downloads clear automatically when downloads finish - Window border follows the app theme; images can no longer be dragged out - Fix search results rendering as [object Object]
36 lines
1.5 KiB
NSIS
36 lines
1.5 KiB
NSIS
; atmosphere · hooks.nsh · Uninstaller hooks: offer a backup before removing data, and remove Atmosphere's own data folders only when asked
|
|
|
|
!macro NSIS_HOOK_PREUNINSTALL
|
|
${If} $UpdateMode <> 1
|
|
${AndIf} $DeleteAppDataCheckboxState = 1
|
|
SetShellVarContext current
|
|
MessageBox MB_YESNO|MB_ICONQUESTION "Atmosphere will remove your settings, listening stats, liked songs and artist photos.$\r$\n$\r$\nSave a backup to your Documents folder first? You can restore it later from Settings, Storage.$\r$\n$\r$\nYour music files are never touched." /SD IDNO IDNO atmo_skip_backup
|
|
StrCpy $R0 "$DOCUMENTS\Atmosphere backup.zip"
|
|
StrCpy $R1 1
|
|
atmo_name_loop:
|
|
IfFileExists "$R0" 0 atmo_name_done
|
|
IntOp $R1 $R1 + 1
|
|
StrCpy $R0 "$DOCUMENTS\Atmosphere backup ($R1).zip"
|
|
Goto atmo_name_loop
|
|
atmo_name_done:
|
|
ExecWait '"$INSTDIR\${MAINBINARYNAME}.exe" --backup "$R0"' $R2
|
|
${If} $R2 = 0
|
|
${AndIf} ${FileExists} "$R0"
|
|
MessageBox MB_OK|MB_ICONINFORMATION "Backup saved to:$\r$\n$R0" /SD IDOK
|
|
${Else}
|
|
MessageBox MB_YESNO|MB_ICONEXCLAMATION "The backup couldn't be saved. Keep your Atmosphere data instead of removing it?" /SD IDYES IDNO atmo_skip_backup
|
|
StrCpy $DeleteAppDataCheckboxState 0
|
|
${EndIf}
|
|
atmo_skip_backup:
|
|
${EndIf}
|
|
!macroend
|
|
|
|
!macro NSIS_HOOK_POSTUNINSTALL
|
|
${If} $UpdateMode <> 1
|
|
${AndIf} $DeleteAppDataCheckboxState = 1
|
|
SetShellVarContext current
|
|
RmDir /r "$APPDATA\atmosphere"
|
|
RmDir /r "$LOCALAPPDATA\atmosphere"
|
|
${EndIf}
|
|
!macroend
|