Ignore:
Timestamp:
Aug 31, 2016, 5:19:25 PM (9 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update vendor to version 16.8.0

File:
1 edited

Legend:

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

    r175 r179  
    1 ;Installer script for win32/win64 SMPlayer
     1;Installer script for win32/win64 SMPlayer
    22;Written by redxii (redxii@users.sourceforge.net)
    3 ;Tested/Developed with Unicode NSIS 2.46.5
     3;Tested/Developed with Unicode NSIS 2.46.5/3.0rc1
    44
    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;Use this to make 3.0+ mandatory
     10;!if 0x2999999 >= "${NSIS_PACKEDVERSION}"
     11;!error "NSIS 3.0 or higher required"
     12;!endif
     13
     14!if ${NSIS_PACKEDVERSION} > 0x2999999
     15  Unicode true
    716!endif
    817
     
    4352  !define SMPLAYER_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\SMPlayer"
    4453
     54  ; Not the same as Qt, check file properties of the webkit dll if unsure
     55!ifndef QT_WEBKIT_VERSION
     56  !define QT_WEBKIT_VERSION "5.6.1.0"
     57!endif
     58
     59  !define STATUS_DLL_NOT_FOUND "-1073741515"
     60
    4561;--------------------------------
    4662;General
     
    5066  BrandingText "SMPlayer for Windows v${SMPLAYER_VERSION}"
    5167!ifdef WIN64
    52   !ifdef QT5
    53   OutFile "output\Qt5\smplayer-${SMPLAYER_VERSION}-x64-qt5.exe"
    54   !else
    5568  OutFile "output\smplayer-${SMPLAYER_VERSION}-x64.exe"
    56   !endif
    5769!else
    58   !ifdef QT5
    59   OutFile "output\Qt5\smplayer-${SMPLAYER_VERSION}-win32-qt5.exe"
    60   !else
    6170  OutFile "output\smplayer-${SMPLAYER_VERSION}-win32.exe"
    62   !endif
    6371!endif
    6472
     
    116124  Var SMPlayer_UnStrPath
    117125  Var SMPlayer_StartMenuFolder
     126
     127  Var Qt_Core_Source_Version
     128  Var Qt_Core_Installed_Version
     129  Var Qt_WebKit_Installed_Version
     130
     131  Var YTDL_Exit_Code
    118132
    119133;--------------------------------
     
    305319
    306320  !insertmacro MUI_RESERVEFILE_LANGDLL
    307   ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
     321!if ! ${NSIS_PACKEDVERSION} > 0x2999999
     322  ReserveFile /nonfatal "${NSISDIR}\Plugins\UserInfo.dll"
     323!else
     324  ReserveFile /nonfatal "${NSISDIR}\Plugins\x86-unicode\UserInfo.dll"
     325!endif
    308326
    309327;--------------------------------
     
    350368  ;Qt imageformats
    351369  SetOutPath "$INSTDIR\imageformats"
    352   File /r "${SMPLAYER_BUILD_DIR}\imageformats\*.*"
     370  File /nonfatal /r "${SMPLAYER_BUILD_DIR}\imageformats\*.*"
    353371
    354372  ;Open fonts
     
    357375
    358376  ;Qt platforms (Qt 5+)
    359 !ifdef QT5
    360377  SetOutPath "$INSTDIR\platforms"
    361   File /r "${SMPLAYER_BUILD_DIR}\platforms\*.*"
    362 !endif
     378  File /nonfatal /r "${SMPLAYER_BUILD_DIR}\platforms\*.*"
    363379
    364380  ;SMPlayer key shortcuts
     
    427443    CopyFiles /SILENT "$PLUGINSDIR\youtube-dl.exe" "$INSTDIR\mpv"
    428444
    429     DetailPrint $(YTDL_Update_Check)
     445    ;DetailPrint $(YTDL_Update_Check)
    430446    NsExec::ExecToLog '"$INSTDIR\mpv\youtube-dl.exe" -U'
    431447
    432     Goto skip_ytdl
     448    Goto check_ytdl
    433449
    434450  YTDL:
    435   NSISdl::download /TIMEOUT=30000 \
    436   "http://yt-dl.org/latest/youtube-dl.exe" \
    437   "$INSTDIR\mpv\youtube-dl.exe" /END
     451  INetC::get /CONNECTTIMEOUT 30000 /POPUP "" "http://yt-dl.org/latest/youtube-dl.exe" "$INSTDIR\mpv\youtube-dl.exe" /END
    438452  Pop $R0
    439   StrCmp $R0 "success" +3 0
     453  StrCmp $R0 "OK" +3 0
    440454    DetailPrint $(YTDL_DL_Failed)
    441     MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(YTDL_DL_Retry) /SD IDCANCEL IDRETRY YTDL
     455    MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(YTDL_DL_Retry) /SD IDCANCEL IDRETRY YTDL IDCANCEL skip_ytdl
     456
     457  check_ytdl:
     458    NsExec::Exec '"$INSTDIR\mpv\youtube-dl.exe" --version'
     459    Pop $YTDL_Exit_Code
     460
     461    ${If} $YTDL_Exit_Code != "0"
     462      DetailPrint $(YTDL_Error_Msg1)
     463        ${If} $YTDL_Exit_Code == "${STATUS_DLL_NOT_FOUND}"
     464          DetailPrint $(YTDL_Error_Msg2)
     465        ${EndIf}
     466
     467      Sleep 5000
     468    ${EndIf}
    442469
    443470  skip_ytdl:
     
    474501    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\docs\smtube\*" "$INSTDIR\docs\smtube"
    475502    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\translations\*" "$INSTDIR\translations"
    476 !ifdef QT5
     503    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\icuin*.dll" "$INSTDIR"
     504    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\icuuc*.dll" "$INSTDIR"
     505    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\icudt*.dll" "$INSTDIR"
    477506    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5WebKit.dll" "$INSTDIR"
    478507    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5Sql.dll" "$INSTDIR"
     
    487516    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5PrintSupport.dll" "$INSTDIR"
    488517    CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5MultimediaWidgets.dll" "$INSTDIR"
    489 !else
    490     CopyFiles /SILENT "$PLUGINSDIR\smtubebak\QtWebKit4.dll" "$INSTDIR"
    491 !endif
    492518  ${EndIf}
    493519
     
    554580  Sleep 2500
    555581
    556   ;SetAutoClose false
     582!ifdef VER_REVISION
     583  SetAutoClose false
     584!endif
    557585
    558586SectionEnd
     
    692720  Delete "$INSTDIR\smtube.exe"
    693721  Delete "$INSTDIR\dxlist.exe"
    694   Delete "$INSTDIR\icudt5*.dll"
    695   Delete "$INSTDIR\icuin5*.dll"
    696   Delete "$INSTDIR\icuuc5*.dll"
     722  Delete "$INSTDIR\icudt*.dll"
     723  Delete "$INSTDIR\icuin*.dll"
     724  Delete "$INSTDIR\icuuc*.dll"
    697725  Delete "$INSTDIR\libgcc_s_*.dll"
    698726  Delete "$INSTDIR\libstdc++-6.dll"
     
    747775!ifdef WIN64
    748776  ${Unless} ${AtLeastWinVista}
     777    MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported_VistaRequired) /SD IDNO IDYES installonoldwindows
    749778!else
    750779  ${Unless} ${AtLeastWinXP}
    751 !endif
    752780    MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported) /SD IDNO IDYES installonoldwindows
     781!endif
    753782    Abort
    754783  installonoldwindows:
     
    867896      StrCpy $Reinstall_OverwriteButton_State 1
    868897    ${EndIf}
     898
     899    Call RetrieveQtVersions
    869900  ${EndIf}
    870901
     
    923954
    924955  IfFileExists "$SMPlayer_Path\smtube.exe" 0 NoBackup
    925 !ifdef QT5
    926     IfFileExists "$SMPlayer_Path\Qt5WebKit.dll" 0 NoBackup
    927 !else
    928     IfFileExists "$SMPlayer_Path\QtWebKit4.dll" 0 NoBackup
    929 !endif
    930       DetailPrint $(Info_SMTube_Backup)
    931       CreateDirectory "$PLUGINSDIR\smtubebak\translations"
    932       CreateDirectory "$PLUGINSDIR\smtubebak\docs\smtube"
    933       CopyFiles /SILENT "$SMPlayer_Path\smtube.exe" "$PLUGINSDIR\smtubebak"
    934       CopyFiles /SILENT "$SMPlayer_Path\docs\smtube\*" "$PLUGINSDIR\smtubebak\docs\smtube"
    935       CopyFiles /SILENT "$SMPlayer_Path\translations\smtube*.qm" "$PLUGINSDIR\smtubebak\translations"
    936 !ifdef QT5
    937       CopyFiles /SILENT "$SMPlayer_Path\Qt5WebKit.dll" "$PLUGINSDIR\smtubebak"
    938       CopyFiles /SILENT "$SMPlayer_Path\Qt5Sql.dll" "$PLUGINSDIR\smtubebak"
    939       CopyFiles /SILENT "$SMPlayer_Path\Qt5Qml.dll" "$PLUGINSDIR\smtubebak"
    940       CopyFiles /SILENT "$SMPlayer_Path\Qt5Quick.dll" "$PLUGINSDIR\smtubebak"
    941       CopyFiles /SILENT "$SMPlayer_Path\Qt5Positioning.dll" "$PLUGINSDIR\smtubebak"
    942       CopyFiles /SILENT "$SMPlayer_Path\Qt5Multimedia.dll" "$PLUGINSDIR\smtubebak"
    943       CopyFiles /SILENT "$SMPlayer_Path\Qt5Sensors.dll" "$PLUGINSDIR\smtubebak"
    944       CopyFiles /SILENT "$SMPlayer_Path\Qt5WebChannel.dll" "$PLUGINSDIR\smtubebak"
    945       CopyFiles /SILENT "$SMPlayer_Path\Qt5WebKitWidgets.dll" "$PLUGINSDIR\smtubebak"
    946       CopyFiles /SILENT "$SMPlayer_Path\Qt5OpenGL.dll" "$PLUGINSDIR\smtubebak"
    947       CopyFiles /SILENT "$SMPlayer_Path\Qt5PrintSupport.dll" "$PLUGINSDIR\smtubebak"
    948       CopyFiles /SILENT "$SMPlayer_Path\Qt5MultimediaWidgets.dll" "$PLUGINSDIR\smtubebak"
    949 !else
    950       CopyFiles /SILENT "$SMPlayer_Path\QtWebKit4.dll" "$PLUGINSDIR\smtubebak"
    951 !endif
    952 
     956    StrCmp "${QT_WEBKIT_VERSION}" "$Qt_WebKit_Installed_Version" 0 QtVerMismatch
     957    DetailPrint $(Info_SMTube_Backup)
     958    CreateDirectory "$PLUGINSDIR\smtubebak\translations"
     959    CreateDirectory "$PLUGINSDIR\smtubebak\docs\smtube"
     960    CopyFiles /SILENT "$SMPlayer_Path\smtube.exe" "$PLUGINSDIR\smtubebak"
     961    CopyFiles /SILENT "$SMPlayer_Path\docs\smtube\*" "$PLUGINSDIR\smtubebak\docs\smtube"
     962    CopyFiles /SILENT "$SMPlayer_Path\translations\smtube*.qm" "$PLUGINSDIR\smtubebak\translations"
     963    CopyFiles /SILENT "$SMPlayer_Path\icuin*.dll" "$PLUGINSDIR\smtubebak"
     964    CopyFiles /SILENT "$SMPlayer_Path\icuuc*.dll" "$PLUGINSDIR\smtubebak"
     965    CopyFiles /SILENT "$SMPlayer_Path\icudt*.dll" "$PLUGINSDIR\smtubebak"
     966    CopyFiles /SILENT "$SMPlayer_Path\Qt5WebKit.dll" "$PLUGINSDIR\smtubebak"
     967    CopyFiles /SILENT "$SMPlayer_Path\Qt5Sql.dll" "$PLUGINSDIR\smtubebak"
     968    CopyFiles /SILENT "$SMPlayer_Path\Qt5Qml.dll" "$PLUGINSDIR\smtubebak"
     969    CopyFiles /SILENT "$SMPlayer_Path\Qt5Quick.dll" "$PLUGINSDIR\smtubebak"
     970    CopyFiles /SILENT "$SMPlayer_Path\Qt5Positioning.dll" "$PLUGINSDIR\smtubebak"
     971    CopyFiles /SILENT "$SMPlayer_Path\Qt5Multimedia.dll" "$PLUGINSDIR\smtubebak"
     972    CopyFiles /SILENT "$SMPlayer_Path\Qt5Sensors.dll" "$PLUGINSDIR\smtubebak"
     973    CopyFiles /SILENT "$SMPlayer_Path\Qt5WebChannel.dll" "$PLUGINSDIR\smtubebak"
     974    CopyFiles /SILENT "$SMPlayer_Path\Qt5WebKitWidgets.dll" "$PLUGINSDIR\smtubebak"
     975    CopyFiles /SILENT "$SMPlayer_Path\Qt5OpenGL.dll" "$PLUGINSDIR\smtubebak"
     976    CopyFiles /SILENT "$SMPlayer_Path\Qt5PrintSupport.dll" "$PLUGINSDIR\smtubebak"
     977    CopyFiles /SILENT "$SMPlayer_Path\Qt5MultimediaWidgets.dll" "$PLUGINSDIR\smtubebak"
    953978    StrCpy $Restore_SMTube 1
    954979    Return
     980  QtVerMismatch:
     981    DetailPrint $(SMTube_Incompatible_Msg1)
     982    DetailPrint $(SMTube_Incompatible_Msg2)
     983    Sleep 5000
    955984  NoBackup:
    956985    StrCpy $Restore_SMTube 0
     
    11121141FunctionEnd
    11131142
     1143Function RetrieveQtVersions
     1144
     1145  ; Get version of Qt5Core.dll from the build sources (smplayer-build/smplayer-build64)
     1146  ClearErrors
     1147  GetDLLVersionLocal ${SMPLAYER_BUILD_DIR}\Qt5Core.dll $R0 $R1
     1148  IntOp $R2 $R0 / 0x00010000
     1149  IntOp $R3 $R0 & 0x0000FFFF
     1150  IntOp $R4 $R1 / 0x00010000
     1151  IntOp $R5 $R1 & 0x0000FFFF
     1152  StrCpy $Qt_Core_Source_Version "$R2.$R3.$R4.$R5"
     1153  ;MessageBox MB_OK "Qt Core source version:  $Qt_Core_Source_Version"
     1154
     1155  ; Get version of Qt Core.dll that is already installed
     1156  ClearErrors
     1157  GetDLLVersion "$INSTDIR\Qt5Core.dll" $R0 $R1
     1158  IfErrors 0 +2
     1159    GetDLLVersion "$INSTDIR\QtCore4.dll" $R0 $R1
     1160
     1161  IntOp $R2 $R0 / 0x00010000
     1162  IntOp $R3 $R0 & 0x0000FFFF
     1163  IntOp $R4 $R1 / 0x00010000
     1164  IntOp $R5 $R1 & 0x0000FFFF
     1165  StrCpy $Qt_Core_Installed_Version "$R2.$R3.$R4.$R5"
     1166  ;MessageBox MB_OK "Qt Core installed version:  $Qt_Core_Installed_Version"
     1167
     1168  ; Get version of Qt WebKit.dll that is already installed
     1169  ClearErrors
     1170  GetDLLVersion "$INSTDIR\Qt5WebKit.dll" $R0 $R1
     1171  IfErrors 0 +2
     1172    GetDLLVersion "$INSTDIR\QtWebKit4.dll" $R0 $R1
     1173
     1174  IntOp $R2 $R0 / 0x00010000
     1175  IntOp $R3 $R0 & 0x0000FFFF
     1176  IntOp $R4 $R1 / 0x00010000
     1177  IntOp $R5 $R1 & 0x0000FFFF
     1178  StrCpy $Qt_WebKit_Installed_Version "$R2.$R3.$R4.$R5"
     1179  ;MessageBox MB_OK "Qt WebKit installed version:  $Qt_WebKit_Installed_Version"
     1180
     1181FunctionEnd
     1182
    11141183Function RegisterDefaultPrograms
    11151184
Note: See TracChangeset for help on using the changeset viewer.