Ignore:
Timestamp:
May 16, 2014, 9:51:55 AM (11 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update trunk to latest 0.8.7

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/setup/smplayer.nsi

    r156 r165  
    55!ifndef VER_MAJOR | VER_MINOR | VER_BUILD
    66  !error "Version information not defined (or incomplete). You must define: VER_MAJOR, VER_MINOR, VER_BUILD."
     7!endif
     8
     9!ifdef WIN64
     10  !define DISABLE_CODECS
    711!endif
    812
     
    102106  Var Reinstall_UninstallButton
    103107  Var Reinstall_UninstallButton_State
     108!ifndef DISABLE_CODECS
    104109  Var Restore_Codecs
     110!endif
    105111  Var SMPlayer_Path
    106112  Var SMPlayer_UnStrPath
     
    204210
    205211  !insertmacro MUI_LANGUAGE "English"
     212  !insertmacro MUI_LANGUAGE "Albanian"
     213  !insertmacro MUI_LANGUAGE "Arabic"
    206214  !insertmacro MUI_LANGUAGE "Basque"
     215  !insertmacro MUI_LANGUAGE "Bulgarian"
    207216  !insertmacro MUI_LANGUAGE "Catalan"
    208217  !insertmacro MUI_LANGUAGE "Croatian"
     
    218227  !insertmacro MUI_LANGUAGE "Japanese"
    219228  !insertmacro MUI_LANGUAGE "Korean"
     229  !insertmacro MUI_LANGUAGE "Malay"
    220230  !insertmacro MUI_LANGUAGE "Norwegian"
    221231  !insertmacro MUI_LANGUAGE "Polish"
    222232  !insertmacro MUI_LANGUAGE "Portuguese"
     233  !insertmacro MUI_LANGUAGE "PortugueseBR"
    223234  !insertmacro MUI_LANGUAGE "Russian"
     235  !insertmacro MUI_LANGUAGE "Serbian"
    224236  !insertmacro MUI_LANGUAGE "SimpChinese"
    225237  !insertmacro MUI_LANGUAGE "Slovak"
     
    232244
    233245  !insertmacro LANGFILE_INCLUDE "translations\english.nsh"
     246  !insertmacro LANGFILE_INCLUDE "translations\albanian.nsh"
     247  !insertmacro LANGFILE_INCLUDE "translations\arabic.nsh"
    234248  !insertmacro LANGFILE_INCLUDE "translations\basque.nsh"
     249  !insertmacro LANGFILE_INCLUDE "translations\bulgarian.nsh"
    235250  !insertmacro LANGFILE_INCLUDE "translations\catalan.nsh"
    236251  !insertmacro LANGFILE_INCLUDE "translations\croatian.nsh"
     
    246261  !insertmacro LANGFILE_INCLUDE "translations\japanese.nsh"
    247262  !insertmacro LANGFILE_INCLUDE "translations\korean.nsh"
     263  !insertmacro LANGFILE_INCLUDE "translations\malay.nsh"
    248264  !insertmacro LANGFILE_INCLUDE "translations\norwegian.nsh"
    249265  !insertmacro LANGFILE_INCLUDE "translations\polish.nsh"
    250266  !insertmacro LANGFILE_INCLUDE "translations\portuguese.nsh"
     267  !insertmacro LANGFILE_INCLUDE "translations\portuguesebrazil.nsh"
    251268  !insertmacro LANGFILE_INCLUDE "translations\russian.nsh"
     269  !insertmacro LANGFILE_INCLUDE "translations\serbian.nsh"
    252270  !insertmacro LANGFILE_INCLUDE "translations\simpchinese.nsh"
    253271  !insertmacro LANGFILE_INCLUDE "translations\slovak.nsh"
     
    283301    ${ElseIf} $Reinstall_OverwriteButton_State == 1
    284302
     303!ifndef DISABLE_CODECS
    285304      Call Backup_Codecs
     305!endif
    286306
    287307      ${If} "$INSTDIR" == "$SMPlayer_Path"
     
    308328  File /r "${SMPLAYER_BUILD_DIR}\imageformats\*.*"
    309329
     330  ;Qt platforms (Qt 5+)
     331  SetOutPath "$INSTDIR\platforms"
     332  File /nonfatal /r "${SMPLAYER_BUILD_DIR}\platforms\*.*"
     333
    310334  ;SMPlayer key shortcuts
    311335  SetOutPath "$INSTDIR\shortcuts"
    312336  File /r "${SMPLAYER_BUILD_DIR}\shortcuts\*.*"
    313337
     338!ifndef DISABLE_CODECS
    314339  SetOutPath "$PLUGINSDIR"
    315340  File 7za.exe
     341!endif
    316342
    317343  ;Initialize to 0 if don't exist (based on error flag)
     
    363389
    364390    SetOutPath "$INSTDIR\mplayer"
    365     File /r /x mplayer.exe /x mencoder.exe /x mplayer64.exe /x mencoder64.exe "${SMPLAYER_BUILD_DIR}\mplayer\*.*"
     391    File /r /x mplayer.exe /x mencoder.exe /x mplayer64.exe /x mencoder64.exe /x *.exe.debug "${SMPLAYER_BUILD_DIR}\mplayer\*.*"
    366392!ifdef WIN64
    367393    File /oname=mplayer.exe "${SMPLAYER_BUILD_DIR}\mplayer\mplayer64.exe"
     
    374400  SectionEnd
    375401
     402!ifndef DISABLE_CODECS
    376403  Section /o $(Section_MPlayerCodecs) SecCodecs
    377 
    378 !ifdef WIN64
    379     SectionIn RO
    380 !endif
    381404
    382405    AddSize 22931
     
    394417
    395418    DetailPrint $(Codecs_DL_Msg)
    396 !ifndef USE_NSISDL
     419!ifdef USE_INETC
    397420    inetc::get /CONNECTTIMEOUT 15000 /RESUME "" /BANNER $(Codecs_DL_Msg) /CAPTION $(Codecs_DL_Msg) \
    398421    "http://www.mplayerhq.hu/MPlayer/releases/codecs/${CODEC_VERSION}.zip" \
     
    432455
    433456  SectionEnd
     457!endif
    434458
    435459SectionGroupEnd
     
    487511  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayIcon" "$INSTDIR\smplayer.exe"
    488512  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayVersion" "${SMPLAYER_VERSION}"
    489   WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http://smplayer.sourceforge.net/forum"
     513  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http://forum.smplayer.info"
    490514  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "Publisher" "Ricardo Villalba"
    491515  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "UninstallString" "$INSTDIR\${SMPLAYER_UNINST_EXE}"
     
    495519  WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoRepair" "1"
    496520
     521  ;Clean up empty directories
     522  RMDir "$INSTDIR\platforms"
     523!ifdef WIN64
     524  RMDir "$INSTDIR\mplayer\codecs"
     525!endif
     526
    497527SectionEnd
    498528
     
    506536  !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenuShortcut} $(Section_StartMenu_Desc)
    507537  !insertmacro MUI_DESCRIPTION_TEXT ${SecMPlayer} $(Section_MPlayer_Desc)
     538!ifndef DISABLE_CODECS
    508539  !insertmacro MUI_DESCRIPTION_TEXT ${SecCodecs} $(Section_MPlayerCodecs_Desc)
     540!endif
    509541  !insertmacro MUI_DESCRIPTION_TEXT ${SecThemes} $(Section_IconThemes_Desc)
    510542  !insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} $(Section_Translations_Desc)
     
    606638  RMDir /r "$INSTDIR\imageformats"
    607639  RMDir /r "$INSTDIR\mplayer"
     640  RMDir /r "$INSTDIR\platforms"
    608641  RMDir /r "$INSTDIR\shortcuts"
    609642  RMDir /r "$INSTDIR\themes"
    610643  RMDir /r "$INSTDIR\translations"
    611644  Delete "$INSTDIR\*.txt"
    612   Delete "$INSTDIR\libgcc_s_dw2-1.dll"
     645  Delete "$INSTDIR\icudt51.dll"
     646  Delete "$INSTDIR\icuin51.dll"
     647  Delete "$INSTDIR\icuuc51.dll"
     648  Delete "$INSTDIR\libgcc_s_*.dll"
     649  Delete "$INSTDIR\libstdc++-6.dll"
    613650  Delete "$INSTDIR\libwinpthread-1.dll"
    614651  Delete "$INSTDIR\mingwm10.dll"
     
    720757  ${EndIf}
    721758
    722   Call LoadPreviousSettings
    723 
    724759  ;Setup language selection
    725760  !insertmacro MUI_LANGDLL_DISPLAY
    726761
     762  Call LoadPreviousSettings
     763
    727764  Call CheckPreviousVersion
    728765
     
    734771
    735772  ${MementoSectionSave}
    736 
    737 /*
    738   ${Unless} $Reinstall_Uninstall == 1
    739     ExecShell "open" "http://smplayer.sourceforge.net/thank-you.php?version=${SMPLAYER_VERSION}"
    740   ${EndIf}
    741 */
    742773
    743774FunctionEnd
     
    755786
    756787FunctionEnd
    757 
    758 /* Function un.onUninstSuccess
    759 
    760   ;Don't launch uninstall page if reinstalling
    761   ${un.GetParameters} $R0
    762   ${un.GetOptionsS} $R0 "/R" $R1
    763 
    764   IfErrors 0 +2
    765   ExecShell "open" "http://smplayer.sourceforge.net/uninstall.php?version=${SMPLAYER_VERSION}"
    766 
    767 FunctionEnd */
    768788
    769789Function CheckPreviousVersion
     
    776796  ${IfNot} ${Errors}
    777797    StrCpy $Reinstall_Uninstall 1
     798    !ifdef WIN64
     799    ;Workaround for InstallDirRegKey on 64-bit
     800    StrCpy $INSTDIR $SMPlayer_Path
     801    !endif
     802
     803    ;Since we can't get input from a silent install to initialize the variables, prefer upgrading
     804    ${If} ${Silent}
     805      StrCpy $Reinstall_UninstallButton_State 0
     806      StrCpy $Reinstall_OverwriteButton_State 1
     807    ${EndIf}
    778808  ${EndIf}
    779809
     
    794824FunctionEnd
    795825
     826!ifndef DISABLE_CODECS
    796827Function Backup_Codecs
    797828
     
    810841
    811842FunctionEnd
     843!endif
    812844
    813845Function LoadPreviousSettings
     
    815847  ;MPlayer codecs section doesn't use Memento so we need to restore it manually
    816848  ;32-bit only
    817 !ifdef WIN64
    818     !insertmacro UnSelectSection ${SecCodecs}
    819 !else
     849!ifndef DISABLE_CODECS
    820850    ReadRegDWORD $R0 HKLM "${SMPLAYER_REG_KEY}" "Installed_Codecs"
    821851    ${If} $R0 == 1
     
    9891019
    9901020  ;Make sure SMPlayer is installed from where the uninstaller is being executed.
    991   IfFileExists $INSTDIR\smplayer.exe smplayer_installed
    992     MessageBox MB_YESNO $(Uninstaller_NotInstalled) /SD IDNO IDYES smplayer_installed
    993     Abort $(Uninstaller_Aborted)
    994 
    995   smplayer_installed:
     1021  IfFileExists "$INSTDIR\smplayer.exe" +2
     1022    Abort $(Uninstaller_InvalidDirectory)
    9961023
    9971024  SetDetailsPrint textonly
Note: See TracChangeset for help on using the changeset viewer.