]> git.sesse.net Git - vlc/blobdiff - vlc.win32.nsi
* ts.c : renamed to ts.
[vlc] / vlc.win32.nsi
index c6379dab968051aef9d835f5453638dd23b22354..3398b1a909a24c2c2c1743a867d1fffe99026f6a 100644 (file)
 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"\r
 !define PRODUCT_UNINST_ROOT_KEY "HKLM"\r
 \r
+;;;;;;;;;;;;;;;;;;;;;;;;;\r
+; General configuration ;\r
+;;;;;;;;;;;;;;;;;;;;;;;;;\r
+\r
+Name "${PRODUCT_GROUP} ${PRODUCT_NAME} ${PRODUCT_VERSION}"\r
+OutFile ..\vlc-${VERSION}-win32.exe\r
+InstallDir "$PROGRAMFILES\VideoLAN\VLC"\r
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "Install_Dir"\r
+SetCompressor lzma\r
+ShowInstDetails show\r
+ShowUnInstDetails show\r
+SetOverwrite ifnewer\r
+CRCCheck on\r
+\r
+InstType "Normal"\r
+InstType "Full"\r
+\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 ; NSIS Modern User Interface configuration ;\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
@@ -37,6 +54,7 @@
 !insertmacro MUI_PAGE_INSTFILES\r
 ; Finish page\r
 !define MUI_FINISHPAGE_RUN "$INSTDIR\vlc.exe"\r
+!define MUI_FINISHPAGE_NOREBOOTSUPPORT\r
 !insertmacro MUI_PAGE_FINISH\r
 \r
 ; Uninstaller pages\r
@@ -100,22 +118,9 @@ FunctionEnd
   Pop $R0\r
 !macroend\r
 \r
-;;;;;;;;;;;;;;;;;;;;;;;;;\r
-; General configuration ;\r
-;;;;;;;;;;;;;;;;;;;;;;;;;\r
-\r
-Name "${PRODUCT_GROUP} ${PRODUCT_NAME} ${PRODUCT_VERSION}"\r
-OutFile ..\vlc-${VERSION}-win32.exe\r
-InstallDir "$PROGRAMFILES\VideoLAN\VLC"\r
-InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "Install_Dir"\r
-SetCompressor lzma\r
-ShowInstDetails show\r
-ShowUnInstDetails show\r
-SetOverwrite ifnewer\r
-CRCCheck on\r
-\r
-InstType "Normal"\r
-InstType "Full"\r
+;;;;;;;;;;;;;;;;;;;;;;\r
+; Installer sections ;\r
+;;;;;;;;;;;;;;;;;;;;;;\r
 \r
 Section "Media player (required)" SEC01\r
   SectionIn 1 2 3 RO\r
@@ -137,6 +142,32 @@ Section "Media player (required)" SEC01
   WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \\r
     '$INSTDIR\vlc.exe "%1"'\r
 \r
+  WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player"\r
+  WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \\r
+    "$INSTDIR\vlc.exe cdda:%1"\r
+  WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player"\r
+  WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \\r
+    "$INSTDIR\vlc.exe dvd:%1"\r
+\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" "Play DVD movie"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" "$INSTDIR\vlc.exe,0"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Invoke.ProgID" "VLC.MediaFile"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"\r
+\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" "$INSTDIR\vlc.exe,0"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Invoke.ProgID" "VLC.MediaFile"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"\r
+  WriteRegStr HKCR "VLC.MediaFile" "" "VLC media file"\r
+  WriteRegStr HKCR "VLC.MediaFile\shell" "" "Play"\r
+  WriteRegStr HKCR "VLC.MediaFile\shell\Play\command" "" \\r
+    '$INSTDIR\vlc.exe "%1"'\r
+  WriteRegStr HKCR "VLC.MediaFile\DefaultIcon" "" "$INSTDIR\vlc.exe,0"\r
+\r
 SectionEnd\r
 \r
 Section "Start Menu + Desktop Shortcut" SEC02\r
@@ -145,8 +176,11 @@ Section "Start Menu + Desktop Shortcut" SEC02
   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \\r
     "$INSTDIR\vlc.exe" "--intf wxwin"\r
   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (skins).lnk" \\r
+    "$INSTDIR\vlc.exe" "--intf skins2"\r
+  CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (old skins).lnk" \\r
     "$INSTDIR\vlc.exe" "--intf skins"\r
-  CreateShortCut "$DESKTOP\VLC media player.lnk" "$INSTDIR\vlc.exe"\r
+  CreateShortCut "$DESKTOP\VLC media player.lnk" \\r
+    "$INSTDIR\vlc.exe" "--intf wxwin"\r
   WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" \\r
     "${PRODUCT_WEB_SITE}"\r
   CreateShortCut "$SMPROGRAMS\VideoLAN\Website.lnk" \\r
@@ -172,7 +206,6 @@ SubSection "File type associations" SEC04
   !insertmacro RegisterExtensionSection ".avi"\r
   !insertmacro RegisterExtensionSection ".bin"\r
   !insertmacro RegisterExtensionSection ".cue"\r
-  !insertmacro RegisterExtensionSection ".dat"\r
   !insertmacro RegisterExtensionSection ".divx"\r
   !insertmacro RegisterExtensionSection ".dts"\r
   !insertmacro RegisterExtensionSection ".dv"\r
@@ -259,7 +292,6 @@ Section Uninstall
   !insertmacro UnRegisterExtensionSection ".avi"\r
   !insertmacro UnRegisterExtensionSection ".bin"\r
   !insertmacro UnRegisterExtensionSection ".cue"\r
-  !insertmacro UnRegisterExtensionSection ".dat"\r
   !insertmacro UnRegisterExtensionSection ".divx"\r
   !insertmacro UnRegisterExtensionSection ".dts"\r
   !insertmacro UnRegisterExtensionSection ".dv"\r
@@ -294,6 +326,13 @@ Section Uninstall
   DeleteRegKey HKLM Software\VideoLAN\r
 \r
   DeleteRegKey HKCR Applications\vlc.exe\r
+  DeleteRegKey HKCR AudioCD\shell\PlayWithVLC\r
+  DeleteRegKey HKCR DVD\shell\PlayWithVLC\r
+  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"\r
+  DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival\r
+  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"\r
+  DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival\r
+  DeleteRegKey HKCR "VLC.MediaFile"\r
 \r
   DeleteRegKey HKLM \\r
     SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}\r