X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=vlc.win32.nsi.in;h=383399c83b9e7e056669aaba0c99ba2275d4ae77;hb=fc8f30f200dda95909df482e9d6bf52b8b7e3635;hp=b342b79c858e88c6a30ca36cc35fb2eeb6122144;hpb=c5823f07b592b71528fe73171c8c6e7f1e106941;p=vlc diff --git a/vlc.win32.nsi.in b/vlc.win32.nsi.in index b342b79c85..383399c83b 100644 --- a/vlc.win32.nsi.in +++ b/vlc.win32.nsi.in @@ -13,6 +13,8 @@ !define PRODUCT_UNINST_ROOT_KEY "HKLM" !define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}" +@FILE_LIBVLC_DLL@ + ;;;;;;;;;;;;;;;;;;;;;;;;; ; General configuration ; ;;;;;;;;;;;;;;;;;;;;;;;;; @@ -31,7 +33,8 @@ SetCompressor /SOLID lzma SetOverwrite ifnewer CRCCheck on -InstType "Normal" +InstType "Recommended" +InstType "Minimum" InstType "Full" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -194,7 +197,7 @@ FunctionEnd !macro RegisterExtensionSection EXT Section /o ${EXT} - SectionIn 2 3 + SectionIn 1 3 Push $R0 StrCpy $R0 ${EXT} Call RegisterExtension @@ -235,7 +238,7 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;; !macro delprefs - SectionIn 2 3 + SectionIn 1 3 StrCpy $0 0 !define Index 'Line${__LINE__}' "${Index}-Loop:" @@ -256,6 +259,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 +325,13 @@ 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 !insertmacro InstallFile *.txt !insertmacro InstallFolder plugins @@ -333,8 +347,7 @@ Section "Media player (required)" SEC01 "${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 "" "" @@ -397,12 +410,15 @@ 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 + SectionIn 1 3 + + !insertmacro OpenUninstallLog + !insertmacro InstallFolder mozilla + !insertmacro CloseUninstallLog ; doesn't work. bug in mozilla/mozilla firefox or moz documentation (xpt file isn't loaded) ; see mozilla bugs 184506 and 159445 @@ -431,6 +447,9 @@ Section /o "Mozilla plugin" SEC03 StrCmp $R2 "" "${Index}-Loop" "" CopyFiles "$INSTDIR\mozilla\*" "$R2" + !ifdef LIBVLC_DLL + CopyFiles ${LIBVLC_DLL} "$R2" + !endif Goto "${Index}-Loop" "${Index}-End:" @@ -438,15 +457,17 @@ Section /o "Mozilla plugin" SEC03 SectionEnd -Section "ActiveX plugin" SEC04 - SectionIn 2 3 +Section /o "ActiveX plugin" SEC04 + 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 3 +Section /o "Context Menus" SEC05 + SectionIn 3 !insertmacro MacroAllExtensions AddContextMenu !insertmacro AddContextMenu "Directory" SectionEnd @@ -610,7 +631,6 @@ Section "Uninstall" SEC91 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins" StrCmp $R2 "" "${Index}-Loop" "" - Delete "$R2\vlcintf.xpt" Delete "$R2\npvlc.dll" Goto "${Index}-Loop" @@ -663,6 +683,7 @@ Section "Uninstall" SEC91 SectionEnd Section /o "un.Delete preferences and cache" SEC92 + SectionIn 1 3 !insertmacro delprefs SectionEnd