Ignore:
Timestamp:
Oct 24, 2012, 7:56:20 PM (13 years ago)
Author:
Silvan Scherrer
Message:

SMplayer: update vendor to 0.8.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smplayer/vendor/current/setup/smplayer.nsi

    r130 r133  
    1 ; Installer script for win32 SMPlayer
     1; Installer script for win32/win64 SMPlayer
    22; Written by redxii (redxii@users.sourceforge.net)
    3 ; Tested/Developed with Unicode NSIS 2.46.4
     3; Tested/Developed with Unicode NSIS 2.46.5
    44
    55!ifndef VER_MAJOR | VER_MINOR | VER_BUILD
     
    5050!endif
    5151
    52 !ifndef WITH_MPLAYER
    53 
    54   !ifndef DEFAULT_MPLAYER_VERSION
    55     !define DEFAULT_MPLAYER_VERSION "mplayer-svn-33216"
    56   !endif
    57 
    58 !endif
    59 
    6052  ;Version control
    6153!ifndef VERSION_FILE_URL
     
    7062  BrandingText "SMPlayer for Windows v${SMPLAYER_VERSION}"
    7163!ifdef WIN64
    72   !ifdef WITH_MPLAYER
    73     OutFile "smplayer-${SMPLAYER_VERSION}-x64.exe"
    74   !else ifndef WITH_MPLAYER
    75     OutFile "smplayer-${SMPLAYER_VERSION}-dl-x64.exe"
    76   !endif
     64  OutFile "output\smplayer-${SMPLAYER_VERSION}-x86_64.exe"
    7765!else
    78   !ifdef WITH_MPLAYER
    79     ;OutFile "smplayer-${SMPLAYER_VERSION}-x86.exe"
    80     OutFile "smplayer-${SMPLAYER_VERSION}-win32.exe"
    81   !else ifndef WITH_MPLAYER
    82     ;OutFile "smplayer-${SMPLAYER_VERSION}-dl-x86.exe"
    83     OutFile "smplayer-${SMPLAYER_VERSION}-webdl.exe"
    84   !endif
     66  OutFile "output\smplayer-${SMPLAYER_VERSION}-x86.exe"
    8567!endif
    8668
     
    9274  VIAddVersionKey "LegalCopyright" ""
    9375!ifdef WIN64
    94   !ifdef WITH_MPLAYER
    95     VIAddVersionKey "FileDescription" "SMPlayer Installer x64 (Offline)"
    96   !else ifndef WITH_MPLAYER
    97     VIAddVersionKey "FileDescription" "SMPlayer Installer x64 (Web Downloader)"
    98   !endif
     76  VIAddVersionKey "FileDescription" "SMPlayer Installer (64-bit)"
    9977!else
    100   !ifdef WITH_MPLAYER
    101     ;VIAddVersionKey "FileDescription" "SMPlayer Installer x86 (Offline)"
    102     VIAddVersionKey "FileDescription" "SMPlayer Installer (Offline)"
    103   !else ifndef WITH_MPLAYER
    104     ;VIAddVersionKey "FileDescription" "SMPlayer Installer x86 (Web Downloader)"
    105     VIAddVersionKey "FileDescription" "SMPlayer Installer (Web Downloader)"
    106   !endif
     78  VIAddVersionKey "FileDescription" "SMPlayer Installer (32-bit)"
    10779!endif
    10880
     
    12698;Variables
    12799
    128   Var Codec_Version
    129100  Var Dialog_Reinstall
    130101  Var Inst_Type
     
    140111  Var Reinstall_UninstallButton_State
    141112  Var SMPlayer_Path
     113  Var SMPlayer_UnStrPath
    142114  Var SMPlayer_StartMenuFolder
    143115
     
    307279
    308280    ${If} $Reinstall_UninstallButton_State == 1
    309       Exec '"$SMPlayer_Path\uninst.exe" /X'
     281      Exec '"$SMPlayer_UnStrPath" /X'
    310282      Quit
    311283    ${ElseIf} $Reinstall_OverwriteButton_State == 1
    312284      ${If} "$INSTDIR" == "$SMPlayer_Path"
    313         ExecWait '"$SMPlayer_Path\uninst.exe" /S /R _?=$SMPlayer_Path'
     285        ExecWait '"$SMPlayer_UnStrPath" /S /R _?=$SMPlayer_Path'
    314286      ${Else}
    315         ExecWait '"$SMPlayer_Path\uninst.exe" /S /R'
     287        ExecWait '"$SMPlayer_UnStrPath" /S /R'
    316288      ${EndIf}
    317289    ${EndIf}
     
    354326SectionGroup $(ShortcutGroupTitle)
    355327
    356   ${MementoUnselectedSection} $(Section_DesktopShortcut) SecDesktopShortcut
     328  ${MementoSection} $(Section_DesktopShortcut) SecDesktopShortcut
    357329
    358330    SetOutPath "$INSTDIR"
     
    368340      CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer.lnk" "$INSTDIR\smplayer.exe"
    369341      CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMTube.lnk" "$INSTDIR\smtube.exe"
    370       WriteINIStr    "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer on the Web.url" "InternetShortcut" "URL" "http://smplayer.sf.net"
     342      WriteINIStr    "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer on the Web.url" "InternetShortcut" "URL" "http://smplayer.sourceforge.net"
    371343      CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\Uninstall SMPlayer.lnk" "$INSTDIR\${SMPLAYER_UNINST_EXE}"
    372344    !insertmacro MUI_STARTMENU_WRITE_END
     
    384356    SectionIn RO
    385357
    386 !ifdef WITH_MPLAYER
    387358    SetOutPath "$INSTDIR\mplayer"
    388359    File /r "${SMPLAYER_BUILD_DIR}\mplayer\*.*"
    389360
    390361    WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer 0x1
    391 !else ifndef WITH_MPLAYER
    392     AddSize 16800
    393 
    394     Var /GLOBAL MPlayer_Version
    395 
    396     Call GetVerInfo
    397 
    398     /* Read from version-info
    399     If it was unable to download, set version to that defined in the
    400     beginning of the script. */
    401     ${If} ${FileExists} "$PLUGINSDIR\version-info"
    402       ReadINIStr $MPlayer_Version "$PLUGINSDIR\version-info" smplayer mplayer
    403     ${Else}
    404       StrCpy $MPlayer_Version ${DEFAULT_MPLAYER_VERSION}
    405     ${EndIf}
    406 
    407     retry_mplayer:
    408 
    409     DetailPrint $(MPlayer_DL_Msg)
    410     inetc::get /CONNECTTIMEOUT 15000 /RESUME "" /BANNER $(MPlayer_DL_Msg) /CAPTION $(MPlayer_DL_Msg) \"http://downloads.sourceforge.net/smplayer/$MPlayer_Version.7z?big_mirror=0" \
    411     "$PLUGINSDIR\$MPlayer_Version.7z" /END
    412     Pop $R0
    413     StrCmp $R0 OK 0 check_mplayer
    414 
    415     DetailPrint $(Info_Files_Extract)
    416     nsExec::Exec '"$PLUGINSDIR\7za.exe" x "$PLUGINSDIR\$MPlayer_Version.7z" -y -o"$PLUGINSDIR"'
    417 
    418     CreateDirectory "$INSTDIR\mplayer"
    419     CopyFiles /SILENT "$PLUGINSDIR\$MPlayer_Version\*" "$INSTDIR\mplayer"
    420 
    421     check_mplayer:
    422 
    423     ${If} $R0 != "OK"
    424       DetailPrint $(MPlayer_DL_Failed)
    425     ${EndIf}
    426 
    427     IfFileExists "$INSTDIR\mplayer\mplayer.exe" mplayerInstSuccess mplayerInstFailed
    428       mplayerInstSuccess:
    429         WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer 0x1
    430         Goto done
    431       mplayerInstFailed:
    432         MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(MPlayer_DL_Retry) /SD IDCANCEL IDRETRY retry_mplayer
    433         Abort $(MPlayer_Inst_Failed)
    434 
    435     done:
    436 !endif
     362
    437363  SectionEnd
    438364
     
    440366
    441367    AddSize 22300
     368
     369    Var /GLOBAL Codec_Version
    442370
    443371    Call GetVerInfo
     
    534462  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayIcon" "$INSTDIR\smplayer.exe"
    535463  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayVersion" "${SMPLAYER_VERSION}"
    536   WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http://smplayer.berlios.de/forum"
     464  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http://smplayer.sourceforge.net/forum"
    537465  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "Publisher" "Ricardo Villalba"
    538466  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "UninstallString" "$INSTDIR\${SMPLAYER_UNINST_EXE}"
    539   WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLInfoAbout" "http://smplayer.sf.net"
    540   WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLUpdateInfo" "http://smplayer.sf.net"
     467  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLInfoAbout" "http://smplayer.sourceforge.net"
     468  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLUpdateInfo" "http://smplayer.sourceforge.net"
    541469  WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoModify" "1"
    542470  WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoRepair" "1"
     
    583511  !insertmacro ${_action} ".m3u"
    584512  !insertmacro ${_action} ".m3u8"
     513  !insertmacro ${_action} ".m4a"
    585514  !insertmacro ${_action} ".m4v"
     515  !insertmacro ${_action} ".mka"
    586516  !insertmacro ${_action} ".mkv"
    587517  !insertmacro ${_action} ".mov"
     
    593523  !insertmacro ${_action} ".mqv"
    594524  !insertmacro ${_action} ".nsv"
     525  !insertmacro ${_action} ".oga"
    595526  !insertmacro ${_action} ".ogg"
    596527  !insertmacro ${_action} ".ogm"
    597528  !insertmacro ${_action} ".ogv"
     529  !insertmacro ${_action} ".ogx"
    598530  !insertmacro ${_action} ".pls"
    599531  !insertmacro ${_action} ".ra"
     
    613545  !insertmacro ${_action} ".wma"
    614546  !insertmacro ${_action} ".wmv"
     547  !insertmacro ${_action} ".wtv"
    615548!macroend
    616549
     
    677610
    678611  retry_runcheck:
    679   FindProcDLL::FindProc "smplayer.exe"
    680   IntCmp $R0 1 0 +3
    681     MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(SMPlayer_Is_Running) /SD IDCANCEL IDRETRY retry_runcheck
    682     Abort
     612        FindProcDLL::FindProc "smplayer.exe"
     613        IntCmp $R0 1 0 +3
     614                MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(SMPlayer_Is_Running) /SD IDCANCEL IDRETRY retry_runcheck
     615                Abort
    683616
    684617FunctionEnd
     
    691624
    692625Function .onInit
     626
     627  ${Unless} ${AtLeastWinXP}
     628    MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported) /SD IDNO IDYES installonoldwindows
     629    Abort
     630        installonoldwindows:
     631  ${EndIf}
    693632
    694633!ifdef WIN64
     
    721660!endif
    722661
    723   !ifdef PRE_RELEASE
    724     MessageBox MB_OK|MB_ICONINFORMATION "This is a pre-release version of SMPlayer. Please report all issues."
    725   !endif
    726 
    727662  ;Check if setup is already running
    728663  System::Call 'kernel32::CreateMutexW(i 0, i 0, t "SMPlayerSetup") i .r1 ?e'
     
    778713  ClearErrors
    779714  ReadRegStr $Previous_Version HKLM "${SMPLAYER_REG_KEY}" "Version"
     715  ReadRegStr $SMPlayer_UnStrPath HKLM "${SMPLAYER_UNINST_KEY}" "UninstallString"
    780716  ReadRegStr $SMPlayer_Path HKLM "${SMPLAYER_REG_KEY}" "Path"
    781717
     
    1007943!ifdef WIN64
    1008944  ${IfNot} ${RunningX64}
    1009     MessageBox MB_OK|MB_ICONSTOP "This installation can only be uninstalled on 64-bit Windows."
     945    MessageBox MB_OK|MB_ICONSTOP $(Uninstaller_64bitOnly)
    1010946    Abort
    1011947  ${EndIf}
Note: See TracChangeset for help on using the changeset viewer.