Changeset 179 for smplayer/vendor/current/setup/smplayer.nsi
- Timestamp:
- Aug 31, 2016, 5:19:25 PM (9 years ago)
- File:
-
- 1 edited
-
smplayer/vendor/current/setup/smplayer.nsi (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/setup/smplayer.nsi
r175 r179 1 ;Installer script for win32/win64 SMPlayer1 ;Installer script for win32/win64 SMPlayer 2 2 ;Written by redxii ([email protected]) 3 ;Tested/Developed with Unicode NSIS 2.46.5 3 ;Tested/Developed with Unicode NSIS 2.46.5 4 4 5 5 !ifndef VER_MAJOR | VER_MINOR | VER_BUILD 6 6 !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 7 16 !endif 8 17 … … 43 52 !define SMPLAYER_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\SMPlayer" 44 53 54 55 56 57 58 59 60 45 61 ;-------------------------------- 46 62 ;General … … 50 66 BrandingText "SMPlayer for Windows v${SMPLAYER_VERSION}" 51 67 !ifdef WIN64 52 !ifdef QT553 OutFile "output\Qt5\smplayer-${SMPLAYER_VERSION}-x64-qt5.exe"54 !else55 68 OutFile "output\smplayer-${SMPLAYER_VERSION}-x64.exe" 56 !endif57 69 !else 58 !ifdef QT559 OutFile "output\Qt5\smplayer-${SMPLAYER_VERSION}-win32-qt5.exe"60 !else61 70 OutFile "output\smplayer-${SMPLAYER_VERSION}-win32.exe" 62 !endif63 71 !endif 64 72 … … 116 124 Var SMPlayer_UnStrPath 117 125 Var SMPlayer_StartMenuFolder 126 127 128 129 130 131 118 132 119 133 ;-------------------------------- … … 305 319 306 320 !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 308 326 309 327 ;-------------------------------- … … 350 368 ;Qt imageformats 351 369 SetOutPath "$INSTDIR\imageformats" 352 File / r "${SMPLAYER_BUILD_DIR}\imageformats\*.*"370 File /r "${SMPLAYER_BUILD_DIR}\imageformats\*.*" 353 371 354 372 ;Open fonts … … 357 375 358 376 ;Qt platforms (Qt 5+) 359 !ifdef QT5360 377 SetOutPath "$INSTDIR\platforms" 361 File /r "${SMPLAYER_BUILD_DIR}\platforms\*.*" 362 !endif 378 File /nonfatal /r "${SMPLAYER_BUILD_DIR}\platforms\*.*" 363 379 364 380 ;SMPlayer key shortcuts … … 427 443 CopyFiles /SILENT "$PLUGINSDIR\youtube-dl.exe" "$INSTDIR\mpv" 428 444 429 DetailPrint $(YTDL_Update_Check)445 DetailPrint $(YTDL_Update_Check) 430 446 NsExec::ExecToLog '"$INSTDIR\mpv\youtube-dl.exe" -U' 431 447 432 Goto skip_ytdl448 Goto _ytdl 433 449 434 450 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 438 452 Pop $R0 439 StrCmp $R0 " success" +3 0453 StrCmp $R0 "" +3 0 440 454 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} 442 469 443 470 skip_ytdl: … … 474 501 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\docs\smtube\*" "$INSTDIR\docs\smtube" 475 502 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" 477 506 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5WebKit.dll" "$INSTDIR" 478 507 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5Sql.dll" "$INSTDIR" … … 487 516 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5PrintSupport.dll" "$INSTDIR" 488 517 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5MultimediaWidgets.dll" "$INSTDIR" 489 !else490 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\QtWebKit4.dll" "$INSTDIR"491 !endif492 518 ${EndIf} 493 519 … … 554 580 Sleep 2500 555 581 556 ;SetAutoClose false 582 !ifdef VER_REVISION 583 SetAutoClose false 584 !endif 557 585 558 586 SectionEnd … … 692 720 Delete "$INSTDIR\smtube.exe" 693 721 Delete "$INSTDIR\dxlist.exe" 694 Delete "$INSTDIR\icudt 5*.dll"695 Delete "$INSTDIR\icuin 5*.dll"696 Delete "$INSTDIR\icuuc 5*.dll"722 Delete "$INSTDIR\icudt*.dll" 723 Delete "$INSTDIR\icuin*.dll" 724 Delete "$INSTDIR\icuuc*.dll" 697 725 Delete "$INSTDIR\libgcc_s_*.dll" 698 726 Delete "$INSTDIR\libstdc++-6.dll" … … 747 775 !ifdef WIN64 748 776 ${Unless} ${AtLeastWinVista} 777 749 778 !else 750 779 ${Unless} ${AtLeastWinXP} 751 !endif752 780 MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported) /SD IDNO IDYES installonoldwindows 781 753 782 Abort 754 783 installonoldwindows: … … 867 896 StrCpy $Reinstall_OverwriteButton_State 1 868 897 ${EndIf} 898 899 869 900 ${EndIf} 870 901 … … 923 954 924 955 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" 953 978 StrCpy $Restore_SMTube 1 954 979 Return 980 981 982 983 955 984 NoBackup: 956 985 StrCpy $Restore_SMTube 0 … … 1112 1141 FunctionEnd 1113 1142 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 1114 1183 Function RegisterDefaultPrograms 1115 1184
Note:
See TracChangeset
for help on using the changeset viewer.
