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 ([email protected])
    3 ;Tested/Developed with Unicode NSIS 2.46.5
     3;Tested/Developed with Unicode NSIS 2.46.5
    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
     8
     9
     10
     11
     12
     13
     14
     15
    716!endif
    817
     
    4352  !define SMPLAYER_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\SMPlayer"
    4453
     54
     55
     56
     57
     58
     59
     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
     128
     129
     130
     131
    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 /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 _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 "" +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
    749778!else
    750779  ${Unless} ${AtLeastWinXP}
    751 !endif
    752780    MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported) /SD IDNO IDYES installonoldwindows
     781
    753782    Abort
    754783  installonoldwindows:
     
    867896      StrCpy $Reinstall_OverwriteButton_State 1
    868897    ${EndIf}
     898
     899
    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
     981
     982
     983
    955984  NoBackup:
    956985    StrCpy $Restore_SMTube 0
     
    11121141FunctionEnd
    11131142
     1143
     1144
     1145
     1146
     1147
     1148
     1149
     1150
     1151
     1152
     1153
     1154
     1155
     1156
     1157
     1158
     1159
     1160
     1161
     1162
     1163
     1164
     1165
     1166
     1167
     1168
     1169
     1170
     1171
     1172
     1173
     1174
     1175
     1176
     1177
     1178
     1179
     1180
     1181
     1182
    11141183Function RegisterDefaultPrograms
    11151184
Note: See TracChangeset for help on using the changeset viewer.