From 724cfa6f23d7866ee04023616ab74ff62e11f967 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sun, 11 Dec 2016 17:49:27 +0100 Subject: [PATCH] Support for new SMPlayer versions based on Qt5. --- MPUI_Common.nsh | 9 +++++++++ MPUI_Setup.nsi | 35 ++++++++++------------------------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/MPUI_Common.nsh b/MPUI_Common.nsh index 3e172e1..388b2da 100644 --- a/MPUI_Common.nsh +++ b/MPUI_Common.nsh @@ -41,6 +41,15 @@ ; ---------------------------------------------------------------------------- +!define ExtractSubDir "!insertmacro _ExtractSubDir" + +!macro _ExtractSubDir BaseDir SubDir + SetOutPath "$INSTDIR\${SubDir}" + File /r "${BaseDir}\${SubDir}\*.*" +!macroend + +; ---------------------------------------------------------------------------- + !define CreateWebLink "!insertmacro _CreateWebLink" !macro _CreateWebLink ShortcutFile TargetURL diff --git a/MPUI_Setup.nsi b/MPUI_Setup.nsi index 56e6e63..fd84026 100644 --- a/MPUI_Setup.nsi +++ b/MPUI_Setup.nsi @@ -411,12 +411,14 @@ Section "-Clean Up" Delete "$INSTDIR\*.ass" Delete "$INSTDIR\*.m3u8" Delete "$INSTDIR\*.tag" + RMDir /r "$INSTDIR\codecs" RMDir /r "$INSTDIR\fonts" RMDir /r "$INSTDIR\imageformats" RMDir /r "$INSTDIR\legal_stuff" RMDir /r "$INSTDIR\locale" RMDir /r "$INSTDIR\mplayer" + RMDir /r "$INSTDIR\platforms" RMDir /r "$INSTDIR\shortcuts" RMDir /r "$INSTDIR\themes" RMDir /r "$INSTDIR\translations" @@ -535,34 +537,17 @@ Section "!SMPlayer $(MPLAYER_LANG_FRONT_END) v${SMPLAYER_VERSION}" SECID_SMPLAYE SectionIn 1 ${PrintProgress} "$(MPLAYER_LANG_STATUS_INST_SMPLAYER)" - ; SMPlayer files + ; SMPlayer program files SetOutPath "$INSTDIR" - File "SMPlayer\SMPlayer.exe" - File "SMPlayer\libgcc_s_dw2-1.dll" - File "SMPlayer\libstdc++-6.dll" - File "SMPlayer\libwinpthread-1.dll" - File "SMPlayer\QtCore4.dll" - File "SMPlayer\QtGui4.dll" - File "SMPlayer\QtNetwork4.dll" - File "SMPlayer\QtScript4.dll" - File "SMPlayer\QtXml4.dll" - File "SMPlayer\QtDBus4.dll" - File "SMPlayer\libeay32.dll" - File "SMPlayer\ssleay32.dll" - File "SMPlayer\msvcr120.dll" - File "SMPlayer\zlib1.dll" + File "SMPlayer\*.exe" + File "SMPlayer\*.dll" ; Additional SMPlayer files - SetOutPath "$INSTDIR\translations" - File "SMPlayer\translations\*.qm" - SetOutPath "$INSTDIR\imageformats" - File "SMPlayer\imageformats\*.dll" - SetOutPath "$INSTDIR\shortcuts" - File "SMPlayer\shortcuts\*.keys" - SetOutPath "$INSTDIR\themes" - File /r "SMPlayer\themes\*.txt" - File /r "SMPlayer\themes\*.rcc" - File /r "SMPlayer\themes\*.css" + ${ExtractSubDir} "SMPlayer" "imageformats" + ${ExtractSubDir} "SMPlayer" "platforms" + ${ExtractSubDir} "SMPlayer" "shortcuts" + ${ExtractSubDir} "SMPlayer" "themes" + ${ExtractSubDir} "SMPlayer" "translations" ; Set file access rights ${MakeFilePublic} "$INSTDIR\SMPlayer.ini" -- 2.11.4.GIT