Changeset 165 for smplayer/trunk/setup/smplayer.nsi
- Timestamp:
- May 16, 2014, 9:51:55 AM (11 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 163
- Property svn:mergeinfo changed
-
smplayer/trunk/setup/smplayer.nsi
r156 r165 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 !endif 8 9 !ifdef WIN64 10 !define DISABLE_CODECS 7 11 !endif 8 12 … … 102 106 Var Reinstall_UninstallButton 103 107 Var Reinstall_UninstallButton_State 108 !ifndef DISABLE_CODECS 104 109 Var Restore_Codecs 110 !endif 105 111 Var SMPlayer_Path 106 112 Var SMPlayer_UnStrPath … … 204 210 205 211 !insertmacro MUI_LANGUAGE "English" 212 !insertmacro MUI_LANGUAGE "Albanian" 213 !insertmacro MUI_LANGUAGE "Arabic" 206 214 !insertmacro MUI_LANGUAGE "Basque" 215 !insertmacro MUI_LANGUAGE "Bulgarian" 207 216 !insertmacro MUI_LANGUAGE "Catalan" 208 217 !insertmacro MUI_LANGUAGE "Croatian" … … 218 227 !insertmacro MUI_LANGUAGE "Japanese" 219 228 !insertmacro MUI_LANGUAGE "Korean" 229 !insertmacro MUI_LANGUAGE "Malay" 220 230 !insertmacro MUI_LANGUAGE "Norwegian" 221 231 !insertmacro MUI_LANGUAGE "Polish" 222 232 !insertmacro MUI_LANGUAGE "Portuguese" 233 !insertmacro MUI_LANGUAGE "PortugueseBR" 223 234 !insertmacro MUI_LANGUAGE "Russian" 235 !insertmacro MUI_LANGUAGE "Serbian" 224 236 !insertmacro MUI_LANGUAGE "SimpChinese" 225 237 !insertmacro MUI_LANGUAGE "Slovak" … … 232 244 233 245 !insertmacro LANGFILE_INCLUDE "translations\english.nsh" 246 !insertmacro LANGFILE_INCLUDE "translations\albanian.nsh" 247 !insertmacro LANGFILE_INCLUDE "translations\arabic.nsh" 234 248 !insertmacro LANGFILE_INCLUDE "translations\basque.nsh" 249 !insertmacro LANGFILE_INCLUDE "translations\bulgarian.nsh" 235 250 !insertmacro LANGFILE_INCLUDE "translations\catalan.nsh" 236 251 !insertmacro LANGFILE_INCLUDE "translations\croatian.nsh" … … 246 261 !insertmacro LANGFILE_INCLUDE "translations\japanese.nsh" 247 262 !insertmacro LANGFILE_INCLUDE "translations\korean.nsh" 263 !insertmacro LANGFILE_INCLUDE "translations\malay.nsh" 248 264 !insertmacro LANGFILE_INCLUDE "translations\norwegian.nsh" 249 265 !insertmacro LANGFILE_INCLUDE "translations\polish.nsh" 250 266 !insertmacro LANGFILE_INCLUDE "translations\portuguese.nsh" 267 !insertmacro LANGFILE_INCLUDE "translations\portuguesebrazil.nsh" 251 268 !insertmacro LANGFILE_INCLUDE "translations\russian.nsh" 269 !insertmacro LANGFILE_INCLUDE "translations\serbian.nsh" 252 270 !insertmacro LANGFILE_INCLUDE "translations\simpchinese.nsh" 253 271 !insertmacro LANGFILE_INCLUDE "translations\slovak.nsh" … … 283 301 ${ElseIf} $Reinstall_OverwriteButton_State == 1 284 302 303 !ifndef DISABLE_CODECS 285 304 Call Backup_Codecs 305 !endif 286 306 287 307 ${If} "$INSTDIR" == "$SMPlayer_Path" … … 308 328 File /r "${SMPLAYER_BUILD_DIR}\imageformats\*.*" 309 329 330 ;Qt platforms (Qt 5+) 331 SetOutPath "$INSTDIR\platforms" 332 File /nonfatal /r "${SMPLAYER_BUILD_DIR}\platforms\*.*" 333 310 334 ;SMPlayer key shortcuts 311 335 SetOutPath "$INSTDIR\shortcuts" 312 336 File /r "${SMPLAYER_BUILD_DIR}\shortcuts\*.*" 313 337 338 !ifndef DISABLE_CODECS 314 339 SetOutPath "$PLUGINSDIR" 315 340 File 7za.exe 341 !endif 316 342 317 343 ;Initialize to 0 if don't exist (based on error flag) … … 363 389 364 390 SetOutPath "$INSTDIR\mplayer" 365 File /r /x mplayer.exe /x mencoder.exe /x mplayer64.exe /x mencoder64.exe "${SMPLAYER_BUILD_DIR}\mplayer\*.*"391 File /r /x mplayer.exe /x mencoder.exe /x mplayer64.exe /x mencoder64.exe /x *.exe.debug "${SMPLAYER_BUILD_DIR}\mplayer\*.*" 366 392 !ifdef WIN64 367 393 File /oname=mplayer.exe "${SMPLAYER_BUILD_DIR}\mplayer\mplayer64.exe" … … 374 400 SectionEnd 375 401 402 !ifndef DISABLE_CODECS 376 403 Section /o $(Section_MPlayerCodecs) SecCodecs 377 378 !ifdef WIN64379 SectionIn RO380 !endif381 404 382 405 AddSize 22931 … … 394 417 395 418 DetailPrint $(Codecs_DL_Msg) 396 !if ndef USE_NSISDL419 !ifdef USE_INETC 397 420 inetc::get /CONNECTTIMEOUT 15000 /RESUME "" /BANNER $(Codecs_DL_Msg) /CAPTION $(Codecs_DL_Msg) \ 398 421 "http://www.mplayerhq.hu/MPlayer/releases/codecs/${CODEC_VERSION}.zip" \ … … 432 455 433 456 SectionEnd 457 !endif 434 458 435 459 SectionGroupEnd … … 487 511 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayIcon" "$INSTDIR\smplayer.exe" 488 512 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayVersion" "${SMPLAYER_VERSION}" 489 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http:// smplayer.sourceforge.net/forum"513 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "HelpLink" "http://forum.smplayer.info" 490 514 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "Publisher" "Ricardo Villalba" 491 515 WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "UninstallString" "$INSTDIR\${SMPLAYER_UNINST_EXE}" … … 495 519 WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoRepair" "1" 496 520 521 ;Clean up empty directories 522 RMDir "$INSTDIR\platforms" 523 !ifdef WIN64 524 RMDir "$INSTDIR\mplayer\codecs" 525 !endif 526 497 527 SectionEnd 498 528 … … 506 536 !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenuShortcut} $(Section_StartMenu_Desc) 507 537 !insertmacro MUI_DESCRIPTION_TEXT ${SecMPlayer} $(Section_MPlayer_Desc) 538 !ifndef DISABLE_CODECS 508 539 !insertmacro MUI_DESCRIPTION_TEXT ${SecCodecs} $(Section_MPlayerCodecs_Desc) 540 !endif 509 541 !insertmacro MUI_DESCRIPTION_TEXT ${SecThemes} $(Section_IconThemes_Desc) 510 542 !insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} $(Section_Translations_Desc) … … 606 638 RMDir /r "$INSTDIR\imageformats" 607 639 RMDir /r "$INSTDIR\mplayer" 640 RMDir /r "$INSTDIR\platforms" 608 641 RMDir /r "$INSTDIR\shortcuts" 609 642 RMDir /r "$INSTDIR\themes" 610 643 RMDir /r "$INSTDIR\translations" 611 644 Delete "$INSTDIR\*.txt" 612 Delete "$INSTDIR\libgcc_s_dw2-1.dll" 645 Delete "$INSTDIR\icudt51.dll" 646 Delete "$INSTDIR\icuin51.dll" 647 Delete "$INSTDIR\icuuc51.dll" 648 Delete "$INSTDIR\libgcc_s_*.dll" 649 Delete "$INSTDIR\libstdc++-6.dll" 613 650 Delete "$INSTDIR\libwinpthread-1.dll" 614 651 Delete "$INSTDIR\mingwm10.dll" … … 720 757 ${EndIf} 721 758 722 Call LoadPreviousSettings723 724 759 ;Setup language selection 725 760 !insertmacro MUI_LANGDLL_DISPLAY 726 761 762 Call LoadPreviousSettings 763 727 764 Call CheckPreviousVersion 728 765 … … 734 771 735 772 ${MementoSectionSave} 736 737 /*738 ${Unless} $Reinstall_Uninstall == 1739 ExecShell "open" "http://smplayer.sourceforge.net/thank-you.php?version=${SMPLAYER_VERSION}"740 ${EndIf}741 */742 773 743 774 FunctionEnd … … 755 786 756 787 FunctionEnd 757 758 /* Function un.onUninstSuccess759 760 ;Don't launch uninstall page if reinstalling761 ${un.GetParameters} $R0762 ${un.GetOptionsS} $R0 "/R" $R1763 764 IfErrors 0 +2765 ExecShell "open" "http://smplayer.sourceforge.net/uninstall.php?version=${SMPLAYER_VERSION}"766 767 FunctionEnd */768 788 769 789 Function CheckPreviousVersion … … 776 796 ${IfNot} ${Errors} 777 797 StrCpy $Reinstall_Uninstall 1 798 !ifdef WIN64 799 ;Workaround for InstallDirRegKey on 64-bit 800 StrCpy $INSTDIR $SMPlayer_Path 801 !endif 802 803 ;Since we can't get input from a silent install to initialize the variables, prefer upgrading 804 ${If} ${Silent} 805 StrCpy $Reinstall_UninstallButton_State 0 806 StrCpy $Reinstall_OverwriteButton_State 1 807 ${EndIf} 778 808 ${EndIf} 779 809 … … 794 824 FunctionEnd 795 825 826 !ifndef DISABLE_CODECS 796 827 Function Backup_Codecs 797 828 … … 810 841 811 842 FunctionEnd 843 !endif 812 844 813 845 Function LoadPreviousSettings … … 815 847 ;MPlayer codecs section doesn't use Memento so we need to restore it manually 816 848 ;32-bit only 817 !ifdef WIN64 818 !insertmacro UnSelectSection ${SecCodecs} 819 !else 849 !ifndef DISABLE_CODECS 820 850 ReadRegDWORD $R0 HKLM "${SMPLAYER_REG_KEY}" "Installed_Codecs" 821 851 ${If} $R0 == 1 … … 989 1019 990 1020 ;Make sure SMPlayer is installed from where the uninstaller is being executed. 991 IfFileExists $INSTDIR\smplayer.exe smplayer_installed 992 MessageBox MB_YESNO $(Uninstaller_NotInstalled) /SD IDNO IDYES smplayer_installed 993 Abort $(Uninstaller_Aborted) 994 995 smplayer_installed: 1021 IfFileExists "$INSTDIR\smplayer.exe" +2 1022 Abort $(Uninstaller_InvalidDirectory) 996 1023 997 1024 SetDetailsPrint textonly
Note:
See TracChangeset
for help on using the changeset viewer.