Changeset 133 for smplayer/vendor/current/setup/smplayer.nsi
- Timestamp:
- Oct 24, 2012, 7:56:20 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/setup/smplayer.nsi
r130 r133 1 ; Installer script for win32 SMPlayer1 ; Installer script for win32/win64 SMPlayer 2 2 ; Written by redxii (redxii@users.sourceforge.net) 3 ; Tested/Developed with Unicode NSIS 2.46. 43 ; Tested/Developed with Unicode NSIS 2.46.5 4 4 5 5 !ifndef VER_MAJOR | VER_MINOR | VER_BUILD … … 50 50 !endif 51 51 52 !ifndef WITH_MPLAYER53 54 !ifndef DEFAULT_MPLAYER_VERSION55 !define DEFAULT_MPLAYER_VERSION "mplayer-svn-33216"56 !endif57 58 !endif59 60 52 ;Version control 61 53 !ifndef VERSION_FILE_URL … … 70 62 BrandingText "SMPlayer for Windows v${SMPLAYER_VERSION}" 71 63 !ifdef WIN64 72 !ifdef WITH_MPLAYER 73 OutFile "smplayer-${SMPLAYER_VERSION}-x64.exe" 74 !else ifndef WITH_MPLAYER 75 OutFile "smplayer-${SMPLAYER_VERSION}-dl-x64.exe" 76 !endif 64 OutFile "output\smplayer-${SMPLAYER_VERSION}-x86_64.exe" 77 65 !else 78 !ifdef WITH_MPLAYER 79 ;OutFile "smplayer-${SMPLAYER_VERSION}-x86.exe" 80 OutFile "smplayer-${SMPLAYER_VERSION}-win32.exe" 81 !else ifndef WITH_MPLAYER 82 ;OutFile "smplayer-${SMPLAYER_VERSION}-dl-x86.exe" 83 OutFile "smplayer-${SMPLAYER_VERSION}-webdl.exe" 84 !endif 66 OutFile "output\smplayer-${SMPLAYER_VERSION}-x86.exe" 85 67 !endif 86 68 … … 92 74 VIAddVersionKey "LegalCopyright" "" 93 75 !ifdef WIN64 94 !ifdef WITH_MPLAYER 95 VIAddVersionKey "FileDescription" "SMPlayer Installer x64 (Offline)" 96 !else ifndef WITH_MPLAYER 97 VIAddVersionKey "FileDescription" "SMPlayer Installer x64 (Web Downloader)" 98 !endif 76 VIAddVersionKey "FileDescription" "SMPlayer Installer (64-bit)" 99 77 !else 100 !ifdef WITH_MPLAYER 101 ;VIAddVersionKey "FileDescription" "SMPlayer Installer x86 (Offline)" 102 VIAddVersionKey "FileDescription" "SMPlayer Installer (Offline)" 103 !else ifndef WITH_MPLAYER 104 ;VIAddVersionKey "FileDescription" "SMPlayer Installer x86 (Web Downloader)" 105 VIAddVersionKey "FileDescription" "SMPlayer Installer (Web Downloader)" 106 !endif 78 VIAddVersionKey "FileDescription" "SMPlayer Installer (32-bit)" 107 79 !endif 108 80 … … 126 98 ;Variables 127 99 128 Var Codec_Version129 100 Var Dialog_Reinstall 130 101 Var Inst_Type … … 140 111 Var Reinstall_UninstallButton_State 141 112 Var SMPlayer_Path 113 Var SMPlayer_UnStrPath 142 114 Var SMPlayer_StartMenuFolder 143 115 … … 307 279 308 280 ${If} $Reinstall_UninstallButton_State == 1 309 Exec '"$SMPlayer_ Path\uninst.exe" /X'281 Exec '"$SMPlayer_UnStrPath" /X' 310 282 Quit 311 283 ${ElseIf} $Reinstall_OverwriteButton_State == 1 312 284 ${If} "$INSTDIR" == "$SMPlayer_Path" 313 ExecWait '"$SMPlayer_ Path\uninst.exe" /S /R _?=$SMPlayer_Path'285 ExecWait '"$SMPlayer_UnStrPath" /S /R _?=$SMPlayer_Path' 314 286 ${Else} 315 ExecWait '"$SMPlayer_ Path\uninst.exe" /S /R'287 ExecWait '"$SMPlayer_UnStrPath" /S /R' 316 288 ${EndIf} 317 289 ${EndIf} … … 354 326 SectionGroup $(ShortcutGroupTitle) 355 327 356 ${Memento UnselectedSection} $(Section_DesktopShortcut) SecDesktopShortcut328 ${MementoSection} $(Section_DesktopShortcut) SecDesktopShortcut 357 329 358 330 SetOutPath "$INSTDIR" … … 368 340 CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer.lnk" "$INSTDIR\smplayer.exe" 369 341 CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMTube.lnk" "$INSTDIR\smtube.exe" 370 WriteINIStr "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer on the Web.url" "InternetShortcut" "URL" "http://smplayer.s f.net"342 WriteINIStr "$SMPROGRAMS\$SMPlayer_StartMenuFolder\SMPlayer on the Web.url" "InternetShortcut" "URL" "http://smplayer.sourceforge.net" 371 343 CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\Uninstall SMPlayer.lnk" "$INSTDIR\${SMPLAYER_UNINST_EXE}" 372 344 !insertmacro MUI_STARTMENU_WRITE_END … … 384 356 SectionIn RO 385 357 386 !ifdef WITH_MPLAYER387 358 SetOutPath "$INSTDIR\mplayer" 388 359 File /r "${SMPLAYER_BUILD_DIR}\mplayer\*.*" 389 360 390 361 WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer 0x1 391 !else ifndef WITH_MPLAYER 392 AddSize 16800 393 394 Var /GLOBAL MPlayer_Version 395 396 Call GetVerInfo 397 398 /* Read from version-info 399 If it was unable to download, set version to that defined in the 400 beginning of the script. */ 401 ${If} ${FileExists} "$PLUGINSDIR\version-info" 402 ReadINIStr $MPlayer_Version "$PLUGINSDIR\version-info" smplayer mplayer 403 ${Else} 404 StrCpy $MPlayer_Version ${DEFAULT_MPLAYER_VERSION} 405 ${EndIf} 406 407 retry_mplayer: 408 409 DetailPrint $(MPlayer_DL_Msg) 410 inetc::get /CONNECTTIMEOUT 15000 /RESUME "" /BANNER $(MPlayer_DL_Msg) /CAPTION $(MPlayer_DL_Msg) \"http://downloads.sourceforge.net/smplayer/$MPlayer_Version.7z?big_mirror=0" \ 411 "$PLUGINSDIR\$MPlayer_Version.7z" /END 412 Pop $R0 413 StrCmp $R0 OK 0 check_mplayer 414 415 DetailPrint $(Info_Files_Extract) 416 nsExec::Exec '"$PLUGINSDIR\7za.exe" x "$PLUGINSDIR\$MPlayer_Version.7z" -y -o"$PLUGINSDIR"' 417 418 CreateDirectory "$INSTDIR\mplayer" 419 CopyFiles /SILENT "$PLUGINSDIR\$MPlayer_Version\*" "$INSTDIR\mplayer" 420 421 check_mplayer: 422 423 ${If} $R0 != "OK" 424 DetailPrint $(MPlayer_DL_Failed) 425 ${EndIf} 426 427 IfFileExists "$INSTDIR\mplayer\mplayer.exe" mplayerInstSuccess mplayerInstFailed 428 mplayerInstSuccess: 429 WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer 0x1 430 Goto done 431 mplayerInstFailed: 432 MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(MPlayer_DL_Retry) /SD IDCANCEL IDRETRY retry_mplayer 433 Abort $(MPlayer_Inst_Failed) 434 435 done: 436 !endif 362 437 363 SectionEnd 438 364 … … 440 366 441 367 AddSize 22300 368 369 Var /GLOBAL Codec_Version 442 370 443 371 Call GetVerInfo … … 534 462 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayIcon" "$INSTDIR\smplayer.exe" 535 463 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayVersion" "${SMPLAYER_VERSION}" 536 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http://smplayer. berlios.de/forum"464 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http://smplayer.sourceforge.net/forum" 537 465 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "Publisher" "Ricardo Villalba" 538 466 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "UninstallString" "$INSTDIR\${SMPLAYER_UNINST_EXE}" 539 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLInfoAbout" "http://smplayer.s f.net"540 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLUpdateInfo" "http://smplayer.s f.net"467 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLInfoAbout" "http://smplayer.sourceforge.net" 468 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "URLUpdateInfo" "http://smplayer.sourceforge.net" 541 469 WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoModify" "1" 542 470 WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoRepair" "1" … … 583 511 !insertmacro ${_action} ".m3u" 584 512 !insertmacro ${_action} ".m3u8" 513 !insertmacro ${_action} ".m4a" 585 514 !insertmacro ${_action} ".m4v" 515 !insertmacro ${_action} ".mka" 586 516 !insertmacro ${_action} ".mkv" 587 517 !insertmacro ${_action} ".mov" … … 593 523 !insertmacro ${_action} ".mqv" 594 524 !insertmacro ${_action} ".nsv" 525 !insertmacro ${_action} ".oga" 595 526 !insertmacro ${_action} ".ogg" 596 527 !insertmacro ${_action} ".ogm" 597 528 !insertmacro ${_action} ".ogv" 529 !insertmacro ${_action} ".ogx" 598 530 !insertmacro ${_action} ".pls" 599 531 !insertmacro ${_action} ".ra" … … 613 545 !insertmacro ${_action} ".wma" 614 546 !insertmacro ${_action} ".wmv" 547 !insertmacro ${_action} ".wtv" 615 548 !macroend 616 549 … … 677 610 678 611 retry_runcheck: 679 680 681 682 612 FindProcDLL::FindProc "smplayer.exe" 613 IntCmp $R0 1 0 +3 614 MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(SMPlayer_Is_Running) /SD IDCANCEL IDRETRY retry_runcheck 615 Abort 683 616 684 617 FunctionEnd … … 691 624 692 625 Function .onInit 626 627 ${Unless} ${AtLeastWinXP} 628 MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported) /SD IDNO IDYES installonoldwindows 629 Abort 630 installonoldwindows: 631 ${EndIf} 693 632 694 633 !ifdef WIN64 … … 721 660 !endif 722 661 723 !ifdef PRE_RELEASE724 MessageBox MB_OK|MB_ICONINFORMATION "This is a pre-release version of SMPlayer. Please report all issues."725 !endif726 727 662 ;Check if setup is already running 728 663 System::Call 'kernel32::CreateMutexW(i 0, i 0, t "SMPlayerSetup") i .r1 ?e' … … 778 713 ClearErrors 779 714 ReadRegStr $Previous_Version HKLM "${SMPLAYER_REG_KEY}" "Version" 715 ReadRegStr $SMPlayer_UnStrPath HKLM "${SMPLAYER_UNINST_KEY}" "UninstallString" 780 716 ReadRegStr $SMPlayer_Path HKLM "${SMPLAYER_REG_KEY}" "Path" 781 717 … … 1007 943 !ifdef WIN64 1008 944 ${IfNot} ${RunningX64} 1009 MessageBox MB_OK|MB_ICONSTOP "This installation can only be uninstalled on 64-bit Windows."945 MessageBox MB_OK|MB_ICONSTOP $(Uninstaller_64bitOnly) 1010 946 Abort 1011 947 ${EndIf}
Note:
See TracChangeset
for help on using the changeset viewer.