Commit 35bb5df5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Windows Installer improvements.

parent 8501e4a2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; NSIS installer script for vlc ; ; NSIS installer script for vlc ;
; (http://nsis.sourceforge.net) ; ; (http://nsis.sourceforge.net) ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!define PRODUCT_NAME "VLC media player" !define PRODUCT_NAME "VLC media player"
!define PRODUCT_VERSION '${VERSION}' !define PRODUCT_VERSION '0.9.0-git'
!define PRODUCT_GROUP "VideoLAN" !define PRODUCT_GROUP "VideoLAN"
!define PRODUCT_PUBLISHER "VideoLAN Team" !define PRODUCT_PUBLISHER "VideoLAN Team"
!define PRODUCT_WEB_SITE "http://www.videolan.org" !define PRODUCT_WEB_SITE "http://www.videolan.org"
!define PRODUCT_DIR_REGKEY "Software\VideoLAN\VLC" !define PRODUCT_DIR_REGKEY "Software\VideoLAN\VLC"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM" !define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}" !define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}"
!define MUI_LANGDLL_REGISTRY_ROOT "HKLM" !define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_DIR_REGKEY}" !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_DIR_REGKEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Language" !define MUI_LANGDLL_REGISTRY_VALUENAME "Language"
@FILE_LIBVLC_DLL@ @FILE_LIBVLC_DLL@
@FILE_LIBVLC_CONTROL_DLL@ @FILE_LIBVLC_CONTROL_DLL@
;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;
; General configuration ; ; General configuration ;
;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;
Name "${PRODUCT_GROUP} ${PRODUCT_NAME} ${PRODUCT_VERSION}" Name "${PRODUCT_GROUP} ${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile ..\vlc-${VERSION}-win32.exe OutFile ..\vlc-${VERSION}-win32.exe
InstallDir "$PROGRAMFILES\VideoLAN\VLC" InstallDir "$PROGRAMFILES\VideoLAN\VLC"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
!ifdef NSIS_LZMA_COMPRESS_WHOLE !ifdef NSIS_LZMA_COMPRESS_WHOLE
SetCompressor lzma SetCompressor lzma
!else !else
SetCompressor /SOLID lzma SetCompressor /SOLID lzma
!endif !endif
;ShowInstDetails show
;ShowUnInstDetails show ;ShowInstDetails show
SetOverwrite ifnewer ;ShowUnInstDetails show
CRCCheck on SetOverwrite ifnewer
BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}" CRCCheck on
BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}"
InstType "Recommended"
InstType "Minimum" InstType "Recommended"
InstType "Full" InstType "Minimum"
InstType "Full"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; NSIS Modern User Interface configuration ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; NSIS Modern User Interface configuration ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MUI 1.67 compatible ------
!include "MUI.nsh" ; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING ; MUI Settings
!define MUI_ICON "vlc48x48.ico" !define MUI_ABORTWARNING
!define MUI_UNICON "vlc48x48.ico" !define MUI_ICON "vlc48x48.ico"
!define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_UNICON "vlc48x48.ico"
!define MUI_COMPONENTSPAGE_SMALLDESC
; Installer pages
; Welcome page ; Installer pages
!define MUI_WELCOMEPAGE_TITLE_3LINES ; Welcome page
!insertmacro MUI_PAGE_WELCOME !define MUI_WELCOMEPAGE_TITLE_3LINES
; License page !insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "COPYING.txt" ; License page
; Components page !insertmacro MUI_PAGE_LICENSE "COPYING.txt"
!insertmacro MUI_PAGE_COMPONENTS ; Components page
; Directory page !insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY ; Directory page
; Instfiles page !insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES ; Instfiles page
; Finish page !insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\vlc.exe" ; Finish page
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" !define MUI_FINISHPAGE_RUN "$INSTDIR\vlc.exe"
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
!define MUI_FINISHPAGE_LINK "Visit the VideoLAN VLC media player Website" !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/" !define MUI_FINISHPAGE_LINK "Visit the VideoLAN VLC media player Website"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT !define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
!insertmacro MUI_PAGE_FINISH !define MUI_FINISHPAGE_NOREBOOTSUPPORT
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_CONFIRM ; Uninstaller pages
!insertmacro MUI_UNPAGE_COMPONENTS !insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_COMPONENTS
!insertmacro MUI_UNPAGE_FINISH !insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
; Language files
!insertmacro MUI_LANGUAGE "English" # first language is the default language ; Language files
!insertmacro MUI_LANGUAGE "French" !insertmacro MUI_LANGUAGE "English" # first language is the default language
!insertmacro MUI_LANGUAGE "German" !insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Spanish" !insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "SimpChinese" !insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "TradChinese" !insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "Japanese" !insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_LANGUAGE "Korean" !insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Italian" !insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "Dutch" !insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Danish" !insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Swedish" !insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Norwegian" !insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Finnish" !insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Greek" !insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "Russian" !insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Portuguese" !insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Arabic" !insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Polish" !insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "Romanian" !insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Slovak" !insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Czech" !insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_RESERVEFILE_LANGDLL
; Reserve files for solid compression
; Reserve files !insertmacro MUI_RESERVEFILE_LANGDLL
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------ ; MUI end ------
;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;
; Extension lists ; ; Macro and Functions ;
;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;
!macro MacroAudioExtensions _action ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!insertmacro ${_action} ".a52" ; 1. File type associations ;
!insertmacro ${_action} ".aac" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!insertmacro ${_action} ".ac3"
!insertmacro ${_action} ".dts" ;; Function that register one extension for VLC
!insertmacro ${_action} ".flac" Function RegisterExtension
!insertmacro ${_action} ".mka" ; back up old value for extension $R0 (eg. ".opt")
!insertmacro ${_action} ".mp1" ReadRegStr $1 HKCR "$R0" ""
!insertmacro ${_action} ".mp2" StrCmp $1 "" NoBackup
!insertmacro ${_action} ".mp3" StrCmp $1 "VLC$R0" "NoBackup"
!insertmacro ${_action} ".ogg" WriteRegStr HKCR "$R0" "VLC.backup" $1
!insertmacro ${_action} ".spx" NoBackup:
!insertmacro ${_action} ".wav" WriteRegStr HKCR "$R0" "" "VLC$R0"
!insertmacro ${_action} ".wma" ReadRegStr $0 HKCR "VLC$R0" ""
!macroend WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"
WriteRegStr HKCR "VLC$R0\shell" "" "Play"
!macro MacroVideoExtensions _action WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
!insertmacro ${_action} ".asf" WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
!insertmacro ${_action} ".avi"
!insertmacro ${_action} ".divx" ;;; Vista Only part
!insertmacro ${_action} ".dv" ; Vista detection
!insertmacro ${_action} ".m1v" ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
!insertmacro ${_action} ".m2v" StrCpy $R2 $R1 3
!insertmacro ${_action} ".mkv" StrCmp $R2 '6.0' ForVista ToEnd
!insertmacro ${_action} ".mov" ForVista:
!insertmacro ${_action} ".mp4" WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
!insertmacro ${_action} ".mpeg"
!insertmacro ${_action} ".mpeg1" ToEnd:
!insertmacro ${_action} ".mpeg2" FunctionEnd
!insertmacro ${_action} ".mpeg4"
!insertmacro ${_action} ".mpg" ;; Function that removes one extension that VLC owns.
!insertmacro ${_action} ".mxf" Function un.RegisterExtension
!insertmacro ${_action} ".ps" ;start of restore script
!insertmacro ${_action} ".ts" ReadRegStr $1 HKCR "$R0" ""
!insertmacro ${_action} ".ogm" StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it
!insertmacro ${_action} ".vob" ; Read the old value from Backup
!insertmacro ${_action} ".wmv" ReadRegStr $1 HKCR "$R0" "VLC.backup"
!macroend StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
DeleteRegKey HKCR "$R0"
!macro MacroOtherExtensions _action Goto NoOwn
!insertmacro ${_action} ".asx" Restore:
!insertmacro ${_action} ".bin" WriteRegStr HKCR "$R0" "" $1
!insertmacro ${_action} ".cue" DeleteRegValue HKCR "$R0" "VLC.backup"
!insertmacro ${_action} ".m3u" NoOwn:
!insertmacro ${_action} ".pls" DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings
!insertmacro ${_action} ".vlc" DeleteRegKey HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations\VLC$R0" ; for vista
!macroend FunctionEnd
!macro MacroAllExtensions _action !macro RegisterExtensionSection EXT
!insertmacro MacroAudioExtensions ${_action} Section ${EXT}
!insertmacro MacroVideoExtensions ${_action} SectionIn 1 3
!insertmacro MacroOtherExtensions ${_action} Push $R0
!macroend StrCpy $R0 ${EXT}
Call RegisterExtension
;;;;;;;;;;;;;;;;;;;;;;;;;; Pop $R0
; File type associations ; SectionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;; !macroend
Function RegisterExtension !macro UnRegisterExtensionSection EXT
; back up old value for extension $R0 (eg. ".opt") Push $R0
ReadRegStr $1 HKCR "$R0" "" StrCpy $R0 ${EXT}
StrCmp $1 "" NoBackup Call un.RegisterExtension
StrCmp $1 "VLC$R0" "NoBackup" Pop $R0
WriteRegStr HKCR "$R0" "VLC.backup" $1 !macroend
NoBackup:
WriteRegStr HKCR "$R0" "" "VLC$R0" !macro WriteRegStrSupportedTypes EXT
ReadRegStr $0 HKCR "VLC$R0" "" WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""
WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)" !macroend
WriteRegStr HKCR "VLC$R0\shell" "" "Play"
WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' ; Extension lists Macros ;
; Those macros calls the previous functions ;
; Vista detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
StrCpy $R2 $R1 3 !macro MacroAudioExtensions _action
StrCmp $R2 '6.0' ForVista ToEnd !insertmacro ${_action} ".a52"
ForVista: !insertmacro ${_action} ".aac"
WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0" !insertmacro ${_action} ".ac3"
ToEnd: !insertmacro ${_action} ".dts"
!insertmacro ${_action} ".flac"
FunctionEnd !insertmacro ${_action} ".mka"
!insertmacro ${_action} ".mp1"
Function un.RegisterExtension !insertmacro ${_action} ".mp2"
;start of restore script !insertmacro ${_action} ".mp3"
ReadRegStr $1 HKCR "$R0" "" !insertmacro ${_action} ".ogg"
StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it !insertmacro ${_action} ".spx"
ReadRegStr $1 HKCR "$R0" "VLC.backup" !insertmacro ${_action} ".wav"
StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key !insertmacro ${_action} ".wma"
DeleteRegKey HKCR "$R0" !macroend
Goto NoOwn
Restore: !macro MacroVideoExtensions _action
WriteRegStr HKCR "$R0" "" $1 !insertmacro ${_action} ".asf"
DeleteRegValue HKCR "$R0" "VLC.backup" !insertmacro ${_action} ".avi"
NoOwn: !insertmacro ${_action} ".divx"
DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings !insertmacro ${_action} ".dv"
FunctionEnd !insertmacro ${_action} ".m1v"
!insertmacro ${_action} ".m2v"
!macro RegisterExtensionSection EXT !insertmacro ${_action} ".mkv"
Section ${EXT} !insertmacro ${_action} ".mov"
SectionIn 1 3 !insertmacro ${_action} ".mp4"
Push $R0 !insertmacro ${_action} ".mpeg"
StrCpy $R0 ${EXT} !insertmacro ${_action} ".mpeg1"
Call RegisterExtension !insertmacro ${_action} ".mpeg2"
Pop $R0 !insertmacro ${_action} ".mpeg4"
SectionEnd !insertmacro ${_action} ".mpg"
!macroend !insertmacro ${_action} ".mxf"
!insertmacro ${_action} ".ps"
!macro UnRegisterExtensionSection EXT !insertmacro ${_action} ".ts"
Push $R0 !insertmacro ${_action} ".ogm"
StrCpy $R0 ${EXT} !insertmacro ${_action} ".vob"
Call un.RegisterExtension !insertmacro ${_action} ".wmv"
Pop $R0 !macroend
!macroend
!macro MacroOtherExtensions _action
!macro WriteRegStrSupportedTypes EXT !insertmacro ${_action} ".asx"
WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} "" !insertmacro ${_action} ".bin"
!macroend !insertmacro ${_action} ".cue"
!insertmacro ${_action} ".m3u"
;;;;;;;;;;;;;;;;;;;;;;;; !insertmacro ${_action} ".pls"
; Context menu entries ; !insertmacro ${_action} ".vlc"
;;;;;;;;;;;;;;;;;;;;;;;; !macroend
!macro AddContextMenuExt EXT ; One macro to rule them all
WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player" !macro MacroAllExtensions _action
WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"' !insertmacro MacroAudioExtensions ${_action}
!insertmacro MacroVideoExtensions ${_action}
WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" "Add to VLC media player's Playlist" !insertmacro MacroOtherExtensions ${_action}
WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"' !macroend
!macroend
;;;;;;;;;;;;;;;;;;;;;;;;;;;
!macro AddContextMenu EXT ; 2. Context menu entries ;
Push $R0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
ReadRegStr $R0 HKCR ${EXT} ""
!insertmacro AddContextMenuExt $R0 ; Generic function for adding the context menu for one ext.
Pop $R0 !macro AddContextMenuExt EXT
!macroend WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player"
WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"'
!macro DeleteContextMenuExt EXT
DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" "Add to VLC media player's Playlist"
DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"'
!macroend !macroend
!macro DeleteContextMenu EXT !macro AddContextMenu EXT
Push $R0 Push $R0
ReadRegStr $R0 HKCR ${EXT} "" ReadRegStr $R0 HKCR ${EXT} ""
!insertmacro DeleteContextMenuExt $R0 !insertmacro AddContextMenuExt $R0
Pop $R0 Pop $R0
!macroend !macroend
;;;;;;;;;;;;;;;;;;;;;;;;;; !macro DeleteContextMenuExt EXT
; Delete prefs and cache ; DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
;;;;;;;;;;;;;;;;;;;;;;;;;; DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
!macroend
!macro delprefs
StrCpy $0 0 !macro DeleteContextMenu EXT
!define Index 'Line${__LINE__}' Push $R0
"${Index}-Loop:" ReadRegStr $R0 HKCR ${EXT} ""
; FIXME !insertmacro DeleteContextMenuExt $R0
; this will loop through all the logged users and "virtual" windows users Pop $R0
; (it looks like users are only present in HKEY_USERS when they are logged in) !macroend
ClearErrors
EnumRegKey $1 HKU "" $0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
StrCmp $1 "" "${Index}-End" ; 3. Delete prefs and cache ;
IntOp $0 $0 + 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
StrCmp $2 "" "${Index}-Loop" !macro delprefs
RMDir /r "$2\vlc" StrCpy $0 0
Goto "${Index}-Loop" !define Index 'Line${__LINE__}'
"${Index}-End:" "${Index}-Loop:"
!undef Index ; FIXME
!macroend ; this will loop through all the logged users and "virtual" windows users
; (it looks like users are only present in HKEY_USERS when they are logged in)
Var UninstallLog ClearErrors
EnumRegKey $1 HKU "" $0
!macro OpenUninstallLog StrCmp $1 "" "${Index}-End"
FileOpen $UninstallLog "$INSTDIR\uninstall.log" a IntOp $0 $0 + 1
FileSeek $UninstallLog 0 END ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
!macroend StrCmp $2 "" "${Index}-Loop"
RMDir /r "$2\vlc"
!macro CloseUninstallLog Goto "${Index}-Loop"
FileClose $UninstallLog "${Index}-End:"
SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN !undef Index
!macroend !macroend
!macro InstallFile FILEREGEX ;;;;;;;;;;;;;;;
File "${FILEREGEX}" ; 4. Logging ;
!define Index 'Line${__LINE__}' ;;;;;;;;;;;;;;;
FindFirst $0 $1 "$INSTDIR\${FILEREGEX}" Var UninstallLog
StrCmp $0 "" "${Index}-End" !macro OpenUninstallLog
"${Index}-Loop:" FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
StrCmp $1 "" "${Index}-End" FileSeek $UninstallLog 0 END
FileWrite $UninstallLog "$1$\r$\n" !macroend
FindNext $0 $1
Goto "${Index}-Loop" !macro CloseUninstallLog
"${Index}-End:" FileClose $UninstallLog
!undef Index SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
!macroend !macroend
!macro InstallFolder FOLDER ;;;;;;;;;;;;;;;;;;;;
File /r "${FOLDER}" ; 5. Installations ;
Push "${FOLDER}" ;;;;;;;;;;;;;;;;;;;;
Call InstallFolderInternal !macro InstallFile FILEREGEX
!macroend File "${FILEREGEX}"
!define Index 'Line${__LINE__}'
Function InstallFolderInternal FindFirst $0 $1 "$INSTDIR\${FILEREGEX}"
Pop $9 StrCmp $0 "" "${Index}-End"
!define Index 'Line${__LINE__}' "${Index}-Loop:"
FindFirst $0 $1 "$INSTDIR\$9\*" StrCmp $1 "" "${Index}-End"
StrCmp $0 "" "${Index}-End" FileWrite $UninstallLog "$1$\r$\n"
"${Index}-Loop:" FindNext $0 $1
StrCmp $1 "" "${Index}-End" Goto "${Index}-Loop"
StrCmp $1 "." "${Index}-Next" "${Index}-End:"
StrCmp $1 ".." "${Index}-Next" !undef Index
IfFileExists "$9\$1\*" 0 "${Index}-Write" !macroend
Push $0
Push $9 !macro InstallFolder FOLDER
Push "$9\$1" File /r "${FOLDER}"
Call InstallFolderInternal Push "${FOLDER}"
Pop $9 Call InstallFolderInternal
Pop $0 !macroend
Goto "${Index}-Next"
"${Index}-Write:" Function InstallFolderInternal
FileWrite $UninstallLog "$9\$1$\r$\n" Pop $9
"${Index}-Next:" !define Index 'Line${__LINE__}'
FindNext $0 $1 FindFirst $0 $1 "$INSTDIR\$9\*"
Goto "${Index}-Loop" StrCmp $0 "" "${Index}-End"
"${Index}-End:" "${Index}-Loop:"
!undef Index StrCmp $1 "" "${Index}-End"
FunctionEnd StrCmp $1 "." "${Index}-Next"
StrCmp $1 ".." "${Index}-Next"
IfFileExists "$9\$1\*" 0 "${Index}-Write"
;;;;;;;;;;;;;;;;;;;;;; Push $0
; Installer sections ; Push $9
;;;;;;;;;;;;;;;;;;;;;; Push "$9\$1"
Call InstallFolderInternal
Section "Media player (required)" SEC01 Pop $9
SectionIn 1 2 3 RO Pop $0
SetShellVarContext all Goto "${Index}-Next"
SetOutPath "$INSTDIR" "${Index}-Write:"
FileWrite $UninstallLog "$9\$1$\r$\n"
!insertmacro OpenUninstallLog "${Index}-Next:"
FindNext $0 $1
!insertmacro InstallFile vlc.exe Goto "${Index}-Loop"
!insertmacro InstallFile vlc.exe.manifest "${Index}-End:"
!ifdef LIBVLC_DLL !undef Index
!insertmacro InstallFile ${LIBVLC_DLL} FunctionEnd
!endif ;;; End of Macros
!ifdef LIBVLC_CONTROL_DLL
!insertmacro InstallFile ${LIBVLC_CONTROL_DLL}
!endif ;;;;;;;;;;;;;;;;;;;;;;
!insertmacro InstallFile *.txt ; Installer sections ;
; The CORE of the ;
!insertmacro InstallFolder plugins ; installer ;
!insertmacro InstallFolder locale ;;;;;;;;;;;;;;;;;;;;;;
!insertmacro InstallFolder osdmenu
!insertmacro InstallFolder skins Section "Media player (required)" SEC01
!insertmacro InstallFolder http SectionIn 1 2 3 RO
!insertmacro InstallFolder share SetShellVarContext all
SetOutPath "$INSTDIR"
WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
"${PRODUCT_WEB_SITE}" !insertmacro OpenUninstallLog
FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \ ; VLC.exe, libvlc.dll
"${PRODUCT_WEB_SITE}/doc/" !insertmacro InstallFile vlc.exe
FileWrite $UninstallLog "Documentation.url$\r$\n" !insertmacro InstallFile vlc.exe.manifest
!ifdef LIBVLC_DLL
!insertmacro CloseUninstallLog !insertmacro InstallFile ${LIBVLC_DLL}
!endif
; Add VLC to "recomended programs" for the following extensions !ifdef LIBVLC_CONTROL_DLL
WriteRegStr HKCR Applications\vlc.exe "" "" !insertmacro InstallFile ${LIBVLC_CONTROL_DLL}
WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player" !endif
WriteRegStr HKCR Applications\vlc.exe\shell\Play "" "Play with VLC"
WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \ ; Text files
'$INSTDIR\vlc.exe --started-from-file "%1"' !insertmacro InstallFile *.txt
!insertmacro MacroAllExtensions WriteRegStrSupportedTypes
; Subfolders
WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player" !insertmacro InstallFolder plugins
WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \ !insertmacro InstallFolder locale
"$INSTDIR\vlc.exe --started-from-file cdda:%1" !insertmacro InstallFolder osdmenu
WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player" !insertmacro InstallFolder skins
WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \ !insertmacro InstallFolder http
"$INSTDIR\vlc.exe --started-from-file dvd:%1" !insertmacro InstallFolder share
;!insertmacro InstallFolder scripts
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" "Play DVD movie" ; URLs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0' WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie" "${PRODUCT_WEB_SITE}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play" FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player" WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
"${PRODUCT_WEB_SITE}/doc/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" "" FileWrite $UninstallLog "Documentation.url$\r$\n"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio" WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0' "${PRODUCT_WEB_SITE}/vlc/skins.php"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio" FileWrite $UninstallLog "New_Skins.url$\r$\n"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player" !insertmacro CloseUninstallLog
WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Play" ; Add VLC to "recomended programs" for the following extensions
WriteRegStr HKCR "VLC.DVDMovie\shell\Play\command" "" \ WriteRegStr HKCR Applications\vlc.exe "" ""
'$INSTDIR\vlc.exe --started-from-file dvd:%1' WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' WriteRegStr HKCR Applications\vlc.exe\shell\Play "" "Play with VLC"
WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio" WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \
WriteRegStr HKCR "VLC.CDAudio\shell" "" "Play" '$INSTDIR\vlc.exe --started-from-file "%1"'
WriteRegStr HKCR "VLC.CDAudio\shell\Play\command" "" \ !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
'$INSTDIR\vlc.exe --started-from-file cdda:%1'
WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' ; Vista Registration
; Vista detection
; Vista detection ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion StrCpy $R1 $R0 3
StrCpy $R1 $R0 3 StrCmp $R1 '6.0' lbl_vista lbl_done
StrCmp $R1 '6.0' lbl_vista lbl_done
lbl_vista:
lbl_vista: WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities" WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player" WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
lbl_done:
lbl_done: SectionEnd
SectionEnd Section "Start Menu Shortcut" SEC02a
SectionIn 1 2 3
Section "Start Menu Shortcut" SEC02a CreateDirectory "$SMPROGRAMS\VideoLAN"
SectionIn 1 2 3 CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings"
CreateDirectory "$SMPROGRAMS\VideoLAN" CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Audio"
CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings" CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to DirectX (default).lnk" \
CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Audio" "$INSTDIR\vlc.exe" "--aout aout_directx --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to DirectX (default).lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to Waveout.lnk" \
"$INSTDIR\vlc.exe" "--aout aout_directx --save-config vlc:quit" "$INSTDIR\vlc.exe" "--aout waveout --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to Waveout.lnk" \ CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Interface"
"$INSTDIR\vlc.exe" "--aout waveout --save-config vlc:quit" CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Skinnable.lnk" \
CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Interface" "$INSTDIR\vlc.exe" "-I skins --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Skinnable.lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to wxWidgets (default).lnk" \
"$INSTDIR\vlc.exe" "-I skins --save-config vlc:quit" "$INSTDIR\vlc.exe" "-I wxwin --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to wxWidgets (default).lnk" \ CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Video"
"$INSTDIR\vlc.exe" "-I wxwin --save-config vlc:quit" ; FIXME add detection for Vista. Direct3D will be default there, for all others it's DirectX
CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Video" CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D.lnk" \
; FIXME add detection for Vista. Direct3D will be default there, for all others it's DirectX "$INSTDIR\vlc.exe" "--vout direct3d --overlay --directx-hw-yuv --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D.lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D (no hardware acceleration).lnk" \
"$INSTDIR\vlc.exe" "--vout direct3d --overlay --directx-hw-yuv --save-config vlc:quit" "$INSTDIR\vlc.exe" "--vout direct3d --overlay --no-directx-hw-yuv --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D (no hardware acceleration).lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX.lnk" \
"$INSTDIR\vlc.exe" "--vout direct3d --overlay --no-directx-hw-yuv --save-config vlc:quit" "$INSTDIR\vlc.exe" "--vout directx --overlay --directx-hw-yuv --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX.lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no hardware acceleration).lnk" \
"$INSTDIR\vlc.exe" "--vout directx --overlay --directx-hw-yuv --save-config vlc:quit" "$INSTDIR\vlc.exe" "--vout directx --no-overlay --no-directx-hw-yuv --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no hardware acceleration).lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no video overlay).lnk" \
"$INSTDIR\vlc.exe" "--vout directx --no-overlay --no-directx-hw-yuv --save-config vlc:quit" "$INSTDIR\vlc.exe" "--vout directx --no-overlay --directx-hw-yuv --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no video overlay).lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to OpenGL.lnk" \
"$INSTDIR\vlc.exe" "--vout directx --no-overlay --directx-hw-yuv --save-config vlc:quit" "$INSTDIR\vlc.exe" "--vout opengl --overlay --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to OpenGL.lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Reset VLC media player preferences and cache files.lnk" \
"$INSTDIR\vlc.exe" "--vout opengl --overlay --save-config vlc:quit" "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache --save-config vlc:quit"
CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Reset VLC media player preferences and cache files.lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
"$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache --save-config vlc:quit" "$INSTDIR\Documentation.url"
CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
"$INSTDIR\Documentation.url" "$INSTDIR\NEWS.txt" ""
CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
"$INSTDIR\NEWS.txt" "" "$INSTDIR\${PRODUCT_GROUP} Website.url"
CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \ CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
"$INSTDIR\${PRODUCT_GROUP} Website.url" "$INSTDIR\vlc.exe" ""
CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \ SectionEnd
"$INSTDIR\vlc.exe" ""
SectionEnd Section "Desktop Shortcut" SEC02b
SectionIn 1 2 3
Section "Desktop Shortcut" SEC02b CreateShortCut "$DESKTOP\VLC media player.lnk" \
SectionIn 1 2 3 "$INSTDIR\vlc.exe" ""
CreateShortCut "$DESKTOP\VLC media player.lnk" \ SectionEnd
"$INSTDIR\vlc.exe" ""
SectionEnd Section /o "Mozilla plugin" SEC03
SectionIn 3
Section /o "Mozilla plugin" SEC03
SectionIn 3 SetOutPath "$INSTDIR"
!insertmacro OpenUninstallLog
SetOutPath "$INSTDIR" !insertmacro InstallFile mozilla\npvlc.dll
!insertmacro OpenUninstallLog !insertmacro CloseUninstallLog
!insertmacro InstallFile mozilla\npvlc.dll
!insertmacro CloseUninstallLog !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
!define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}" WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin" WriteRegStr HKLM ${Moz} "Product" "VLC media player"
WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll" WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
WriteRegStr HKLM ${Moz} "Product" "VLC media player" WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
WriteRegStr HKLM ${Moz} "Version" "${VERSION}" ; for very old version of mozilla, these lines may be needed
;Push $R0
; for very old version of mozilla, these lines may be needed ;Push $R1
;Push $R0 ;Push $R2
;Push $R1
;Push $R2 ;!define Index 'Line${__LINE__}'
;StrCpy $R1 "0"
;!define Index 'Line${__LINE__}'
;StrCpy $R1 "0" ;"${Index}-Loop:"
;"${Index}-Loop:" ; ; Check for Key
; EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
; ; Check for Key ; StrCmp $R0 "" "${Index}-End"
; EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1" ; IntOp $R1 $R1 + 1
; StrCmp $R0 "" "${Index}-End" ; ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
; IntOp $R1 $R1 + 1 ; StrCmp $R2 "" "${Index}-Loop" ""
; ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
; StrCmp $R2 "" "${Index}-Loop" "" ; CopyFiles "$INSTDIR\npvlc.dll" "$R2"
; !ifdef LIBVLC_DLL
; CopyFiles "$INSTDIR\npvlc.dll" "$R2" ; CopyFiles ${LIBVLC_DLL} "$R2"
; !ifdef LIBVLC_DLL ; !endif
; CopyFiles ${LIBVLC_DLL} "$R2" ; !ifdef LIBVLC_CONTROL_DLL
; !endif ; CopyFiles ${LIBVLC_CONTROL_DLL} "$R2"
; !ifdef LIBVLC_CONTROL_DLL ; !endif
; CopyFiles ${LIBVLC_CONTROL_DLL} "$R2" ; Goto "${Index}-Loop"
; !endif
; Goto "${Index}-Loop" ;"${Index}-End:"
;!undef Index
;"${Index}-End:"
;!undef Index SectionEnd
SectionEnd Section "ActiveX plugin" SEC04
SectionIn 1 3
Section "ActiveX plugin" SEC04 SetOutPath "$INSTDIR"
SectionIn 1 3 !insertmacro OpenUninstallLog
SetOutPath "$INSTDIR" !insertmacro InstallFile activex\axvlc.dll
!insertmacro OpenUninstallLog !insertmacro CloseUninstallLog
!insertmacro InstallFile activex\axvlc.dll RegDLL "$INSTDIR\axvlc.dll"
!insertmacro CloseUninstallLog SectionEnd
RegDLL "$INSTDIR\axvlc.dll"
SectionEnd Section "Discs Playback" SEC05
SectionIn 1 2 3
SectionGroup "File type associations" SEC06 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player"
SectionGroup "Audio Files" WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
!insertmacro MacroAudioExtensions RegisterExtensionSection "$INSTDIR\vlc.exe --started-from-file cdda:%1"
SectionGroupEnd WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player"
SectionGroup "Video Files" WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
!insertmacro MacroVideoExtensions RegisterExtensionSection "$INSTDIR\vlc.exe --started-from-file dvd:%1"
SectionGroupEnd
SectionGroup "Other" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
!insertmacro MacroOtherExtensions RegisterExtensionSection WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" "Play DVD movie"
SectionGroupEnd WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
SectionGroupEnd WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"
Section /o "Context Menus" SEC05 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
SectionIn 3
!insertmacro MacroAllExtensions AddContextMenu WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
!insertmacro AddContextMenuExt "Directory" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio"
SectionEnd WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
Section /o "Delete preferences and cache" SEC07 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"
!insertmacro delprefs WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
SectionEnd WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Play"
; Installer section descriptions WriteRegStr HKCR "VLC.DVDMovie\shell\Play\command" "" \
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN '$INSTDIR\vlc.exe --started-from-file dvd:%1'
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} \ WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
"The media player itself" WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} \ WriteRegStr HKCR "VLC.CDAudio\shell" "" "Play"
"Adds icons to your start menu for easy access" WriteRegStr HKCR "VLC.CDAudio\shell\Play\command" "" \
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} \ '$INSTDIR\vlc.exe --started-from-file cdda:%1'
"Adds icon to your desktop for easy access" WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} \
"The VLC Mozilla and Mozilla Firefox plugin" SectionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \
"The VLC ActiveX plugin" SectionGroup "File type associations" SEC06
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \ SectionGroup "Audio Files"
"Add context menu items ('Play With VLC' and 'Add To VLC's Playlist')" !insertmacro MacroAudioExtensions RegisterExtensionSection
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} \ SectionGroupEnd
"Sets VLC media player as the default application for the specified file type" SectionGroup "Video Files"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} \ !insertmacro MacroVideoExtensions RegisterExtensionSection
"Deletes VLC media player preferences and cache files leftover from previous installations" SectionGroupEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_END SectionGroup "Other"
!insertmacro MacroOtherExtensions RegisterExtensionSection
Function .onInit SectionGroupEnd
ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \ SectionGroupEnd
"UninstallString"
StrCmp $R0 "" done Section "Context Menus" SEC07
SectionIn 3
MessageBox MB_YESNO|MB_ICONEXCLAMATION \ !insertmacro MacroAllExtensions AddContextMenu
"VLC media player has already been installed. $\nDo you want to remove \ !insertmacro AddContextMenuExt "Directory"
the previous version before installing $(^Name) ?" \ SectionEnd
IDNO done
Section /o "Delete preferences and cache" SEC08
;Run the uninstaller !insertmacro delprefs
;uninst: SectionEnd
ClearErrors
ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file ; Installer section descriptions
done: !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_LANGDLL_DISPLAY !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} \
"The media player itself"
;Win98 detection !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} \
ReadRegStr $R0 HKLM \ "Adds icons to your start menu for easy access"
"SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} \
StrCmp $R0 '4.9' lbl_win98 "Adds icon to your desktop for easy access"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} \
lbl_win98: "The VLC Mozilla and Mozilla Firefox plugin"
MessageBox MB_OK|MB_ICONQUESTION "Windows 98 ! Remember to install MSLU" IDOK !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \
"The VLC ActiveX plugin"
FunctionEnd !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \
"DVD and CD playback registration"
Section -Post !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} \
WriteUninstaller "$INSTDIR\uninstall.exe" "Sets VLC media player as the default application for the specified file type"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} \
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}" "Add context menu items ('Play With VLC' and 'Add To VLC's Playlist')"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe" !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} \
"Deletes VLC media player preferences and cache files leftover from previous installations"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \ !insertmacro MUI_FUNCTION_DESCRIPTION_END
"DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \ ;;; Start function
"UninstallString" "$INSTDIR\uninstall.exe" Function .onInit
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \ ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
"DisplayIcon" "$INSTDIR\vlc.exe" "UninstallString"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \ StrCmp $R0 "" done
"DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \ MessageBox MB_YESNO|MB_ICONEXCLAMATION \
"URLInfoAbout" "${PRODUCT_WEB_SITE}" "VLC media player has already been installed. $\nDo you want to remove \
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \ the previous version before installing $(^Name) ?" \
"Publisher" "${PRODUCT_PUBLISHER}" IDNO done
SectionEnd
;Run the uninstaller
;;;;;;;;;;;;;;;;;;;;;;;; ;uninst:
; Uninstaller sections ; ClearErrors
;;;;;;;;;;;;;;;;;;;;;;;; ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
done:
; TrimNewlines (copied from NSIS documentation) !insertmacro MUI_LANGDLL_DISPLAY
; input, top of stack (e.g. whatever$\r$\n)
; output, top of stack (replaces, with e.g. whatever) ;Win98 detection
; modifies no other variables. ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
StrCmp $R0 "4.9" lbl_win98
Function un.TrimNewlines
Exch $R0 lbl_win98:
Push $R1 MessageBox MB_OK|MB_ICONQUESTION "Windows 98 ! Remember to install MSLU" IDOK
Push $R2
StrCpy $R1 0 FunctionEnd
loop: ;; End function
IntOp $R1 $R1 - 1 Section -Post
StrCpy $R2 $R0 1 $R1 WriteUninstaller "$INSTDIR\uninstall.exe"
StrCmp $R2 "$\r" loop WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
StrCmp $R2 "$\n" loop WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
IntOp $R1 $R1 + 1 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
IntCmp $R1 0 no_trim_needed
StrCpy $R0 $R0 $R1 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
"DisplayName" "$(^Name)"
no_trim_needed: WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
Pop $R2 "UninstallString" "$INSTDIR\uninstall.exe"
Pop $R1 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
Exch $R0 "DisplayIcon" "$INSTDIR\vlc.exe"
FunctionEnd WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
"DisplayVersion" "${PRODUCT_VERSION}"
Function un.RemoveEmptyDirs WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
Pop $9 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
!define Index 'Line${__LINE__}' WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
FindFirst $0 $1 "$INSTDIR$9*" "Publisher" "${PRODUCT_PUBLISHER}"
StrCmp $0 "" "${Index}-End" SectionEnd
"${Index}-Loop:"
StrCmp $1 "" "${Index}-End" ;;;;;;;;;;;;;;;;;;;;;;;;
StrCmp $1 "." "${Index}-Next" ; Uninstaller sections ;
StrCmp $1 ".." "${Index}-Next" ;;;;;;;;;;;;;;;;;;;;;;;;
Push $0
Push $1 ; TrimNewlines (copied from NSIS documentation)
Push $9 ; input, top of stack (e.g. whatever$\r$\n)
Push "$9$1\" ; output, top of stack (replaces, with e.g. whatever)
Call un.RemoveEmptyDirs ; modifies no other variables.
Pop $9
Pop $1 Function un.TrimNewlines
Pop $0 Exch $R0
"${Index}-Remove:" Push $R1
RMDir "$INSTDIR$9$1" Push $R2
"${Index}-Next:" StrCpy $R1 0
FindNext $0 $1
Goto "${Index}-Loop" loop:
"${Index}-End:" IntOp $R1 $R1 - 1
FindClose $0 StrCpy $R2 $R0 1 $R1
!undef Index StrCmp $R2 "$\r" loop
FunctionEnd StrCmp $R2 "$\n" loop
IntOp $R1 $R1 + 1
Section "Uninstall" SEC91 IntCmp $R1 0 no_trim_needed
SectionIn 1 2 3 RO StrCpy $R0 $R0 $R1
SetShellVarContext all
no_trim_needed:
!insertmacro MacroAllExtensions DeleteContextMenu Pop $R2
!insertmacro MacroAllExtensions UnRegisterExtensionSection Pop $R1
!insertmacro DeleteContextMenuExt "Directory" Exch $R0
FunctionEnd
;remove activex plugin
UnRegDLL "$INSTDIR\axvlc.dll" Function un.RemoveEmptyDirs
Delete /REBOOTOK "$INSTDIR\axvlc.dll" Pop $9
!define Index 'Line${__LINE__}'
;remove mozilla plugin FindFirst $0 $1 "$INSTDIR$9*"
Push $R0 StrCmp $0 "" "${Index}-End"
Push $R1 "${Index}-Loop:"
Push $R2 StrCmp $1 "" "${Index}-End"
StrCmp $1 "." "${Index}-Next"
!define Index 'Line${__LINE__}' StrCmp $1 ".." "${Index}-Next"
StrCpy $R1 "0" Push $0
Push $1
"${Index}-Loop:" Push $9
Push "$9$1\"
; Check for Key Call un.RemoveEmptyDirs
EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1" Pop $9
StrCmp $R0 "" "${Index}-End" Pop $1
IntOp $R1 $R1 + 1 Pop $0
ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins" "${Index}-Remove:"
StrCmp $R2 "" "${Index}-Loop" "" RMDir "$INSTDIR$9$1"
"${Index}-Next:"
; old files (0.8.5 and before) that may be lying around FindNext $0 $1
Delete /REBOOTOK "$R2\npvlc.dll" Goto "${Index}-Loop"
Delete /REBOOTOK "$R2\libvlc.dll" "${Index}-End:"
Delete /REBOOTOK "$R2\vlcintf.xpt" FindClose $0
Goto "${Index}-Loop" !undef Index
FunctionEnd
"${Index}-End:"
!undef Index Section "Uninstall" SEC91
Delete /REBOOTOK "$INSTDIR\npvlc.dll" SectionIn 1 2 3 RO
SetShellVarContext all
RMDir "$SMPROGRAMS\VideoLAN"
RMDir /r $SMPROGRAMS\VideoLAN !insertmacro MacroAllExtensions DeleteContextMenu
!insertmacro MacroAllExtensions UnRegisterExtensionSection
FileOpen $UninstallLog "$INSTDIR\uninstall.log" r !insertmacro DeleteContextMenuExt "Directory"
UninstallLoop:
ClearErrors ;remove activex plugin
FileRead $UninstallLog $R0 UnRegDLL "$INSTDIR\axvlc.dll"
IfErrors UninstallEnd Delete /REBOOTOK "$INSTDIR\axvlc.dll"
Push $R0
Call un.TrimNewLines ;remove mozilla plugin
Pop $R0 Push $R0
Delete "$INSTDIR\$R0" Push $R1
Goto UninstallLoop Push $R2
UninstallEnd:
FileClose $UninstallLog !define Index 'Line${__LINE__}'
Delete "$INSTDIR\uninstall.log" StrCpy $R1 "0"
Delete "$INSTDIR\uninstall.exe"
Push "\" "${Index}-Loop:"
Call un.RemoveEmptyDirs
RMDir "$INSTDIR" ; Check for Key
EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
DeleteRegKey HKLM Software\VideoLAN StrCmp $R0 "" "${Index}-End"
IntOp $R1 $R1 + 1
DeleteRegKey HKCR Applications\vlc.exe ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
DeleteRegKey HKCR AudioCD\shell\PlayWithVLC StrCmp $R2 "" "${Index}-Loop" ""
DeleteRegKey HKCR DVD\shell\PlayWithVLC
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ; old files (0.8.5 and before) that may be lying around
DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival Delete /REBOOTOK "$R2\npvlc.dll"
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" Delete /REBOOTOK "$R2\libvlc.dll"
DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival Delete /REBOOTOK "$R2\vlcintf.xpt"
DeleteRegKey HKLM Software\Clients\Media\VLC Goto "${Index}-Loop"
DeleteRegKey HKCR "VLC.MediaFile"
"${Index}-End:"
DeleteRegKey HKLM \ !undef Index
"SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}" Delete /REBOOTOK "$INSTDIR\npvlc.dll"
DeleteRegKey HKLM \ RMDir "$SMPROGRAMS\VideoLAN"
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" RMDir /r $SMPROGRAMS\VideoLAN
Delete "$DESKTOP\VLC media player.lnk" FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
UninstallLoop:
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" ClearErrors
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" FileRead $UninstallLog $R0
SetAutoClose true IfErrors UninstallEnd
SectionEnd Push $R0
Call un.TrimNewLines
Section /o "un.Delete preferences and cache" SEC92 Pop $R0
!insertmacro delprefs Delete "$INSTDIR\$R0"
SectionEnd Goto UninstallLoop
UninstallEnd:
; Uninstaller section descriptions FileClose $UninstallLog
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN Delete "$INSTDIR\uninstall.log"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC91} \ Delete "$INSTDIR\uninstall.exe"
"Uninstall VLC media player and all its components" Push "\"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC92} \ Call un.RemoveEmptyDirs
"Deletes VLC media player preferences and cache files" RMDir "$INSTDIR"
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
DeleteRegKey HKLM Software\VideoLAN
;Function un.onUninstSuccess
; HideWindow DeleteRegKey HKCR Applications\vlc.exe
; MessageBox MB_ICONINFORMATION|MB_OK \ DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
; "$(^Name) was successfully removed from your computer." DeleteRegKey HKCR DVD\shell\PlayWithVLC
;FunctionEnd DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
Function un.onInit DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
!insertmacro MUI_UNGETLANGUAGE DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
FunctionEnd DeleteRegKey HKLM Software\Clients\Media\VLC
DeleteRegKey HKCR "VLC.MediaFile"
DeleteRegKey HKLM \
"SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
DeleteRegKey HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
Delete "$DESKTOP\VLC media player.lnk"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd
Section /o "un.Delete preferences and cache" SEC92
!insertmacro delprefs
SectionEnd
; Uninstaller section descriptions
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SEC91} \
"Uninstall VLC media player and all its components"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC92} \
"Deletes VLC media player preferences and cache files"
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
;Function un.onUninstSuccess
; HideWindow
; MessageBox MB_ICONINFORMATION|MB_OK \
; "$(^Name) was successfully removed from your computer."
;FunctionEnd
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment