]> git.sesse.net Git - vlc/blobdiff - vlc.win32.nsi.in
vlc-config external also includes libvlc-control
[vlc] / vlc.win32.nsi.in
index b342b79c858e88c6a30ca36cc35fb2eeb6122144..05a41df0415a9c0e3eed2ae1813dba65ed1af181 100644 (file)
@@ -13,6 +13,8 @@
 !define PRODUCT_UNINST_ROOT_KEY "HKLM"\r
 !define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}"\r
 \r
+@FILE_LIBVLC_DLL@\r
+\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;\r
 ; General configuration ;\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;\r
@@ -31,7 +33,8 @@ SetCompressor /SOLID lzma
 SetOverwrite ifnewer\r
 CRCCheck on\r
 \r
-InstType "Normal"\r
+InstType "Recommended"\r
+InstType "Minimum"\r
 InstType "Full"\r
 \r
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
@@ -171,9 +174,9 @@ Function RegisterExtension
 NoBackup:\r
   WriteRegStr HKCR "$R0" "" "VLC$R0"\r
   ReadRegStr $0 HKCR "VLC$R0" ""\r
-  WriteRegStr HKCR "VLC$R0" "" "VLC media file"\r
+  WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"\r
   WriteRegStr HKCR "VLC$R0\shell" "" "Play"\r
-  WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --one-instance-when-started-from-file "%1"'\r
+  WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'\r
   WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'\r
 FunctionEnd\r
 \r
@@ -194,7 +197,7 @@ FunctionEnd
 \r
 !macro RegisterExtensionSection EXT\r
   Section /o ${EXT}\r
-    SectionIn 2 3\r
+    SectionIn 1 3\r
     Push $R0\r
     StrCpy $R0 ${EXT}\r
     Call RegisterExtension\r
@@ -219,10 +222,10 @@ FunctionEnd
 \r
 !macro AddContextMenu EXT\r
   WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player"\r
-  WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --one-instance-when-started-from-file --no-playlist-enqueue "%1"'\r
+  WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"'\r
 \r
   WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" "Add to VLC media player's Playlist"\r
-  WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --one-instance-when-started-from-file --playlist-enqueue "%1"'\r
+  WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"'\r
 !macroend\r
 \r
 !macro DeleteContextMenu EXT\r
@@ -235,7 +238,7 @@ FunctionEnd
 ;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 \r
 !macro delprefs\r
-  SectionIn 2 3\r
+  SectionIn 1 3\r
   StrCpy $0 0\r
   !define Index 'Line${__LINE__}'\r
   "${Index}-Loop:"\r
@@ -256,6 +259,16 @@ FunctionEnd
 \r
 Var UninstallLog\r
 \r
+!macro OpenUninstallLog\r
+  FileOpen $UninstallLog "$INSTDIR\uninstall.log" a\r
+  FileSeek $UninstallLog 0 END\r
+!macroend\r
+\r
+!macro CloseUninstallLog\r
+  FileClose $UninstallLog\r
+  SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN\r
+!macroend\r
+\r
 !macro InstallFile FILEREGEX\r
   File "${FILEREGEX}"\r
   !define Index 'Line${__LINE__}'\r
@@ -312,12 +325,13 @@ Section "Media player (required)" SEC01
   SetShellVarContext all\r
   SetOutPath "$INSTDIR"\r
 \r
-  FileOpen $UninstallLog "$INSTDIR\uninstall.log" w\r
-  FileSeek $UninstallLog 0 END\r
+  !insertmacro OpenUninstallLog\r
 \r
   !insertmacro InstallFile vlc.exe\r
   !insertmacro InstallFile vlc.exe.manifest\r
-  @FILE_LIBVLC_DLL@\r
+  !ifdef LIBVLC_DLL\r
+  !insertmacro InstallFile ${LIBVLC_DLL}\r
+  !endif\r
   !insertmacro InstallFile *.txt\r
 \r
   !insertmacro InstallFolder plugins\r
@@ -333,23 +347,22 @@ Section "Media player (required)" SEC01
     "${PRODUCT_WEB_SITE}/doc/"\r
   FileWrite $UninstallLog "Documentation.url$\r$\n"\r
 \r
-  FileClose $UninstallLog\r
-  SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN\r
+  !insertmacro CloseUninstallLog\r
 \r
   ; Add VLC to "recomended programs" for the following extensions\r
   WriteRegStr HKCR Applications\vlc.exe "" ""\r
   WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"\r
   WriteRegStr HKCR Applications\vlc.exe\shell\Play "" "Play with VLC"\r
   WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \\r
-    '$INSTDIR\vlc.exe --one-instance-when-started-from-file "%1"'\r
+    '$INSTDIR\vlc.exe --started-from-file "%1"'\r
   !insertmacro MacroAllExtensions WriteRegStrSupportedTypes\r
 \r
   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player"\r
   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \\r
