]> git.sesse.net Git - vlc/blobdiff - vlc.win32.nsi
* modules/audio_output/directx.c: backport of 11335.
[vlc] / vlc.win32.nsi
index 7006e362057034c2663a6ad0a738cb7a571754be..9fbd020bd25ce846962c1620ec683d68891c204f 100644 (file)
@@ -12,6 +12,7 @@
 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"\r
 !define PRODUCT_UNINST_ROOT_KEY "HKLM"\r
 \r
+\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;\r
 ; General configuration ;\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;\r
@@ -183,6 +184,8 @@ Section "Start Menu + Desktop Shortcut" SEC02
     "$INSTDIR\vlc.exe" "--intf wxwin --no-wxwin-embed"\r
   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (skins).lnk" \\r
     "$INSTDIR\vlc.exe" "--intf skins"\r
+  CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC defaults and quit.lnk" \\r
+    "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache --save-config vlc:quit "\r
   CreateShortCut "$DESKTOP\VLC media player.lnk" \\r
     "$INSTDIR\vlc.exe" "--intf wxwin"\r
   WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" \\r
@@ -195,9 +198,38 @@ Section /o "Mozilla plugin" SEC03
   SectionIn 2 3\r
   File /r mozilla\r
 \r
-  WriteRegStr HKLM \\r
-    SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION} \\r
-    "Path" '"$INSTDIR\mozilla\npvlc.dll"'\r
+  ; doesn't work. bug in mozilla/mozilla firefox or moz documentation (xpt file isn't loaded)\r
+  ; see mozilla bugs 184506 and 159445\r
+  ;!define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"\r
+  ;WriteRegStr HKLM ${Moz} "Description" "VideoLAN VLC plugin for Mozilla"\r
+  ;WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\mozilla\npvlc.dll"\r
+  ;WriteRegStr HKLM ${Moz} "Product" "VLC media player"\r
+  ;WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"\r
+  ;WriteRegStr HKLM ${Moz} "Version" "${VERSION}"\r
+  ;WriteRegStr HKLM ${Moz} "XPTPath" "$INSTDIR\mozilla\vlcintf.xpt"\r
+\r
+  Push $R0\r
+  Push $R1\r
+  Push $R2\r
+\r
+  !define Index 'Line${__LINE__}'\r
+  StrCpy $R1 "0"\r
+\r
+  "${Index}-Loop:"\r
+\r
+    ; Check for Key\r
+    EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"\r
+    StrCmp $R0 "" "${Index}-End"\r
+    IntOp $R1 $R1 + 1\r
+    ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"\r
+    StrCmp $R2 "" "${Index}-Loop" ""\r
+\r
+    CopyFiles "$INSTDIR\mozilla\*" "$R2"\r
+    Goto "${Index}-Loop"\r
+\r
+  "${Index}-End:"\r
+  !undef Index\r
+\r
 SectionEnd\r
 \r
 Section /o "ActiveX plugin" SEC04\r
@@ -274,7 +306,7 @@ SectionEnd
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} \\r
     "Adds icons to your start menu and your desktop for easy access"\r
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} \\r
-    "The VLC mozilla plugin"\r
+    "The VLC Mozilla and Mozilla Firefox plugin"\r
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \\r
     "The VLC ActiveX plugin"\r
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \\r
@@ -338,6 +370,30 @@ Section Uninstall
   UnRegDLL "$INSTDIR\axvlc.dll"\r
   Delete /REBOOTOK "$INSTDIR\axvlc.dll"\r
 \r
+  ;remove mozilla plugin\r
+  Push $R0\r
+  Push $R1\r
+  Push $R2\r
+\r
+  !define Index 'Line${__LINE__}'\r
+  StrCpy $R1 "0"\r
+\r
+  "${Index}-Loop:"\r
+\r
+    ; Check for Key\r
+    EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"\r
+    StrCmp $R0 "" "${Index}-End"\r
+    IntOp $R1 $R1 + 1\r
+    ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"\r
+    StrCmp $R2 "" "${Index}-Loop" ""\r
+\r
+    Delete "$R2\vlcintf.xpt"\r
+    Delete "$R2\npvlc.dll"\r
+    Goto "${Index}-Loop"\r
+\r
+  "${Index}-End:"\r
+  !undef Index\r
+\r
   RMDir "$SMPROGRAMS\VideoLAN"\r
   RMDir /r $SMPROGRAMS\VideoLAN\r
   RMDir /r $INSTDIR\r