Ignore:
Timestamp:
May 3, 2016, 5:25:45 PM (9 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update trunk to version 16.4

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/setup/smplayer.nsi

    r170 r176  
    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 !endif
    8 
    9 !ifdef WIN64
    10   !define DISABLE_CODECS
    117!endif
    128
     
    4743  !define SMPLAYER_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\SMPlayer"
    4844
    49   !define CODEC_VERSION "windows-essential-20071007"
    50 
    5145;--------------------------------
    5246;General
     
    5650  BrandingText "SMPlayer for Windows v${SMPLAYER_VERSION}"
    5751!ifdef WIN64
     52  !ifdef QT5
     53  OutFile "output\Qt5\smplayer-${SMPLAYER_VERSION}-x64-qt5.exe"
     54  !else
    5855  OutFile "output\smplayer-${SMPLAYER_VERSION}-x64.exe"
     56  !endif
    5957!else
     58  !ifdef QT5
     59  OutFile "output\Qt5\smplayer-${SMPLAYER_VERSION}-win32-qt5.exe"
     60  !else
    6061  OutFile "output\smplayer-${SMPLAYER_VERSION}-win32.exe"
     62  !endif
    6163!endif
    6264
     
    106108  Var Reinstall_UninstallButton
    107109  Var Reinstall_UninstallButton_State
    108 !ifndef DISABLE_CODECS
     110!ifndef WIN64
    109111  Var Restore_Codecs
    110112!endif
     113  Var Restore_YTDL
     114  Var Restore_SMTube
    111115  Var SMPlayer_Path
    112116  Var SMPlayer_UnStrPath
     
    136140
    137141  ;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"
    140144  !define MUI_FINISHPAGE_NOREBOOTSUPPORT
    141145  !define MUI_FINISHPAGE_RUN $INSTDIR\smplayer.exe
     
    211215  !insertmacro MUI_LANGUAGE "English"
    212216  !insertmacro MUI_LANGUAGE "Albanian"
     217  ;!insertmacro MUI_LANGUAGE "Amharic"
    213218  !insertmacro MUI_LANGUAGE "Arabic"
    214219  !insertmacro MUI_LANGUAGE "Basque"
     
    219224  !insertmacro MUI_LANGUAGE "Danish"
    220225  !insertmacro MUI_LANGUAGE "Dutch"
     226  !insertmacro MUI_LANGUAGE "Farsi"
    221227  !insertmacro MUI_LANGUAGE "Finnish"
    222228  !insertmacro MUI_LANGUAGE "French"
    223229  !insertmacro MUI_LANGUAGE "German"
     230  !insertmacro MUI_LANGUAGE "Greek"
    224231  !insertmacro MUI_LANGUAGE "Hebrew"
    225232  !insertmacro MUI_LANGUAGE "Hungarian"
     
    232239  !insertmacro MUI_LANGUAGE "Portuguese"
    233240  !insertmacro MUI_LANGUAGE "PortugueseBR"
     241  !insertmacro MUI_LANGUAGE "Romanian"
    234242  !insertmacro MUI_LANGUAGE "Russian"
    235243  !insertmacro MUI_LANGUAGE "Serbian"
     
    241249  !insertmacro MUI_LANGUAGE "TradChinese"
    242250  !insertmacro MUI_LANGUAGE "Ukrainian"
     251  !insertmacro MUI_LANGUAGE "Galician"
     252  !insertmacro MUI_LANGUAGE "Indonesian"
     253  !insertmacro MUI_LANGUAGE "Turkish"
     254  !insertmacro MUI_LANGUAGE "Vietnamese"
    243255
    244256;Custom translations for setup
     
    246258  !insertmacro LANGFILE_INCLUDE "translations\english.nsh"
    247259  !insertmacro LANGFILE_INCLUDE "translations\albanian.nsh"
     260  ;!insertmacro LANGFILE_INCLUDE "translations\amharic.nsh"
    248261  !insertmacro LANGFILE_INCLUDE "translations\arabic.nsh"
    249262  !insertmacro LANGFILE_INCLUDE "translations\basque.nsh"
     
    254267  !insertmacro LANGFILE_INCLUDE "translations\danish.nsh"
    255268  !insertmacro LANGFILE_INCLUDE "translations\dutch.nsh"
     269  !insertmacro LANGFILE_INCLUDE "translations\farsi.nsh"
    256270  !insertmacro LANGFILE_INCLUDE "translations\finnish.nsh"
    257271  !insertmacro LANGFILE_INCLUDE "translations\french.nsh"
    258272  !insertmacro LANGFILE_INCLUDE "translations\german.nsh"
     273  !insertmacro LANGFILE_INCLUDE "translations\greek.nsh"
    259274  !insertmacro LANGFILE_INCLUDE "translations\hebrew.nsh"
    260275  !insertmacro LANGFILE_INCLUDE "translations\hungarian.nsh"
     
    267282  !insertmacro LANGFILE_INCLUDE "translations\portuguese.nsh"
    268283  !insertmacro LANGFILE_INCLUDE "translations\portuguesebrazil.nsh"
     284  !insertmacro LANGFILE_INCLUDE "translations\romanian.nsh"
    269285  !insertmacro LANGFILE_INCLUDE "translations\russian.nsh"
    270286  !insertmacro LANGFILE_INCLUDE "translations\serbian.nsh"
     
    276292  !insertmacro LANGFILE_INCLUDE "translations\tradchinese.nsh"
    277293  !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"
    278298
    279299;--------------------------------
     
    303323    ${ElseIf} $Reinstall_OverwriteButton_State == 1
    304324
    305 !ifndef DISABLE_CODECS
     325!ifndef WIN64
    306326      Call Backup_Codecs
    307327!endif
     328      Call Backup_YTDL
     329      Call Backup_SMTube
    308330
    309331      ${If} "$INSTDIR" == "$SMPlayer_Path"
     
    330352  File /r "${SMPLAYER_BUILD_DIR}\imageformats\*.*"
    331353
     354  ;Open fonts
     355  ; SetOutPath "$INSTDIR\open-fonts"
     356  ; File /r "${SMPLAYER_BUILD_DIR}\open-fonts\*.*"
     357
    332358  ;Qt platforms (Qt 5+)
     359!ifdef QT5
    333360  SetOutPath "$INSTDIR\platforms"
    334   File /nonfatal /r "${SMPLAYER_BUILD_DIR}\platforms\*.*"
     361  File /r "${SMPLAYER_BUILD_DIR}\platforms\*.*"
     362!endif
    335363
    336364  ;SMPlayer key shortcuts
    337365  SetOutPath "$INSTDIR\shortcuts"
    338366  File /r "${SMPLAYER_BUILD_DIR}\shortcuts\*.*"
    339 
    340 !ifndef DISABLE_CODECS
    341   SetOutPath "$PLUGINSDIR"
    342   File 7za.exe
    343 !endif
    344 
    345   ;Initialize to 0 if don't exist (based on error flag)
    346   ReadRegDWORD $R0 HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer
    347   ${If} ${Errors}
    348     WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_MPlayer 0x0
    349   ${EndIf}
    350 
    351   ReadRegDWORD $R0 HKLM "${SMPLAYER_REG_KEY}" Installed_Codecs
    352   ${If} ${Errors}
    353     WriteRegDWORD HKLM "${SMPLAYER_REG_KEY}" Installed_Codecs 0x0
    354   ${EndIf}
    355367
    356368SectionEnd
     
    373385      CreateDirectory "$SMPROGRAMS\$SMPlayer_StartMenuFolder"
    374386      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"
    377391      CreateShortCut "$SMPROGRAMS\$SMPlayer_StartMenuFolder\Uninstall SMPlayer.lnk" "$INSTDIR\${SMPLAYER_UNINST_EXE}"
    378392    !insertmacro MUI_STARTMENU_WRITE_END
     
    383397
    384398;--------------------------------
    385 ;MPlayer & MPlayer Codecs
    386 SectionGroup $(MPlayerGroupTitle)
    387 
    388   Section $(Section_MPlayer) SecMPlayer
    389 
    390     SectionIn RO
     399;MPlayer & MPV
     400SectionGroup $(MPlayerMPVGroupTitle)
     401
     402  ${MementoSection} "MPlayer" SecMPlayer
    391403
    392404    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\*.*"
    394406!ifdef WIN64
    395407    File /oname=mplayer.exe "${SMPLAYER_BUILD_DIR}\mplayer\mplayer64.exe"
     408    RMDir "$INSTDIR\mplayer\codecs"
    396409!else
    397410    File "${SMPLAYER_BUILD_DIR}\mplayer\mplayer.exe"
    398411!endif
    399412
    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"
    427422!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}
    460446
    461447SectionGroupEnd
     
    479465${MementoSectionEnd}
    480466
    481 Section /o $(Reinstall_Msg5) SecResetSettings
    482 
    483     NsExec::Exec '"$INSTDIR\smplayer.exe" -delete-config'
     467Section -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
    484500
    485501SectionEnd
     
    513529  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "DisplayIcon" "$INSTDIR\smplayer.exe"
    514530  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"
    516532  WriteRegStr HKLM "${SMPLAYER_UNINST_KEY}" "Publisher" "Ricardo Villalba"
    517533  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"
    520536  WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoModify" "1"
    521537  WriteRegDWORD HKLM "${SMPLAYER_UNINST_KEY}" "NoRepair" "1"
    522538
    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
    528557
    529558SectionEnd
     
    538567  !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenuShortcut} $(Section_StartMenu_Desc)
    539568  !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)
    543570  !insertmacro MUI_DESCRIPTION_TEXT ${SecThemes} $(Section_IconThemes_Desc)
    544571  !insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} $(Section_Translations_Desc)
    545   !insertmacro MUI_DESCRIPTION_TEXT ${SecResetSettings} $(Section_ResetSettings_Desc)
    546572!insertmacro MUI_FUNCTION_DESCRIPTION_END
    547573
     
    640666  RMDir /r "$INSTDIR\imageformats"
    641667  RMDir /r "$INSTDIR\mplayer"
     668  RMDir /r "$INSTDIR\mpv"
     669  ; RMDir /r "$INSTDIR\open-fonts"
    642670  RMDir /r "$INSTDIR\platforms"
    643671  RMDir /r "$INSTDIR\shortcuts"
    644672  RMDir /r "$INSTDIR\themes"
    645673  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"
    650697  Delete "$INSTDIR\libgcc_s_*.dll"
    651698  Delete "$INSTDIR\libstdc++-6.dll"
     
    657704  Delete "$INSTDIR\ssleay32.dll"
    658705  Delete "$INSTDIR\sample.avi"
    659   Delete "$INSTDIR\smplayer.exe"
    660   Delete "$INSTDIR\smtube.exe"
    661   Delete "$INSTDIR\dxlist.exe"
    662706
    663707  ;Delete registry keys
     
    701745Function .onInit
    702746
     747!ifdef WIN64
     748  ${Unless} ${AtLeastWinVista}
     749!else
    703750  ${Unless} ${AtLeastWinXP}
     751!endif
    704752    MessageBox MB_YESNO|MB_ICONSTOP $(OS_Not_Supported) /SD IDNO IDYES installonoldwindows
    705753    Abort
     
    791839FunctionEnd
    792840
     841Function .onSelChange
     842
     843  ${Unless} ${SectionIsSelected} ${SecMPlayer}
     844  ${AndUnless} ${SectionIsSelected} ${SecMPV}
     845    !insertmacro SelectSection ${SecMPlayer}
     846  ${EndUnless}
     847
     848FunctionEnd
     849
    793850Function CheckPreviousVersion
    794851
     
    828885FunctionEnd
    829886
    830 !ifndef DISABLE_CODECS
     887!ifndef WIN64
    831888Function Backup_Codecs
    832889
    833   ${IfNot} ${SectionIsSelected} ${SecCodecs}
     890  ${IfNot} ${SectionIsSelected} ${SecMPlayer}
    834891    Return
    835892  ${EndIf}
     
    847904!endif
    848905
     906Function 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
     920FunctionEnd
     921
     922Function 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
     958FunctionEnd
     959
    849960Function LoadPreviousSettings
    850961
    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
    861963  !insertmacro MUI_STARTMENU_GETFOLDER "SMP_SMenu" $SMPlayer_StartMenuFolder
    862964
     
    9131015  ${NSD_OnClick} $Reinstall_UninstallButton PageReinstallUpdate
    9141016  ${NSD_OnClick} $Reinstall_ChgSettings PageReinstallUpdate
     1017  ${NSD_OnClick} $Reinstall_RemoveSettings RemoveSettingsUpdate
    9151018
    9161019  Call PageReinstallUpdate
     
    9271030  ${NSD_GetState} $Reinstall_RemoveSettings $Reinstall_RemoveSettings_State
    9281031
     1032FunctionEnd
     1033
     1034Function RemoveSettingsUpdate
     1035
     1036  ${NSD_GetState} $Reinstall_RemoveSettings $Reinstall_RemoveSettings_State
     1037
    9291038  ${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:
    9311042  ${EndIf}
    9321043
Note: See TracChangeset for help on using the changeset viewer.