-    "$INSTDIR\vlc.exe --one-instance-when-started-from-file cdda:%1"\r
+    "$INSTDIR\vlc.exe --started-from-file cdda:%1"\r
   WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player"\r
   WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \\r
-    "$INSTDIR\vlc.exe --one-instance-when-started-from-file dvd:%1"\r
+    "$INSTDIR\vlc.exe --started-from-file 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
@@ -360,19 +373,19 @@ Section "Media player (required)" SEC01
 \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 --one-instance-when-started-from-file",0'\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe --started-from-file",0'\r
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"\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.DVDMovie" "" "VLC DVD Movie"\r
   WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Play"\r
   WriteRegStr HKCR "VLC.DVDMovie\shell\Play\command" "" \\r
-    '$INSTDIR\vlc.exe --one-instance-when-started-from-file dvd:%1'\r
+    '$INSTDIR\vlc.exe --started-from-file dvd:%1'\r
   WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'\r
   WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"\r
   WriteRegStr HKCR "VLC.CDAudio\shell" "" "Play"\r
   WriteRegStr HKCR "VLC.CDAudio\shell\Play\command" "" \\r
-    '$INSTDIR\vlc.exe --one-instance-when-started-from-file cdda:%1'\r
+    '$INSTDIR\vlc.exe --started-from-file cdda:%1'\r
   WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'\r
 \r
 SectionEnd\r
@@ -381,11 +394,7 @@ Section "Start Menu Shortcut" SEC02a
   SectionIn 1 2 3\r
   CreateDirectory "$SMPROGRAMS\VideoLAN"\r
   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \\r
-    "$INSTDIR\vlc.exe" "--intf wx --wx-embed"\r
-  CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (alt).lnk" \\r
-    "$INSTDIR\vlc.exe" "--intf wx --no-wx-embed"\r
-  CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (skins).lnk" \\r
-    "$INSTDIR\vlc.exe" "--intf skins"\r
+    "$INSTDIR\vlc.exe" "" \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 "$SMPROGRAMS\VideoLAN\${PRODUCT_NAME} Website.lnk" \\r
@@ -397,12 +406,15 @@ SectionEnd
 Section "Desktop Shortcut" SEC02b\r
   SectionIn 1 2 3\r
   CreateShortCut "$DESKTOP\VLC media player.lnk" \\r
-    "$INSTDIR\vlc.exe" "--intf wx"\r
+    "$INSTDIR\vlc.exe" ""\r
 SectionEnd\r
 \r
 Section /o "Mozilla plugin" SEC03\r
-  SectionIn 2 3\r
-  File /r mozilla\r
+  SectionIn 1 3\r
+\r
+  !insertmacro OpenUninstallLog\r
+  !insertmacro InstallFolder mozilla\r
+  !insertmacro CloseUninstallLog\r
 \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
@@ -431,6 +443,9 @@ Section /o "Mozilla plugin" SEC03
     StrCmp $R2 "" "${Index}-Loop" ""\r
 \r
     CopyFiles "$INSTDIR\mozilla\*" "$R2"\r
+    !ifdef LIBVLC_DLL\r
+    CopyFiles ${LIBVLC_DLL} "$R2"\r
+    !endif\r
     Goto "${Index}-Loop"\r
 \r
   "${Index}-End:"\r
@@ -438,15 +453,17 @@ Section /o "Mozilla plugin" SEC03
 \r
 SectionEnd\r
 \r
-Section "ActiveX plugin" SEC04\r
-  SectionIn 2 3\r
+Section /o "ActiveX plugin" SEC04\r
+  SectionIn 1 3\r
   SetOutPath "$INSTDIR"\r
-  File activex\axvlc.dll\r
+  !insertmacro OpenUninstallLog\r
+  !insertmacro InstallFile activex\axvlc.dll\r
+  !insertmacro CloseUninstallLog\r
   RegDLL "$INSTDIR\axvlc.dll"\r
 SectionEnd\r
 \r
-Section "Context Menus" SEC05\r
-  SectionIn 3\r
+Section /o "Context Menus" SEC05\r
+  SectionIn 3\r
   !insertmacro MacroAllExtensions AddContextMenu\r
   !insertmacro AddContextMenu "Directory"\r
 SectionEnd\r
@@ -610,7 +627,6 @@ Section "Uninstall" SEC91
     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
@@ -663,6 +679,7 @@ Section "Uninstall" SEC91
 SectionEnd\r
 \r
 Section /o "un.Delete preferences and cache" SEC92\r
+  SectionIn 1 3\r
   !insertmacro delprefs\r
 SectionEnd\r
 \r