summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorMateusz Łukasik <mati75@linuxmint.pl>2016-01-21 21:34:24 +0100
committerMateusz Łukasik <mati75@linuxmint.pl>2016-01-21 21:34:24 +0100
commitba0162e8cb8a12c90ef9775f5a20a6da095a0b35 (patch)
tree5ff6c7b940c8b260fa15bc6c951486e3f5a971ec /setup
parentef3806d30c06fc3b5c2910ef4faebef27bbd6bad (diff)
Imported Upstream version 16.1.0~ds0
Diffstat (limited to 'setup')
-rw-r--r--setup/scripts/make_pkgs.cmd17
-rw-r--r--setup/smplayer.nsi78
2 files changed, 72 insertions, 23 deletions
diff --git a/setup/scripts/make_pkgs.cmd b/setup/scripts/make_pkgs.cmd
index 1220686..032e0a4 100644
--- a/setup/scripts/make_pkgs.cmd
+++ b/setup/scripts/make_pkgs.cmd
@@ -359,15 +359,28 @@ ren "%SMPLAYER_PORTABLE_DIR%" smplayer-build64
goto end
:portablesfx
+
+if exist %TOP_LEVEL_DIR%\smplayer-build\Qt5Core.dll (
+ set DEF_QT5=/DQT5
+) else (
+ set DEF_QT5=
+)
+
if exist %PORTABLE_EXE_DIR%\smplayer-portable.exe (
if exist %TOP_LEVEL_DIR%\smplayer-build (
- %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% %TOP_LEVEL_DIR%\smportable.nsi
+ %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% %DEF_QT5% %TOP_LEVEL_DIR%\smportable.nsi
)
)
+if exist %TOP_LEVEL_DIR%\smplayer-build64\Qt5Core.dll (
+ set DEF_QT5=/DQT5
+) else (
+ set DEF_QT5=
+)
+
if exist %PORTABLE_EXE_DIR%\smplayer-portable64.exe (
if exist %TOP_LEVEL_DIR%\smplayer-build64 (
- %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% /DWIN64 %TOP_LEVEL_DIR%\smportable.nsi
+ %MAKENSIS_EXE_PATH% /V3 /DVER_MAJOR=%VER_MAJOR% /DVER_MINOR=%VER_MINOR% /DVER_BUILD=%VER_BUILD% %VER_REV_CMD% /DWIN64 %DEF_QT5% %TOP_LEVEL_DIR%\smportable.nsi
)
)
diff --git a/setup/smplayer.nsi b/setup/smplayer.nsi
index 1f67f9f..5aa3c94 100644
--- a/setup/smplayer.nsi
+++ b/setup/smplayer.nsi
@@ -358,8 +358,10 @@ Section $(Section_SMPlayer) SecSMPlayer
File /r "${SMPLAYER_BUILD_DIR}\open-fonts\*.*"
;Qt platforms (Qt 5+)
+!ifdef QT5
SetOutPath "$INSTDIR\platforms"
- File /nonfatal /r "${SMPLAYER_BUILD_DIR}\platforms\*.*"
+ File /r "${SMPLAYER_BUILD_DIR}\platforms\*.*"
+!endif
;SMPlayer key shortcuts
SetOutPath "$INSTDIR\shortcuts"
@@ -419,6 +421,7 @@ SectionGroup $(MPlayerMPVGroupTitle)
File /r /x mplayer.exe /x mencoder.exe /x mplayer64.exe /x mencoder64.exe /x *.exe.debug /x gdb.exe /x gdb64.exe /x vfw2menc.exe /x buildinfo /x buildinfo64 /x buildinfo-mencoder-32 /x buildinfo-mencoder-debug-32 /x buildinfo-mplayer-32 /x buildinfo-mplayer-debug-32 /x buildinfo-mencoder-64 /x buildinfo-mencoder-debug-64 /x buildinfo-mplayer-64 /x buildinfo-mplayer-debug-64 "${SMPLAYER_BUILD_DIR}\mplayer\*.*"
!ifdef WIN64
File /oname=mplayer.exe "${SMPLAYER_BUILD_DIR}\mplayer\mplayer64.exe"
+ RMDir "$INSTDIR\mplayer\codecs"
!else
File "${SMPLAYER_BUILD_DIR}\mplayer\mplayer.exe"
!endif
@@ -529,12 +532,6 @@ ${MementoSection} $(Section_Translations) SecTranslations
${MementoSectionEnd}
-Section /o $(Reinstall_Msg5) SecResetSettings
-
- NsExec::Exec '"$INSTDIR\smplayer.exe" -delete-config'
-
-SectionEnd
-
Section -RestorePrograms
${If} $Restore_SMTube == 1
@@ -607,11 +604,22 @@ Section -Post
WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoModify" "1"
WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoRepair" "1"
- ;Clean up empty directories
- RMDir "$INSTDIR\platforms"
-!ifdef WIN64
- RMDir "$INSTDIR\mplayer\codecs"
-!endif
+ DetailPrint "Cleaning fontconfig cache..."
+ SetDetailsPrint none
+ Delete "$LOCALAPPDATA\fontconfig\cache\CACHEDIR.TAG"
+ Delete "$LOCALAPPDATA\fontconfig\cache\*.cache*"
+ RMDir "$LOCALAPPDATA\fontconfig\cache"
+ RMDir "$LOCALAPPDATA\fontconfig"
+ SetDetailsPrint both
+
+ ${If} $Reinstall_RemoveSettings_State == 1
+ DetailPrint "Cleaning SMPlayer settings..."
+ SetDetailsPrint none
+ NsExec::Exec '"$INSTDIR\smplayer.exe" -delete-config'
+ SetDetailsPrint both
+ ${EndIf}
+
+ Sleep 2500
;SetAutoClose false
@@ -629,7 +637,6 @@ ${MementoSectionDone}
!insertmacro MUI_DESCRIPTION_TEXT ${SecMPV} $(Section_MPV_Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${SecThemes} $(Section_IconThemes_Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} $(Section_Translations_Desc)
- !insertmacro MUI_DESCRIPTION_TEXT ${SecResetSettings} $(Section_ResetSettings_Desc)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
@@ -731,10 +738,29 @@ ${MementoSectionDone}
RMDir /r "$INSTDIR\shortcuts"
RMDir /r "$INSTDIR\themes"
RMDir /r "$INSTDIR\translations"
- Delete "$INSTDIR\*.txt"
- Delete "$INSTDIR\icudt51.dll"
- Delete "$INSTDIR\icuin51.dll"
- Delete "$INSTDIR\icuuc51.dll"
+
+ ;Txt
+ Delete "$INSTDIR\Copying.txt"
+ Delete "$INSTDIR\Copying_BSD.txt"
+ Delete "$INSTDIR\Copying_libmaia.txt"
+ Delete "$INSTDIR\Copying_openssl.txt"
+ Delete "$INSTDIR\dvdmenus.txt"
+ Delete "$INSTDIR\Finding_subtitles.txt"
+ Delete "$INSTDIR\Install.txt"
+ Delete "$INSTDIR\Notes_about_mpv.txt"
+ Delete "$INSTDIR\Not_so_obvious_things.txt"
+ Delete "$INSTDIR\Portable_Edition.txt"
+ Delete "$INSTDIR\Readme.txt"
+ Delete "$INSTDIR\Release_notes.txt"
+ Delete "$INSTDIR\Watching_TV.txt"
+
+ ;Binaries
+ Delete "$INSTDIR\smplayer.exe"
+ Delete "$INSTDIR\smtube.exe"
+ Delete "$INSTDIR\dxlist.exe"
+ Delete "$INSTDIR\icudt5*.dll"
+ Delete "$INSTDIR\icuin5*.dll"
+ Delete "$INSTDIR\icuuc5*.dll"
Delete "$INSTDIR\libgcc_s_*.dll"
Delete "$INSTDIR\libstdc++-6.dll"
Delete "$INSTDIR\libwinpthread-1.dll"
@@ -744,9 +770,6 @@ ${MementoSectionDone}
Delete "$INSTDIR\libeay32.dll"
Delete "$INSTDIR\ssleay32.dll"
Delete "$INSTDIR\sample.avi"
- Delete "$INSTDIR\smplayer.exe"
- Delete "$INSTDIR\smtube.exe"
- Delete "$INSTDIR\dxlist.exe"
;Delete registry keys
SetDetailsPrint textonly
@@ -801,7 +824,11 @@ FunctionEnd
Function .onInit
+!ifdef WIN64
+ ${Unless} ${AtLeastWinVista}
+!else
${Unless} ${AtLeastWinXP}
+!endif
MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported) /SD IDNO IDYES installonoldwindows
Abort
installonoldwindows:
@@ -1070,6 +1097,7 @@ Function PageReinstall
${NSD_OnClick} $Reinstall_OverwriteButton PageReinstallUpdate
${NSD_OnClick} $Reinstall_UninstallButton PageReinstallUpdate
${NSD_OnClick} $Reinstall_ChgSettings PageReinstallUpdate
+ ${NSD_OnClick} $Reinstall_RemoveSettings RemoveSettingsUpdate
Call PageReinstallUpdate
@@ -1084,8 +1112,16 @@ Function PageReinstallLeave
${NSD_GetState} $Reinstall_ChgSettings $Reinstall_ChgSettings_State
${NSD_GetState} $Reinstall_RemoveSettings $Reinstall_RemoveSettings_State
+FunctionEnd
+
+Function RemoveSettingsUpdate
+
+ ${NSD_GetState} $Reinstall_RemoveSettings $Reinstall_RemoveSettings_State
+
${If} $Reinstall_RemoveSettings_State == 1
- !insertmacro SelectSection ${SecResetSettings}
+ MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2 "Are you sure you want to reset your SMPlayer settings? This action cannot be reversed." /SD IDNO IDYES reset_done
+ ${NSD_SetState} $Reinstall_RemoveSettings 0
+ reset_done:
${EndIf}
FunctionEnd