Changeset 176 for smplayer/trunk/setup/smplayer.nsi
- Timestamp:
- May 3, 2016, 5:25:45 PM (9 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 175
- Property svn:mergeinfo changed
-
smplayer/trunk/setup/smplayer.nsi
r170 r176 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 !endif8 9 !ifdef WIN6410 !define DISABLE_CODECS11 7 !endif 12 8 … … 47 43 !define SMPLAYER_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\SMPlayer" 48 44 49 !define CODEC_VERSION "windows-essential-20071007"50 51 45 ;-------------------------------- 52 46 ;General … … 56 50 BrandingText "SMPlayer for Windows v${SMPLAYER_VERSION}" 57 51 !ifdef WIN64 52 !ifdef QT5 53 OutFile "output\Qt5\smplayer-${SMPLAYER_VERSION}-x64-qt5.exe" 54 !else 58 55 OutFile "output\smplayer-${SMPLAYER_VERSION}-x64.exe" 56 !endif 59 57 !else 58 !ifdef QT5 59 OutFile "output\Qt5\smplayer-${SMPLAYER_VERSION}-win32-qt5.exe" 60 !else 60 61 OutFile "output\smplayer-${SMPLAYER_VERSION}-win32.exe" 62 !endif 61 63 !endif 62 64 … … 106 108 Var Reinstall_UninstallButton 107 109 Var Reinstall_UninstallButton_State 108 !ifndef DISABLE_CODECS110 !ifndef WIN64 109 111 Var Restore_Codecs 110 112 !endif 113 Var Restore_YTDL 114 Var Restore_SMTube 111 115 Var SMPlayer_Path 112 116 Var SMPlayer_UnStrPath … … 136 140 137 141 ;Finish page 138 !define MUI_FINISHPAGE_LINK "http:// smplayer.sourceforge.net"139 !define MUI_FINISHPAGE_LINK_LOCATION "http:// smplayer.sourceforge.net"142 !define MUI_FINISHPAGE_LINK "http://www.smplayer.info" 143 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.smplayer.info" 140 144 !define MUI_FINISHPAGE_NOREBOOTSUPPORT 141 145 !define MUI_FINISHPAGE_RUN $INSTDIR\smplayer.exe … … 211 215 !insertmacro MUI_LANGUAGE "English" 212 216 !insertmacro MUI_LANGUAGE "Albanian" 217 ;!insertmacro MUI_LANGUAGE "Amharic" 213 218 !insertmacro MUI_LANGUAGE "Arabic" 214 219 !insertmacro MUI_LANGUAGE "Basque" … … 219 224 !insertmacro MUI_LANGUAGE "Danish" 220 225 !insertmacro MUI_LANGUAGE "Dutch" 226 !insertmacro MUI_LANGUAGE "Farsi" 221 227 !insertmacro MUI_LANGUAGE "Finnish" 222 228 !insertmacro MUI_LANGUAGE "French" 223 229 !insertmacro MUI_LANGUAGE "German" 230 !insertmacro MUI_LANGUAGE "Greek" 224 231 !insertmacro MUI_LANGUAGE "Hebrew" 225 232 !insertmacro MUI_LANGUAGE "Hungarian" … … 232 239 !insertmacro MUI_LANGUAGE "Portuguese" 233 240 !insertmacro MUI_LANGUAGE "PortugueseBR" 241 !insertmacro MUI_LANGUAGE "Romanian" 234 242 !insertmacro MUI_LANGUAGE "Russian" 235 243 !insertmacro MUI_LANGUAGE "Serbian" … … 241 249 !insertmacro MUI_LANGUAGE "TradChinese" 242 250 !insertmacro MUI_LANGUAGE "Ukrainian" 251 !insertmacro MUI_LANGUAGE "Galician" 252 !insertmacro MUI_LANGUAGE "Indonesian" 253 !insertmacro MUI_LANGUAGE "Turkish" 254 !insertmacro MUI_LANGUAGE "Vietnamese" 243 255 244 256 ;Custom translations for setup … … 246 258 !insertmacro LANGFILE_INCLUDE "translations\english.nsh" 247 259 !insertmacro LANGFILE_INCLUDE "translations\albanian.nsh" 260 ;!insertmacro LANGFILE_INCLUDE "translations\amharic.nsh" 248 261 !insertmacro LANGFILE_INCLUDE "translations\arabic.nsh" 249 262 !insertmacro LANGFILE_INCLUDE "translations\basque.nsh" … … 254 267 !insertmacro LANGFILE_INCLUDE "translations\danish.nsh" 255 268 !insertmacro LANGFILE_INCLUDE "translations\dutch.nsh" 269 !insertmacro LANGFILE_INCLUDE "translations\farsi.nsh" 256 270 !insertmacro LANGFILE_INCLUDE "translations\finnish.nsh" 257 271 !insertmacro LANGFILE_INCLUDE "translations\french.nsh" 258 272 !insertmacro LANGFILE_INCLUDE "translations\german.nsh" 273 !insertmacro LANGFILE_INCLUDE "translations\greek.nsh" 259 274 !insertmacro LANGFILE_INCLUDE "translations\hebrew.nsh" 260 275 !insertmacro LANGFILE_INCLUDE "translations\hungarian.nsh" … … 267 282 !insertmacro LANGFILE_INCLUDE "translations\portuguese.nsh" 268 283 !insertmacro LANGFILE_INCLUDE "translations\portuguesebrazil.nsh" 284 !insertmacro LANGFILE_INCLUDE "translations\romanian.nsh" 269 285 !insertmacro LANGFILE_INCLUDE "translations\russian.nsh" 270 286 !insertmacro LANGFILE_INCLUDE "translations\serbian.nsh" … … 276 292 !insertmacro LANGFILE_INCLUDE "translations\tradchinese.nsh" 277 293 !insertmacro LANGFILE_INCLUDE "translations\ukrainian.nsh" 294 !insertmacro LANGFILE_INCLUDE "translations\galician.nsh" 295 !insertmacro LANGFILE_INCLUDE "translations\indonesian.nsh" 296 !insertmacro LANGFILE_INCLUDE "translations\turkish.nsh" 297 !insertmacro LANGFILE_INCLUDE "translations\vietnamese.nsh" 278 298 279 299 ;-------------------------------- … … 303 323 ${ElseIf} $Reinstall_OverwriteButton_State == 1 304 324 305 !ifndef DISABLE_CODECS325 !ifndef WIN64 306 326 Call Backup_Codecs 307 327 !endif 328 Call Backup_YTDL 329 Call Backup_SMTube 308 330 309 331 ${If} "$INSTDIR" == "$SMPlayer_Path" … … 330 352 File /r "${SMPLAYER_BUILD_DIR}\imageformats\*.*" 331 353 354 ;Open fonts 355 ; SetOutPath "$INSTDIR\open-fonts" 356 ; File /r "${SMPLAYER_BUILD_DIR}\open-fonts\*.*" 357 332 358 ;Qt platforms (Qt 5+) 359 !ifdef QT5 333 360 SetOutPath "$INSTDIR\platforms" 334 File /nonfatal /r "${SMPLAYER_BUILD_DIR}\platforms\*.*" 361 File /r "${SMPLAYER_BUILD_DIR}\platforms\*.*" 362 !endif 335 363 336 364 ;SMPlayer key shortcuts 337 365 SetOutPath "$INSTDIR\shortcuts" 338 366 File /r "${SMPLAYER_BUILD_DIR}\shortcuts\*.*" 339 340 !ifndef DISABLE_CODECS341 SetOutPath "$PLUGINSDIR"342 File 7za.exe343 !endif344 345 ;Initialize to 0 if don't exist (based on error flag)346 ReadRegDWORD $R0 HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer347 ${If} ${Errors}348 WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer 0x0349 ${EndIf}350 351 ReadRegDWORD $R0 HKLM "${SMPLAYER_REG_KEY}" Installed_Codecs352 ${If} ${Errors}353 WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_Codecs 0x0354 ${EndIf}355 367 356 368 SectionEnd … … 373 385 CreateDirectory "$SMPROGRAMS\$SMPlayer_StartMenuFolder" 374 386 CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer.lnk" "$INSTDIR\smplayer.exe" 375 CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMTube.lnk" "$INSTDIR\smtube.exe" 376 WriteINIStr "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer on the Web.url" "InternetShortcut" "URL" "http://smplayer.sourceforge.net" 387 ${If} $Restore_SMTube == 1 388 CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMTube.lnk" "$INSTDIR\smtube.exe" 389 ${EndIf} 390 WriteINIStr "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer on the Web.url" "InternetShortcut" "URL" "http://www.smplayer.info" 377 391 CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\Uninstall SMPlayer.lnk" "$INSTDIR\${SMPLAYER_UNINST_EXE}" 378 392 !insertmacro MUI_STARTMENU_WRITE_END … … 383 397 384 398 ;-------------------------------- 385 ;MPlayer & MPlayer Codecs 386 SectionGroup $(MPlayerGroupTitle) 387 388 Section $(Section_MPlayer) SecMPlayer 389 390 SectionIn RO 399 ;MPlayer & MPV 400 SectionGroup $(MPlayerMPVGroupTitle) 401 402 ${MementoSection} "MPlayer" SecMPlayer 391 403 392 404 SetOutPath "$INSTDIR\mplayer" 393 File /r /x mplayer.exe /x mencoder.exe /x mplayer64.exe /x mencoder64.exe /x *.exe.debug /x buildinfo /x buildinfo64 "${SMPLAYER_BUILD_DIR}\mplayer\*.*"405 File /r /x mplayer.exe /x mencoder.exe /x mplayer64.exe /x mencoder64.exe /x *.exe.debug /x gdb.exe /x gdb64.exe /x vfw2menc.exe /x buildinfo /x buildinfo64 /x buildinfo-mencoder-32 /x buildinfo-mencoder-debug-32 /x buildinfo-mplayer-32 /x buildinfo-mplayer-debug-32 /x buildinfo-mencoder-64 /x buildinfo-mencoder-debug-64 /x buildinfo-mplayer-64 /x buildinfo-mplayer-debug-64 "${SMPLAYER_BUILD_DIR}\mplayer\*.*" 394 406 !ifdef WIN64 395 407 File /oname=mplayer.exe "${SMPLAYER_BUILD_DIR}\mplayer\mplayer64.exe" 408 RMDir "$INSTDIR\mplayer\codecs" 396 409 !else 397 410 File "${SMPLAYER_BUILD_DIR}\mplayer\mplayer.exe" 398 411 !endif 399 412 400 WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer 0x1 401 402 SectionEnd 403 404 !ifndef DISABLE_CODECS 405 Section /o $(Section_MPlayerCodecs) SecCodecs 406 407 AddSize 22931 408 409 ${If} $Restore_Codecs == 1 410 DetailPrint $(Info_Codecs_Restore) 411 CopyFiles /SILENT "$PLUGINSDIR\codecbak\*" "$INSTDIR\mplayer\codecs" 412 Goto check_codecs 413 ${ElseIf} ${FileExists} "$EXEDIR\${CODEC_VERSION}.zip" 414 CopyFiles /SILENT "$EXEDIR\${CODEC_VERSION}.zip" "$PLUGINSDIR" 415 Goto extract_codecs 416 ${EndIf} 417 418 retry_codecs_dl: 419 420 DetailPrint $(Codecs_DL_Msg) 421 !ifdef USE_INETC 422 inetc::get /CONNECTTIMEOUT 15000 /RESUME "" /BANNER $(Codecs_DL_Msg) /CAPTION $(Codecs_DL_Msg) \ 423 "http://www.mplayerhq.hu/MPlayer/releases/codecs/${CODEC_VERSION}.zip" \ 424 "$PLUGINSDIR\${CODEC_VERSION}.zip" /END 425 Pop $R0 426 StrCmp $R0 OK +4 0 413 ${MementoSectionEnd} 414 415 ${MementoSection} "MPV" SecMPV 416 417 SetOutPath "$INSTDIR\mpv" 418 !ifdef WIN64 419 File /r /x mpv.exe /x mpv.com /x mpv64.exe /x mpv64.com /x fonts /x mpv "${SMPLAYER_BUILD_DIR}\mpv\*.*" 420 File /oname=mpv.exe "${SMPLAYER_BUILD_DIR}\mpv\mpv64.exe" 421 File /oname=mpv.com "${SMPLAYER_BUILD_DIR}\mpv\mpv64.com" 427 422 !else 428 NSISdl::download /TIMEOUT=15000 \ 429 "http://www.mplayerhq.hu/MPlayer/releases/codecs/${CODEC_VERSION}.zip" \ 430 "$PLUGINSDIR\${CODEC_VERSION}.zip" /END 431 Pop $R0 432 StrCmp $R0 "success" +4 0 433 !endif 434 DetailPrint $(Codecs_DL_Failed) 435 MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(Codecs_DL_Retry) /SD IDCANCEL IDRETRY retry_codecs_dl 436 Goto check_codecs 437 438 extract_codecs: 439 440 DetailPrint $(Info_Files_Extract) 441 nsExec::Exec '"$PLUGINSDIR\7za.exe" x "$PLUGINSDIR\${CODEC_VERSION}.zip" -y -o"$PLUGINSDIR"' 442 443 CreateDirectory "$INSTDIR\mplayer\codecs" 444 CopyFiles /SILENT "$PLUGINSDIR\${CODEC_VERSION}\*" "$INSTDIR\mplayer\codecs" 445 446 check_codecs: 447 448 IfFileExists "$INSTDIR\mplayer\codecs\*.dll" 0 codecsInstFailed 449 WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_Codecs 0x1 450 Goto done 451 codecsInstFailed: 452 DetailPrint $(Codecs_Inst_Failed) 453 WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_Codecs 0x0 454 Sleep 5000 455 456 done: 457 458 SectionEnd 459 !endif 423 File /r /x mpv64.exe /x mpv64.com "${SMPLAYER_BUILD_DIR}\mpv\*.*" 424 !endif 425 426 IfFileExists "$PLUGINSDIR\youtube-dl.exe" 0 YTDL 427 CopyFiles /SILENT "$PLUGINSDIR\youtube-dl.exe" "$INSTDIR\mpv" 428 429 DetailPrint $(YTDL_Update_Check) 430 NsExec::ExecToLog '"$INSTDIR\mpv\youtube-dl.exe" -U' 431 432 Goto skip_ytdl 433 434 YTDL: 435 NSISdl::download /TIMEOUT=30000 \ 436 "http://yt-dl.org/latest/youtube-dl.exe" \ 437 "$INSTDIR\mpv\youtube-dl.exe" /END 438 Pop $R0 439 StrCmp $R0 "success" +3 0 440 DetailPrint $(YTDL_DL_Failed) 441 MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(YTDL_DL_Retry) /SD IDCANCEL IDRETRY YTDL 442 443 skip_ytdl: 444 445 ${MementoSectionEnd} 460 446 461 447 SectionGroupEnd … … 479 465 ${MementoSectionEnd} 480 466 481 Section /o $(Reinstall_Msg5) SecResetSettings 482 483 NsExec::Exec '"$INSTDIR\smplayer.exe" -delete-config' 467 Section -RestorePrograms 468 469 ${If} $Restore_SMTube == 1 470 DetailPrint $(Info_SMTube_Restore) 471 CreateDirectory "$INSTDIR\docs\smtube" 472 CreateDirectory "$INSTDIR\translations" 473 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\smtube.exe" "$INSTDIR" 474 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\docs\smtube\*" "$INSTDIR\docs\smtube" 475 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\translations\*" "$INSTDIR\translations" 476 !ifdef QT5 477 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5WebKit.dll" "$INSTDIR" 478 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5Sql.dll" "$INSTDIR" 479 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5Qml.dll" "$INSTDIR" 480 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5Quick.dll" "$INSTDIR" 481 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5Positioning.dll" "$INSTDIR" 482 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5Multimedia.dll" "$INSTDIR" 483 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5Sensors.dll" "$INSTDIR" 484 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5WebChannel.dll" "$INSTDIR" 485 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5WebKitWidgets.dll" "$INSTDIR" 486 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5OpenGL.dll" "$INSTDIR" 487 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5PrintSupport.dll" "$INSTDIR" 488 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\Qt5MultimediaWidgets.dll" "$INSTDIR" 489 !else 490 CopyFiles /SILENT "$PLUGINSDIR\smtubebak\QtWebKit4.dll" "$INSTDIR" 491 !endif 492 ${EndIf} 493 494 !ifndef WIN64 495 ${If} $Restore_Codecs == 1 496 DetailPrint $(Info_Codecs_Restore) 497 CopyFiles /SILENT "$PLUGINSDIR\codecbak\*" "$INSTDIR\mplayer\codecs" 498 ${EndIf} 499 !endif 484 500 485 501 SectionEnd … … 513 529 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayIcon" "$INSTDIR\smplayer.exe" 514 530 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayVersion" "${SMPLAYER_VERSION}" 515 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http:// forum.smplayer.info"531 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http://www.smplayer.info/forum" 516 532 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "Publisher" "Ricardo Villalba" 517 533 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "UninstallString" "$INSTDIR\${SMPLAYER_UNINST_EXE}" 518 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLInfoAbout" "http:// smplayer.sourceforge.net"519 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLUpdateInfo" "http:// smplayer.sourceforge.net"534 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLInfoAbout" "http://www.smplayer.info" 535 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLUpdateInfo" "http://www.smplayer.info" 520 536 WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoModify" "1" 521 537 WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoRepair" "1" 522 538 523 ;Clean up empty directories 524 RMDir "$INSTDIR\platforms" 525 !ifdef WIN64 526 RMDir "$INSTDIR\mplayer\codecs" 527 !endif 539 DetailPrint $(Info_Cleaning_Fontconfig) 540 SetDetailsPrint none 541 Delete "$LOCALAPPDATA\fontconfig\cache\CACHEDIR.TAG" 542 Delete "$LOCALAPPDATA\fontconfig\cache\*.cache*" 543 RMDir "$LOCALAPPDATA\fontconfig\cache" 544 RMDir "$LOCALAPPDATA\fontconfig" 545 SetDetailsPrint both 546 547 ${If} $Reinstall_RemoveSettings_State == 1 548 DetailPrint $(Info_Cleaning_SMPlayer) 549 SetDetailsPrint none 550 NsExec::Exec '"$INSTDIR\smplayer.exe" -delete-config' 551 SetDetailsPrint both 552 ${EndIf} 553 554 Sleep 2500 555 556 ;SetAutoClose false 528 557 529 558 SectionEnd … … 538 567 !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenuShortcut} $(Section_StartMenu_Desc) 539 568 !insertmacro MUI_DESCRIPTION_TEXT ${SecMPlayer} $(Section_MPlayer_Desc) 540 !ifndef DISABLE_CODECS 541 !insertmacro MUI_DESCRIPTION_TEXT ${SecCodecs} $(Section_MPlayerCodecs_Desc) 542 !endif 569 !insertmacro MUI_DESCRIPTION_TEXT ${SecMPV} $(Section_MPV_Desc) 543 570 !insertmacro MUI_DESCRIPTION_TEXT ${SecThemes} $(Section_IconThemes_Desc) 544 571 !insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} $(Section_Translations_Desc) 545 !insertmacro MUI_DESCRIPTION_TEXT ${SecResetSettings} $(Section_ResetSettings_Desc)546 572 !insertmacro MUI_FUNCTION_DESCRIPTION_END 547 573 … … 640 666 RMDir /r "$INSTDIR\imageformats" 641 667 RMDir /r "$INSTDIR\mplayer" 668 RMDir /r "$INSTDIR\mpv" 669 ; RMDir /r "$INSTDIR\open-fonts" 642 670 RMDir /r "$INSTDIR\platforms" 643 671 RMDir /r "$INSTDIR\shortcuts" 644 672 RMDir /r "$INSTDIR\themes" 645 673 RMDir /r "$INSTDIR\translations" 646 Delete "$INSTDIR\*.txt" 647 Delete "$INSTDIR\icudt51.dll" 648 Delete "$INSTDIR\icuin51.dll" 649 Delete "$INSTDIR\icuuc51.dll" 674 675 ;Txt 676 Delete "$INSTDIR\Copying.txt" 677 Delete "$INSTDIR\Copying_BSD.txt" 678 Delete "$INSTDIR\Copying_libmaia.txt" 679 Delete "$INSTDIR\Copying_openssl.txt" 680 Delete "$INSTDIR\dvdmenus.txt" 681 Delete "$INSTDIR\Finding_subtitles.txt" 682 Delete "$INSTDIR\Install.txt" 683 Delete "$INSTDIR\Notes_about_mpv.txt" 684 Delete "$INSTDIR\Not_so_obvious_things.txt" 685 Delete "$INSTDIR\Portable_Edition.txt" 686 Delete "$INSTDIR\Readme.txt" 687 Delete "$INSTDIR\Release_notes.txt" 688 Delete "$INSTDIR\Watching_TV.txt" 689 690 ;Binaries 691 Delete "$INSTDIR\smplayer.exe" 692 Delete "$INSTDIR\smtube.exe" 693 Delete "$INSTDIR\dxlist.exe" 694 Delete "$INSTDIR\icudt5*.dll" 695 Delete "$INSTDIR\icuin5*.dll" 696 Delete "$INSTDIR\icuuc5*.dll" 650 697 Delete "$INSTDIR\libgcc_s_*.dll" 651 698 Delete "$INSTDIR\libstdc++-6.dll" … … 657 704 Delete "$INSTDIR\ssleay32.dll" 658 705 Delete "$INSTDIR\sample.avi" 659 Delete "$INSTDIR\smplayer.exe"660 Delete "$INSTDIR\smtube.exe"661 Delete "$INSTDIR\dxlist.exe"662 706 663 707 ;Delete registry keys … … 701 745 Function .onInit 702 746 747 !ifdef WIN64 748 ${Unless} ${AtLeastWinVista} 749 !else 703 750 ${Unless} ${AtLeastWinXP} 751 !endif 704 752 MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported) /SD IDNO IDYES installonoldwindows 705 753 Abort … … 791 839 FunctionEnd 792 840 841 Function .onSelChange 842 843 ${Unless} ${SectionIsSelected} ${SecMPlayer} 844 ${AndUnless} ${SectionIsSelected} ${SecMPV} 845 !insertmacro SelectSection ${SecMPlayer} 846 ${EndUnless} 847 848 FunctionEnd 849 793 850 Function CheckPreviousVersion 794 851 … … 828 885 FunctionEnd 829 886 830 !ifndef DISABLE_CODECS887 !ifndef WIN64 831 888 Function Backup_Codecs 832 889 833 ${IfNot} ${SectionIsSelected} ${Sec Codecs}890 ${IfNot} ${SectionIsSelected} ${SecMPlayer} 834 891 Return 835 892 ${EndIf} … … 847 904 !endif 848 905 906 Function Backup_YTDL 907 908 ${IfNot} ${SectionIsSelected} ${SecMPV} 909 Return 910 ${EndIf} 911 912 IfFileExists "$SMPlayer_Path\mpv\youtube-dl.exe" 0 NoBackup 913 CopyFiles /SILENT "$SMPlayer_Path\mpv\youtube-dl.exe" "$PLUGINSDIR\youtube-dl.exe" 914 915 StrCpy $Restore_YTDL 1 916 Return 917 NoBackup: 918 StrCpy $Restore_YTDL 0 919 920 FunctionEnd 921 922 Function Backup_SMTube 923 924 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 953 StrCpy $Restore_SMTube 1 954 Return 955 NoBackup: 956 StrCpy $Restore_SMTube 0 957 958 FunctionEnd 959 849 960 Function LoadPreviousSettings 850 961 851 ;MPlayer codecs section doesn't use Memento so we need to restore it manually 852 ;32-bit only 853 !ifndef DISABLE_CODECS 854 ReadRegDWORD $R0 HKLM "${SMPLAYER_REG_KEY}" "Installed_Codecs" 855 ${If} $R0 == 1 856 !insertmacro SelectSection ${SecCodecs} 857 ${EndIf} 858 !endif 859 860 ;Gets start menu folder name 962 ;Gets previous start menu folder name 861 963 !insertmacro MUI_STARTMENU_GETFOLDER "SMP_SMenu" $SMPlayer_StartMenuFolder 862 964 … … 913 1015 ${NSD_OnClick} $Reinstall_UninstallButton PageReinstallUpdate 914 1016 ${NSD_OnClick} $Reinstall_ChgSettings PageReinstallUpdate 1017 ${NSD_OnClick} $Reinstall_RemoveSettings RemoveSettingsUpdate 915 1018 916 1019 Call PageReinstallUpdate … … 927 1030 ${NSD_GetState} $Reinstall_RemoveSettings $Reinstall_RemoveSettings_State 928 1031 1032 FunctionEnd 1033 1034 Function RemoveSettingsUpdate 1035 1036 ${NSD_GetState} $Reinstall_RemoveSettings $Reinstall_RemoveSettings_State 1037 929 1038 ${If} $Reinstall_RemoveSettings_State == 1 930 !insertmacro SelectSection ${SecResetSettings} 1039 MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2 $(Remove_Settings_Confirmation) /SD IDNO IDYES reset_done 1040 ${NSD_SetState} $Reinstall_RemoveSettings 0 1041 reset_done: 931 1042 ${EndIf} 932 1043
Note:
See TracChangeset
for help on using the changeset viewer.