X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=vlc.win32.nsi.in;h=808aded84c4e3f73849ae1d868174b308d28f3d8;hb=aaf50f16cfb838418703d90ee3e62bd0e649b978;hp=51f2f416718c8d867c060104b3eac340d67db500;hpb=74a92012bbc633466d2a8ffc15cce297b4c2acf0;p=vlc diff --git a/vlc.win32.nsi.in b/vlc.win32.nsi.in index 51f2f41671..808aded84c 100644 --- a/vlc.win32.nsi.in +++ b/vlc.win32.nsi.in @@ -13,6 +13,13 @@ !define PRODUCT_UNINST_ROOT_KEY "HKLM" !define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}" +!define MUI_LANGDLL_REGISTRY_ROOT "HKLM" +!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_DIR_REGKEY}" +!define MUI_LANGDLL_REGISTRY_VALUENAME "Language" + +@FILE_LIBVLC_DLL@ +@FILE_LIBVLC_CONTROL_DLL@ + ;;;;;;;;;;;;;;;;;;;;;;;;; ; General configuration ; ;;;;;;;;;;;;;;;;;;;;;;;;; @@ -31,7 +38,8 @@ SetCompressor /SOLID lzma SetOverwrite ifnewer CRCCheck on -InstType "Normal" +InstType "Recommended" +InstType "Minimum" InstType "Full" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -93,6 +101,7 @@ InstType "Full" !insertmacro MUI_LANGUAGE "Russian" !insertmacro MUI_LANGUAGE "Portuguese" !insertmacro MUI_LANGUAGE "Arabic" + !insertmacro MUI_LANGUAGE "Polish" !insertmacro MUI_RESERVEFILE_LANGDLL @@ -136,6 +145,7 @@ InstType "Full" !insertmacro ${_action} ".mpeg2" !insertmacro ${_action} ".mpeg4" !insertmacro ${_action} ".mpg" + !insertmacro ${_action} ".mxf" !insertmacro ${_action} ".ps" !insertmacro ${_action} ".ts" !insertmacro ${_action} ".ogm" @@ -171,9 +181,9 @@ Function RegisterExtension NoBackup: WriteRegStr HKCR "$R0" "" "VLC$R0" ReadRegStr $0 HKCR "VLC$R0" "" - WriteRegStr HKCR "VLC$R0" "" "VLC media file" + WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)" WriteRegStr HKCR "VLC$R0\shell" "" "Play" - WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --one-instance-when-started-from-file "%1"' + WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"' WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' FunctionEnd @@ -193,8 +203,8 @@ NoOwn: FunctionEnd !macro RegisterExtensionSection EXT - Section /o ${EXT} - SectionIn 2 3 + Section ${EXT} + SectionIn 1 3 Push $R0 StrCpy $R0 ${EXT} Call RegisterExtension @@ -217,25 +227,38 @@ FunctionEnd ; Context menu entries ; ;;;;;;;;;;;;;;;;;;;;;;;; -!macro AddContextMenu EXT +!macro AddContextMenuExt EXT WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player" - WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --one-instance-when-started-from-file --no-playlist-enqueue "%1"' + WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"' WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" "Add to VLC media player's Playlist" - WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --one-instance-when-started-from-file --playlist-enqueue "%1"' + WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"' !macroend -!macro DeleteContextMenu EXT +!macro AddContextMenu EXT + Push $R0 + ReadRegStr $R0 HKCR ${EXT} "" + !insertmacro AddContextMenuExt $R0 + Pop $R0 +!macroend + +!macro DeleteContextMenuExt EXT DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC !macroend +!macro DeleteContextMenu EXT + Push $R0 + ReadRegStr $R0 HKCR ${EXT} "" + !insertmacro DeleteContextMenuExt $R0 + Pop $R0 +!macroend + ;;;;;;;;;;;;;;;;;;;;;;;;;; ; Delete prefs and cache ; ;;;;;;;;;;;;;;;;;;;;;;;;;; !macro delprefs - SectionIn 2 3 StrCpy $0 0 !define Index 'Line${__LINE__}' "${Index}-Loop:" @@ -256,6 +279,16 @@ FunctionEnd Var UninstallLog +!macro OpenUninstallLog + FileOpen $UninstallLog "$INSTDIR\uninstall.log" a + FileSeek $UninstallLog 0 END +!macroend + +!macro CloseUninstallLog + FileClose $UninstallLog + SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN +!macroend + !macro InstallFile FILEREGEX File "${FILEREGEX}" !define Index 'Line${__LINE__}' @@ -312,12 +345,16 @@ Section "Media player (required)" SEC01 SetShellVarContext all SetOutPath "$INSTDIR" - FileOpen $UninstallLog "$INSTDIR\uninstall.log" w - FileSeek $UninstallLog 0 END + !insertmacro OpenUninstallLog !insertmacro InstallFile vlc.exe !insertmacro InstallFile vlc.exe.manifest - @FILE_LIBVLC_DLL@ + !ifdef LIBVLC_DLL + !insertmacro InstallFile ${LIBVLC_DLL} + !endif + !ifdef LIBVLC_CONTROL_DLL + !insertmacro InstallFile ${LIBVLC_CONTROL_DLL} + !endif !insertmacro InstallFile *.txt !insertmacro InstallFolder plugins @@ -326,30 +363,29 @@ Section "Media player (required)" SEC01 !insertmacro InstallFolder skins !insertmacro InstallFolder http - WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" \ + WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \ "${PRODUCT_WEB_SITE}" - FileWrite $UninstallLog "${PRODUCT_NAME}.url$\r$\n" + FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n" WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \ "${PRODUCT_WEB_SITE}/doc/" FileWrite $UninstallLog "Documentation.url$\r$\n" - FileClose $UninstallLog - SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN + !insertmacro CloseUninstallLog ; Add VLC to "recomended programs" for the following extensions WriteRegStr HKCR Applications\vlc.exe "" "" WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player" WriteRegStr HKCR Applications\vlc.exe\shell\Play "" "Play with VLC" WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \ - '$INSTDIR\vlc.exe --one-instance-when-started-from-file "%1"' + '$INSTDIR\vlc.exe --started-from-file "%1"' !insertmacro MacroAllExtensions WriteRegStrSupportedTypes WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player" WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \ - "$INSTDIR\vlc.exe --one-instance-when-started-from-file cdda:%1" + "$INSTDIR\vlc.exe --started-from-file cdda:%1" WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player" WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \ - "$INSTDIR\vlc.exe --one-instance-when-started-from-file dvd:%1" + "$INSTDIR\vlc.exe --started-from-file dvd:%1" 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" @@ -360,19 +396,19 @@ Section "Media player (required)" SEC01 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" "" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe --one-instance-when-started-from-file",0' + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe --started-from-file",0' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio" 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" WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie" WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Play" WriteRegStr HKCR "VLC.DVDMovie\shell\Play\command" "" \ - '$INSTDIR\vlc.exe --one-instance-when-started-from-file dvd:%1' + '$INSTDIR\vlc.exe --started-from-file dvd:%1' WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio" WriteRegStr HKCR "VLC.CDAudio\shell" "" "Play" WriteRegStr HKCR "VLC.CDAudio\shell\Play\command" "" \ - '$INSTDIR\vlc.exe --one-instance-when-started-from-file cdda:%1' + '$INSTDIR\vlc.exe --started-from-file cdda:%1' WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' SectionEnd @@ -380,77 +416,104 @@ SectionEnd Section "Start Menu Shortcut" SEC02a SectionIn 1 2 3 CreateDirectory "$SMPROGRAMS\VideoLAN" - CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \ - "$INSTDIR\vlc.exe" "--intf wx --wx-embed" - CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (alt).lnk" \ - "$INSTDIR\vlc.exe" "--intf wx --no-wx-embed" - CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (skins).lnk" \ - "$INSTDIR\vlc.exe" "--intf skins" - CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC defaults and quit.lnk" \ - "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache --save-config vlc:quit " - CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_NAME} Website.lnk" \ - "$INSTDIR\${PRODUCT_NAME}.url" + CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings" + CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Audio" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to DirectX (default).lnk" \ + "$INSTDIR\vlc.exe" "--aout aout_directx --save-config vlc:quit" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to Waveout.lnk" \ + "$INSTDIR\vlc.exe" "--aout waveout --save-config vlc:quit" + CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Interface" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Skinnable.lnk" \ + "$INSTDIR\vlc.exe" "-I skins --save-config vlc:quit" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to wxWidgets (default).lnk" \ + "$INSTDIR\vlc.exe" "-I wxwin --save-config vlc:quit" + CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Video" + ; FIXME add detection for Vista. Direct3D will be default there, for all others it's DirectX + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D.lnk" \ + "$INSTDIR\vlc.exe" "--vout direct3d --overlay --directx-hw-yuv --save-config vlc:quit" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D (no hardware acceleration).lnk" \ + "$INSTDIR\vlc.exe" "--vout direct3d --overlay --no-directx-hw-yuv --save-config vlc:quit" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX.lnk" \ + "$INSTDIR\vlc.exe" "--vout directx --overlay --directx-hw-yuv --save-config vlc:quit" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no hardware acceleration).lnk" \ + "$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 video overlay).lnk" \ + "$INSTDIR\vlc.exe" "--vout directx --no-overlay --directx-hw-yuv --save-config vlc:quit" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to OpenGL.lnk" \ + "$INSTDIR\vlc.exe" "--vout opengl --overlay --save-config vlc:quit" + CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Reset VLC media player preferences and cache files.lnk" \ + "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache --save-config vlc:quit" CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \ "$INSTDIR\Documentation.url" + CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \ + "$INSTDIR\NEWS.txt" "" + CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \ + "$INSTDIR\${PRODUCT_GROUP} Website.url" + CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \ + "$INSTDIR\vlc.exe" "" SectionEnd Section "Desktop Shortcut" SEC02b SectionIn 1 2 3 CreateShortCut "$DESKTOP\VLC media player.lnk" \ - "$INSTDIR\vlc.exe" "--intf wx" + "$INSTDIR\vlc.exe" "" SectionEnd Section /o "Mozilla plugin" SEC03 - SectionIn 2 3 - File /r mozilla - - ; doesn't work. bug in mozilla/mozilla firefox or moz documentation (xpt file isn't loaded) - ; see mozilla bugs 184506 and 159445 - ;!define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}" - ;WriteRegStr HKLM ${Moz} "Description" "VideoLAN VLC plugin for Mozilla" - ;WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\mozilla\npvlc.dll" - ;WriteRegStr HKLM ${Moz} "Product" "VLC media player" - ;WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN" - ;WriteRegStr HKLM ${Moz} "Version" "${VERSION}" - ;WriteRegStr HKLM ${Moz} "XPTPath" "$INSTDIR\mozilla\vlcintf.xpt" - - Push $R0 - Push $R1 - Push $R2 - - !define Index 'Line${__LINE__}' - StrCpy $R1 "0" - - "${Index}-Loop:" + SectionIn 3 - ; Check for Key - EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1" - StrCmp $R0 "" "${Index}-End" - IntOp $R1 $R1 + 1 - ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins" - StrCmp $R2 "" "${Index}-Loop" "" - - CopyFiles "$INSTDIR\mozilla\*" "$R2" - Goto "${Index}-Loop" - - "${Index}-End:" - !undef Index + SetOutPath "$INSTDIR" + !insertmacro OpenUninstallLog + !insertmacro InstallFile mozilla\npvlc.dll + !insertmacro CloseUninstallLog + + !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}" + WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin" + WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll" + WriteRegStr HKLM ${Moz} "Product" "VLC media player" + WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN" + WriteRegStr HKLM ${Moz} "Version" "${VERSION}" + + ; for very old version of mozilla, these lines may be needed + ;Push $R0 + ;Push $R1 + ;Push $R2 + + ;!define Index 'Line${__LINE__}' + ;StrCpy $R1 "0" + + ;"${Index}-Loop:" + + ; ; Check for Key + ; EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1" + ; StrCmp $R0 "" "${Index}-End" + ; IntOp $R1 $R1 + 1 + ; ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins" + ; StrCmp $R2 "" "${Index}-Loop" "" + + ; CopyFiles "$INSTDIR\npvlc.dll" "$R2" + ; !ifdef LIBVLC_DLL + ; CopyFiles ${LIBVLC_DLL} "$R2" + ; !endif + ; !ifdef LIBVLC_CONTROL_DLL + ; CopyFiles ${LIBVLC_CONTROL_DLL} "$R2" + ; !endif + ; Goto "${Index}-Loop" + + ;"${Index}-End:" + ;!undef Index SectionEnd Section "ActiveX plugin" SEC04 - SectionIn 2 3 + SectionIn 1 3 SetOutPath "$INSTDIR" - File activex\axvlc.dll + !insertmacro OpenUninstallLog + !insertmacro InstallFile activex\axvlc.dll + !insertmacro CloseUninstallLog RegDLL "$INSTDIR\axvlc.dll" SectionEnd -Section "Context Menus" SEC05 - SectionIn 2 - !insertmacro MacroAllExtensions AddContextMenu - !insertmacro AddContextMenu "Directory" -SectionEnd - SectionGroup "File type associations" SEC06 SectionGroup "Audio Files" !insertmacro MacroAudioExtensions RegisterExtensionSection @@ -463,6 +526,12 @@ SectionGroup "File type associations" SEC06 SectionGroupEnd SectionGroupEnd +Section /o "Context Menus" SEC05 + SectionIn 3 + !insertmacro MacroAllExtensions AddContextMenu + !insertmacro AddContextMenuExt "Directory" +SectionEnd + Section /o "Delete preferences and cache" SEC07 !insertmacro delprefs SectionEnd @@ -588,8 +657,9 @@ Section "Uninstall" SEC91 !insertmacro MacroAllExtensions DeleteContextMenu !insertmacro MacroAllExtensions UnRegisterExtensionSection - !insertmacro DeleteContextMenu "Directory" + !insertmacro DeleteContextMenuExt "Directory" + ;remove activex plugin UnRegDLL "$INSTDIR\axvlc.dll" Delete /REBOOTOK "$INSTDIR\axvlc.dll" @@ -610,12 +680,15 @@ Section "Uninstall" SEC91 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins" StrCmp $R2 "" "${Index}-Loop" "" - Delete "$R2\vlcintf.xpt" - Delete "$R2\npvlc.dll" + ; old files (0.8.5 and before) that may be lying around + Delete /REBOOTOK "$R2\npvlc.dll" + Delete /REBOOTOK "$R2\libvlc.dll" + Delete /REBOOTOK "$R2\vlcintf.xpt" Goto "${Index}-Loop" "${Index}-End:" !undef Index + Delete /REBOOTOK "$INSTDIR\npvlc.dll" RMDir "$SMPROGRAMS\VideoLAN" RMDir /r $SMPROGRAMS\VideoLAN @@ -663,7 +736,6 @@ Section "Uninstall" SEC91 SectionEnd Section /o "un.Delete preferences and cache" SEC92 - SectionIn 2 3 RO !insertmacro delprefs SectionEnd @@ -682,5 +754,5 @@ SectionEnd ;FunctionEnd Function un.onInit - !insertmacro MUI_LANGDLL_DISPLAY + !insertmacro MUI_UNGETLANGUAGE FunctionEnd