Ignore:
Timestamp:
Mar 16, 2012, 4:02:47 PM (14 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: 0.7.1 trunk update

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/setup/smplayer.win32.nsi

    r119 r124  
    208208  !insertmacro MUI_LANGUAGE "Basque"
    209209  !insertmacro MUI_LANGUAGE "Catalan"
     210
    210211  !insertmacro MUI_LANGUAGE "Czech"
    211212  !insertmacro MUI_LANGUAGE "Danish"
     
    234235  !insertmacro LANGFILE_INCLUDE "translations\basque.nsh"
    235236  !insertmacro LANGFILE_INCLUDE "translations\catalan.nsh"
     237
    236238  !insertmacro LANGFILE_INCLUDE "translations\czech.nsh"
    237239  !insertmacro LANGFILE_INCLUDE "translations\danish.nsh"
     
    264266  !insertmacro MUI_RESERVEFILE_LANGDLL
    265267  ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
     268
    266269
    267270;--------------------------------
     
    276279  ${If} $Reinstall_Uninstall == 1
    277280
    278     ReadRegStr $R0 HKLM ${SMPLAYER_REG_KEY} "Path"
    279 
    280281    ${If} $Reinstall_UninstallButton_State == 1
    281       Exec '"$R0\uninst.exe" /X'
     282      Exec '"$\uninst.exe" /X'
    282283      Quit
    283284    ${ElseIf} $Reinstall_OverwriteButton_State == 1
    284       ${If} "$INSTDIR" == "$R0"
    285         ExecWait '"$R0\uninst.exe" /S /R _?=$R0'
     285      ${If} "$INSTDIR" == "$"
     286        ExecWait '"$'
    286287      ${Else}
    287         ExecWait '"$R0\uninst.exe" /S /R'
     288        ExecWait '"$\uninst.exe" /S /R'
    288289      ${EndIf}
    289290    ${EndIf}
     
    339340      CreateDirectory "$SMPROGRAMS\$SMPlayer_StartMenuFolder"
    340341      CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer.lnk" "$INSTDIR\smplayer.exe"
     342
    341343      WriteINIStr    "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer on the Web.url" "InternetShortcut" "URL" "http://smplayer.sf.net"
    342344      CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\Uninstall SMPlayer.lnk" "$INSTDIR\${SMPLAYER_UNINST_EXE}"
     
    377379
    378380    DetailPrint $(MPlayer_DL_Msg)
    379     inetc::get /timeout 30000 /resume "" /silent "http://downloads.sourceforge.net/smplayer/$MPlayer_Version.7z?big_mirror=0" \
    380     "$PLUGINSDIR\$MPlayer_Version.7z" /end
     381    inetc::get /"http://downloads.sourceforge.net/smplayer/$MPlayer_Version.7z?big_mirror=0" \
     382    "$PLUGINSDIR\$MPlayer_Version.7z" /
    381383    Pop $R0
    382384    StrCmp $R0 OK 0 check_mplayer
     
    424426
    425427    DetailPrint $(Codecs_DL_Msg)
    426     inetc::get /timeout 30000 /resume "" /silent "http://www.mplayerhq.hu/MPlayer/releases/codecs/$Codec_Version.zip" \
    427     "$PLUGINSDIR\$Codec_Version.zip" /end
     428    inetc::get /CONNECTTIMEOUT 15000 /RESUME "" /BANNER $(Codecs_DL_Msg) /CAPTION $(Codecs_DL_Msg) \
     429    "http://www.mplayerhq.hu/MPlayer/releases/codecs/$Codec_Version.zip" \
     430    "$PLUGINSDIR\$Codec_Version.zip" /END
    428431    Pop $R0
    429432    StrCmp $R0 OK 0 check_codecs
     
    468471;--------------------------------
    469472;Translations
    470 SectionGroup $(Section_Translations) SecTranslations
    471 
    472   Section "English" SecLang_ENUS
    473     SectionIn RO
    474 
    475     SetOutPath "$INSTDIR\translations"
    476     File /r "smplayer-build\translations\smplayer_en_US.qm"
    477   SectionEnd
    478 
    479   ${MementoSection} "العربية" SecLang_ARSY
    480     SetOutPath "$INSTDIR\translations"
    481     File /r "smplayer-build\translations\smplayer_ar_SY.qm"
    482   ${MementoSectionEnd}
    483 
    484   ${MementoSection} "български" SecLang_BG
    485     SetOutPath "$INSTDIR\translations"
    486     File /r "smplayer-build\translations\smplayer_bg.qm"
    487   ${MementoSectionEnd}
    488 
    489   ${MementoSection} "Català" SecLang_CA
    490     SetOutPath "$INSTDIR\translations"
    491     File /r "smplayer-build\translations\smplayer_ca.qm"
    492   ${MementoSectionEnd}
    493 
    494   ${MementoSection} "Čeština" SecLang_CS
    495     SetOutPath "$INSTDIR\translations"
    496     File /r "smplayer-build\translations\smplayer_cs.qm"
    497   ${MementoSectionEnd}
    498 
    499   ${MementoSection} "Dansk" SecLang_DA
    500     SetOutPath "$INSTDIR\translations"
    501     File /r "smplayer-build\translations\smplayer_da.qm"
    502   ${MementoSectionEnd}
    503 
    504   ${MementoSection} "Deutsch" SecLang_DE
    505     SetOutPath "$INSTDIR\translations"
    506     File /r "smplayer-build\translations\smplayer_de.qm"
    507   ${MementoSectionEnd}
    508 
    509   ${MementoSection} "Ελληνικά" SecLang_ELGR
    510     SetOutPath "$INSTDIR\translations"
    511     File /r "smplayer-build\translations\smplayer_el_GR.qm"
    512   ${MementoSectionEnd}
    513 
    514   ${MementoSection} "Español" SecLang_ES
    515     SetOutPath "$INSTDIR\translations"
    516     File /r "smplayer-build\translations\smplayer_es.qm"
    517   ${MementoSectionEnd}
    518 
    519   ${MementoSection} "Eesti Keel" SecLang_ET
    520     SetOutPath "$INSTDIR\translations"
    521     File /r "smplayer-build\translations\smplayer_et.qm"
    522   ${MementoSectionEnd}
    523 
    524   ${MementoSection} "Euskara" SecLang_EU
    525     SetOutPath "$INSTDIR\translations"
    526     File /r "smplayer-build\translations\smplayer_eu.qm"
    527   ${MementoSectionEnd}
    528 
    529   ${MementoSection} "Suomi" SecLang_FI
    530     SetOutPath "$INSTDIR\translations"
    531     File /r "smplayer-build\translations\smplayer_fi.qm"
    532   ${MementoSectionEnd}
    533 
    534   ${MementoSection} "Français" SecLang_FR
    535     SetOutPath "$INSTDIR\translations"
    536     File /r "smplayer-build\translations\smplayer_fr.qm"
    537   ${MementoSectionEnd}
    538 
    539   ${MementoSection} "Galego" SecLang_GL
    540     SetOutPath "$INSTDIR\translations"
    541     File /r "smplayer-build\translations\smplayer_gl.qm"
    542   ${MementoSectionEnd}
    543 
    544   ${MementoSection} "Magyar" SecLang_HU
    545     SetOutPath "$INSTDIR\translations"
    546     File /r "smplayer-build\translations\smplayer_hu.qm"
    547   ${MementoSectionEnd}
    548 
    549   ${MementoSection} "Italiano" SecLang_IT
    550     SetOutPath "$INSTDIR\translations"
    551     File /r "smplayer-build\translations\smplayer_it.qm"
    552   ${MementoSectionEnd}
    553 
    554   ${MementoSection} "日本語" SecLang_JA
    555     SetOutPath "$INSTDIR\translations"
    556     File /r "smplayer-build\translations\smplayer_ja.qm"
    557   ${MementoSectionEnd}
    558 
    559   ${MementoSection} "ქართული" SecLang_KA
    560     SetOutPath "$INSTDIR\translations"
    561     File /r "smplayer-build\translations\smplayer_ka.qm"
    562   ${MementoSectionEnd}
    563 
    564   ${MementoSection} "한국어" SecLang_KO
    565     SetOutPath "$INSTDIR\translations"
    566     File /r "smplayer-build\translations\smplayer_ko.qm"
    567   ${MementoSectionEnd}
    568 
    569   ${MementoSection} "كوردی" SecLang_KU
    570     SetOutPath "$INSTDIR\translations"
    571     File /r "smplayer-build\translations\smplayer_ku.qm"
    572   ${MementoSectionEnd}
    573 
    574   ${MementoSection} "Lietuvių" SecLang_LT
    575     SetOutPath "$INSTDIR\translations"
    576     File /r "smplayer-build\translations\smplayer_lt.qm"
    577   ${MementoSectionEnd}
    578 
    579   ${MementoSection} "Mакедонски" SecLang_MK
    580     SetOutPath "$INSTDIR\translations"
    581     File /r "smplayer-build\translations\smplayer_mk.qm"
    582   ${MementoSectionEnd}
    583 
    584   ${MementoSection} "Nederlands" SecLang_NL
    585     SetOutPath "$INSTDIR\translations"
    586     File /r "smplayer-build\translations\smplayer_nl.qm"
    587   ${MementoSectionEnd}
    588 
    589   ${MementoSection} "Polski" SecLang_PL
    590     SetOutPath "$INSTDIR\translations"
    591     File /r "smplayer-build\translations\smplayer_pl.qm"
    592   ${MementoSectionEnd}
    593 
    594   ${MementoSection} "Português" SecLang_PT
    595     SetOutPath "$INSTDIR\translations"
    596     File /r "smplayer-build\translations\smplayer_pt.qm"
    597   ${MementoSectionEnd}
    598 
    599   ${MementoSection} "Português (Brasil)" SecLang_PTBR
    600     SetOutPath "$INSTDIR\translations"
    601     File /r "smplayer-build\translations\smplayer_pt_BR.qm"
    602   ${MementoSectionEnd}
    603 
    604   ${MementoSection} "Română" SecLang_roRO
    605     SetOutPath "$INSTDIR\translations"
    606     File /r "smplayer-build\translations\smplayer_ro_RO.qm"
    607   ${MementoSectionEnd}
    608 
    609   ${MementoSection} "Pусский" SecLang_ruRU
    610     SetOutPath "$INSTDIR\translations"
    611     File /r "smplayer-build\translations\smplayer_ru_RU.qm"
    612   ${MementoSectionEnd}
    613 
    614   ${MementoSection} "Slovenčina" SecLang_SK
    615     SetOutPath "$INSTDIR\translations"
    616     File /r "smplayer-build\translations\smplayer_sk.qm"
    617   ${MementoSectionEnd}
    618 
    619   ${MementoSection} "Slovenščina" SecLang_SLSI
    620     SetOutPath "$INSTDIR\translations"
    621     File /r "smplayer-build\translations\smplayer_sl_SI.qm"
    622   ${MementoSectionEnd}
    623 
    624   ${MementoSection} "Cрпски" SecLang_SR
    625     SetOutPath "$INSTDIR\translations"
    626     File /r "smplayer-build\translations\smplayer_sr.qm"
    627   ${MementoSectionEnd}
    628 
    629   ${MementoSection} "Svenska" SecLang_SV
    630     SetOutPath "$INSTDIR\translations"
    631     File /r "smplayer-build\translations\smplayer_sv.qm"
    632   ${MementoSectionEnd}
    633 
    634   ${MementoSection} "Türkçe" SecLang_TR
    635     SetOutPath "$INSTDIR\translations"
    636     File /r "smplayer-build\translations\smplayer_tr.qm"
    637   ${MementoSectionEnd}
    638 
    639   ${MementoSection} "Yкраїнська" SecLang_UKUA
    640     SetOutPath "$INSTDIR\translations"
    641     File /r "smplayer-build\translations\smplayer_uk_UA.qm"
    642   ${MementoSectionEnd}
    643 
    644   ${MementoSection} "Tiếng Việt" SecLang_VIVN
    645     SetOutPath "$INSTDIR\translations"
    646     File /r "smplayer-build\translations\smplayer_vi_VN.qm"
    647   ${MementoSectionEnd}
    648 
    649   ${MementoSection} "简化字" SecLang_ZHCN
    650     SetOutPath "$INSTDIR\translations"
    651     File /r "smplayer-build\translations\smplayer_zh_CN.qm"
    652   ${MementoSectionEnd}
    653 
    654   ${MementoSection} "漢語(繁體)" SecLang_ZHTW
    655     SetOutPath "$INSTDIR\translations"
    656     File /r "smplayer-build\translations\smplayer_zh_TW.qm"
    657   ${MementoSectionEnd}
    658 
    659 SectionGroupEnd
     473${MementoSection} $(Section_Translations) SecTranslations
     474
     475  SetOutPath "$INSTDIR\translations"
     476  File /r "smplayer-build\translations\*.*"
     477
     478${MementoSectionEnd}
    660479
    661480;--------------------------------
     
    776595  Delete "$DESKTOP\SMPlayer.lnk"
    777596  Delete "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer.lnk"
     597
    778598  Delete "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer on the Web.url"
    779599  Delete "$SMPROGRAMS\$SMPlayer_StartMenuFolder\Uninstall SMPlayer.lnk"
     
    795615  Delete "$INSTDIR\libgcc_s_dw2-1.dll"
    796616  Delete "$INSTDIR\mingwm10.dll"
     617
    797618  Delete "$INSTDIR\Q*.dll"
    798619  Delete "$INSTDIR\smplayer.exe"
     620
    799621  Delete "$INSTDIR\dxlist.exe"
    800622
     
    814636
    815637;--------------------------------
    816 ;Installer functions
    817 
    818 Function .onInit
    819 
    820   !ifdef PRE_RELEASE
    821     MessageBox MB_OK|MB_ICONINFORMATION "This is a pre-release version of SMPlayer. Please report all issues."
    822   !endif
    823 
    824   ;Check if setup is already running
    825   System::Call 'kernel32::CreateMutexW(i 0, i 0, t "SMPlayerSetup") i .r1 ?e'
    826   Pop $R0
    827 
    828   StrCmp $R0 0 +3
    829     MessageBox MB_OK|MB_ICONEXCLAMATION $(Installer_Is_Running)
    830     Abort
    831 
    832   ;Check for admin on older OSes
    833   Call CheckUserRights
    834 
    835   ${If} $Is_Admin == 0
    836     MessageBox MB_OK|MB_ICONSTOP $(Installer_No_Admin)
    837     Abort
    838   ${EndIf}
    839 
    840   Call LoadPreviousSettings
    841 
    842   ;Setup language selection
    843   !insertmacro MUI_LANGDLL_DISPLAY
    844 
    845   Call CheckPreviousVersion
    846 
    847   SetShellVarContext all
    848 
    849 FunctionEnd
    850 
    851 Function .onInstSuccess
    852 
    853   ${MementoSectionSave}
    854 
    855 FunctionEnd
    856 
    857 Function .onInstFailed
    858 
    859   SetDetailsPrint textonly
    860   DetailPrint "Rolling back changes..."
    861   SetDetailsPrint listonly
    862 
    863   !insertmacro MacroRemoveSMPlayer
    864 
    865   Delete "$INSTDIR\${SMPLAYER_UNINST_EXE}"
    866   RMDir "$INSTDIR"
    867 
    868 FunctionEnd
    869 
    870 Function CheckPreviousVersion
    871 
    872   ReadRegStr $Previous_Version HKLM "${SMPLAYER_REG_KEY}" "Version"
    873   ReadRegStr $SMPlayer_Path HKLM "${SMPLAYER_REG_KEY}" "Path"
    874 
    875   /* $Previous_Version_State Assignments:
    876   $Previous_Version_State=0  This installer is the same version as the installed copy
    877   $Previous_Version_State=1  A newer version than this installer is already installed
    878   $Previous_Version_State=2  An older version than this installer is already installed */
    879   ${VersionCompare} $Previous_Version ${SMPLAYER_VERSION} $Previous_Version_State
    880 
    881   ${If} $Previous_Version_State == 0
    882     StrCpy $Inst_Type $(Type_Reinstall)
    883   ${ElseIf} $Previous_Version_State == 1
    884     StrCpy $Inst_Type $(Type_Downgrade)
    885   ${ElseIf} $Previous_Version_State == 2
    886     StrCpy $Inst_Type $(Type_Upgrade)
    887   ${EndIf}
    888 
    889 FunctionEnd
    890 
    891 Function CheckUserRights
     638;Shared functions
     639
     640!macro CheckUserRightsMacro UN
     641Function ${UN}CheckUserRights
    892642
    893643  ClearErrors
     
    912662
    913663FunctionEnd
     664
     665
     666
     667
     668
     669
     670
     671
     672
     673
     674
     675
     676
     677
     678
     679
     680
     681
     682
     683
     684
     685
     686
     687
     688
     689
     690
     691
     692
     693
     694
     695
     696
     697
     698
     699
     700
     701
     702
     703
     704
     705
     706
     707
     708
     709
     710
     711
     712
     713
     714
     715
     716
     717
     718
     719
     720
     721
     722
     723
     724
     725
     726
     727
     728
     729
     730
     731
     732
     733
     734
     735
     736
     737
     738
     739
     740
     741
     742
     743
     744
     745
     746
     747
     748
     749
     750
     751
     752
     753
     754
     755
     756
     757
     758
     759
     760
     761
     762
     763
     764
    914765
    915766Function GetVerInfo
     
    917768  IfFileExists "$PLUGINSDIR\version-info" end_dl_ver_info 0
    918769    DetailPrint $(VerInfo_DL_Msg)
    919     inetc::get /timeout 30000 /resume "" /silent ${VERSION_FILE_URL} "$PLUGINSDIR\version-info" /end
     770    inetc::get /
    920771    Pop $R0
    921772    StrCmp $R0 OK +2
     
    943794Function PageReinstall
    944795
    945   ${If} $Previous_Version == ""
    946   ${OrIf} $SMPlayer_Path == ""
     796  ${If} $Reinstall_Uninstall != 1
    947797    Abort
    948798  ${EndIf}
     
    985835
    986836  Call PageReinstallUpdate
    987 
    988   StrCpy $Reinstall_Uninstall 1
    989837
    990838  nsDialogs::Show
     
    1128976  ${EndIf}
    1129977
     978
     979
     980
    1130981  ;Gets start menu folder name
    1131982  !insertmacro MUI_STARTMENU_GETFOLDER "SMP_SMenu" $SMPlayer_StartMenuFolder
     
    1133984  ;Get the stored language preference
    1134985  !insertmacro MUI_UNGETLANGUAGE
    1135 
    1136 FunctionEnd
    1137 
    1138 Function un.CheckUserRights
    1139 
    1140   ClearErrors
    1141   UserInfo::GetName
    1142   ${If} ${Errors}
    1143     StrCpy $Is_Admin 1
    1144     Return
    1145   ${EndIf}
    1146 
    1147   Pop $UserName
    1148   UserInfo::GetAccountType
    1149   Pop $R0
    1150   ${Switch} $R0
    1151     ${Case} "Admin"
    1152     ${Case} "Power"
    1153       StrCpy $Is_Admin 1
    1154       ${Break}
    1155     ${Default}
    1156       StrCpy $Is_Admin 0
    1157       ${Break}
    1158   ${EndSwitch}
    1159986
    1160987FunctionEnd
Note: See TracChangeset for help on using the changeset viewer.