X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=vlc.win32.nsi.in;h=6206b4877c6e6cb5b0687b5c60944994abbb24fb;hb=70b228833dfbdbd3bda7d0fc3a989c2aa59c83d6;hp=085599ba50882a54dcee13b47b44ddab72d09025;hpb=11f445090a95fce4fdeb380e23b524f7ac814050;p=vlc diff --git a/vlc.win32.nsi.in b/vlc.win32.nsi.in index 085599ba50..6206b4877c 100644 --- a/vlc.win32.nsi.in +++ b/vlc.win32.nsi.in @@ -13,7 +13,12 @@ !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 ; @@ -96,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 @@ -139,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" @@ -196,7 +203,7 @@ NoOwn: FunctionEnd !macro RegisterExtensionSection EXT - Section /o ${EXT} + Section ${EXT} SectionIn 1 3 Push $R0 StrCpy $R0 ${EXT} @@ -220,7 +227,7 @@ 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 --started-from-file --no-playlist-enqueue "%1"' @@ -228,17 +235,30 @@ FunctionEnd 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 1 3 StrCpy $0 0 !define Index 'Line${__LINE__}' "${Index}-Loop:" @@ -332,6 +352,9 @@ Section "Media player (required)" SEC01 !ifdef LIBVLC_DLL !insertmacro InstallFile ${LIBVLC_DLL} !endif + !ifdef LIBVLC_CONTROL_DLL + !insertmacro InstallFile ${LIBVLC_CONTROL_DLL} + !endif !insertmacro InstallFile *.txt !insertmacro InstallFolder plugins @@ -339,6 +362,7 @@ Section "Media player (required)" SEC01 !insertmacro InstallFolder osdmenu !insertmacro InstallFolder skins !insertmacro InstallFolder http + !insertmacro InstallFolder share WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \ "${PRODUCT_WEB_SITE}" @@ -439,44 +463,46 @@ SectionEnd Section /o "Mozilla plugin" SEC03 SectionIn 3 + SetOutPath "$INSTDIR" !insertmacro OpenUninstallLog - !insertmacro InstallFolder mozilla + !insertmacro InstallFile mozilla\npvlc.dll !insertmacro CloseUninstallLog - ; 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:" - - ; 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" - !ifdef LIBVLC_DLL - CopyFiles ${LIBVLC_DLL} "$R2" - !endif - Goto "${Index}-Loop" - - "${Index}-End:" - !undef Index + !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 @@ -489,12 +515,6 @@ Section "ActiveX plugin" SEC04 RegDLL "$INSTDIR\axvlc.dll" SectionEnd -Section /o "Context Menus" SEC05 - SectionIn 3 - !insertmacro MacroAllExtensions AddContextMenu - !insertmacro AddContextMenu "Directory" -SectionEnd - SectionGroup "File type associations" SEC06 SectionGroup "Audio Files" !insertmacro MacroAudioExtensions RegisterExtensionSection @@ -507,6 +527,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 @@ -632,8 +658,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" @@ -654,11 +681,15 @@ Section "Uninstall" SEC91 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins" StrCmp $R2 "" "${Index}-Loop" "" - 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 @@ -705,8 +736,7 @@ Section "Uninstall" SEC91 SetAutoClose true SectionEnd -Section "un.Delete preferences and cache" SEC92 - SectionIn 1 3 +Section /o "un.Delete preferences and cache" SEC92 !insertmacro delprefs SectionEnd @@ -725,5 +755,5 @@ SectionEnd ;FunctionEnd Function un.onInit - !insertmacro MUI_LANGDLL_DISPLAY + !insertmacro MUI_UNGETLANGUAGE FunctionEnd