[vlc-devel] [PATCH] Add translations for Win32 installer

Pauline Castets pcastets at actech-innovation.com
Mon Aug 4 11:40:40 CEST 2008


Don't apply this patch, there are errors. I'm sending a new one,
sorry...

Le lundi 04 août 2008 à 11:15 +0200, Pauline Castets a écrit :
> Add translation files for english and french (english.nsh and
> french.nsh)
> Add header file to declare translation variables (declaration.nsh)
> Include declaration.nsh in NSI file
> Replace every displayed string in installer by the variable defined in
> language file.
> Modify Makefile to copy translation files for Win32 installer
> 
> Language is chosen by NSI, with a dialog at the beginning of the
> installer (which was already there).
> Translated string are copied into the variables according to which
> language was chosen. Default is English.
> ---
>  Makefile.am                                    |   22 +++---
>  extras/package/win32/languages/declaration.nsh |   42 +++++++++++
>  extras/package/win32/languages/english.nsh     |   56 +++++++++++++++
>  extras/package/win32/languages/french.nsh      |   56 +++++++++++++++
>  extras/package/win32/vlc.win32.nsi.in          |   90 ++++++++++-------------
>  5 files changed, 205 insertions(+), 61 deletions(-)
>  create mode 100644 extras/package/win32/languages/declaration.nsh
>  create mode 100644 extras/package/win32/languages/english.nsh
>  create mode 100644 extras/package/win32/languages/french.nsh
> 
> diff --git a/Makefile.am b/Makefile.am
> index 0089543..a10e1e5 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -52,7 +52,7 @@ endif
>  
>  BUILT_SOURCES = $(BUILT_SOURCES_distclean) $(BUILT_SOURCES_clean)
>  
> -SUFFIXES = 
> +SUFFIXES =
>  
>  DISTCHECK_CONFIGURE_FLAGS = \
>  	--enable-fast-install \
> @@ -554,9 +554,9 @@ VLC-release.app: vlc
>  	find $(top_builddir)/VLC-release.app -type d -exec chmod ugo+rx '{}' \;
>  	find $(top_builddir)/VLC-release.app -type f -exec chmod ugo+r '{}' \;
>  
> -# This is just for development purposes. 
> +# This is just for development purposes.
>  # The resulting VLC.app will only in this tree.
> -VLC.app: vlc 
> +VLC.app: vlc
>  	(cd src && make install)
>  	rm -Rf $(top_builddir)/tmp
>  	mkdir -p "$(top_builddir)/tmp/extras/package/macosx"
> @@ -726,6 +726,8 @@ package-win32-base-debug: package-win-common
>  # Copy relevant files
>  # Script installer
>  	cp "$(top_builddir)/extras/package/win32/vlc.win32.nsi" "$(win32_destdir)/"
> +	mkdir "$(win32_destdir)/languages"
> +	cp "$(top_builddir)/extras/package/win32/languages/*.nsh" "$(win32_destdir)/languages/"
>  
>  # Plugins
>  	mkdir -p "$(win32_destdir)/plugins"
> @@ -893,12 +895,12 @@ package-win32-base-exe: package-win32-base
>  	eval "$$MAKENSIS $(win32_destdir)/vlc.win32.nsi"
>  
>  package-win32-base-zip: package-win32-base
> -# Create package 
> +# Create package
>  	rm -f -- vlc-$(VERSION)-win32.zip
>  	zip -r -9 vlc-$(VERSION)-win32.zip vlc-$(VERSION)
>  
>  package-win32-base-7zip: package-win32-base
> -# Create package 
> +# Create package
>  	7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32.7z vlc-$(VERSION)
>  
>  package-win32-exe: package-win32-base package-win32-base-exe
> @@ -913,7 +915,7 @@ package-win32-7zip: package-win32-base-7zip
>  # Clean up
>  	rm -Rf $(win32_destdir)
>  
> -package-win32-no-clean: package-win32-base-zip package-win32-base-7zip package-win32-base-exe 
> +package-win32-no-clean: package-win32-base-zip package-win32-base-7zip package-win32-base-exe
>  
>  package-win32: package-win32-no-clean
>  # Clean up
> @@ -922,7 +924,7 @@ package-win32: package-win32-no-clean
>  package-wince-base: package-win-common package-win-common-strip
>  
>  package-wince-base-zip:
> -# Create package 
> +# Create package
>  	zip -r vlc-$(VERSION)-wince.zip vlc-$(VERSION)
>  
>  package-wince: package-wince-base  package-wince-base-zip
> @@ -974,7 +976,7 @@ package-macosx:
>  	echo "Create package directory: vlc-$(VERSION)/";
>  	mkdir -p "$(top_builddir)/vlc-$(VERSION)/";
>  
> -# Copy relevant files 
> +# Copy relevant files
>  	@if test -e "$(top_builddir)/VLC-release.app/"; then \
>  	  cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \
>  	else \
> @@ -998,7 +1000,7 @@ package-macosx:
>  	echo "Disk image creation completed:"
>  	ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
>  
> -# Create disk image 
> +# Create disk image
>  #	echo "Creating disk image"
>  #	rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
>  #	hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
> @@ -1073,7 +1075,7 @@ if BUILD_MOZILLA
>  	-d "$(srcdir)/extras/package/macosx/plugin/InstallerDescription.plist"; true
>  	rm -rf "$(top_builddir)/macosx-plugin-instdata/"
>  
> -# Create disk image 
> +# Create disk image
>  	rm -f "$(top_builddir)/vlc-plugin-$(VERSION).dmg"; true
>  	rm -rf "$(top_builddir)/vlc-plugin-$(VERSION)/"; true
>  	mkdir -p "$(top_builddir)/vlc-plugin-$(VERSION)/"
> diff --git a/extras/package/win32/languages/declaration.nsh b/extras/package/win32/languages/declaration.nsh
> new file mode 100644
> index 0000000..b2bc6e8
> --- /dev/null
> +++ b/extras/package/win32/languages/declaration.nsh
> @@ -0,0 +1,42 @@
> +Var Name_Section01
> +Var Name_Section02a
> +Var Name_Section02b
> +Var Name_Section03
> +Var Name_Section04
> +Var Name_Section05
> +Var Name_Section06
> +Var Name_SectionGroupAudio
> +Var Name_SectionGroupVideo
> +Var Name_SectionGroupOther
> +Var Name_Section07
> +Var Name_Section08
> +
> +Var Desc_Section01
> +Var Desc_Section02a
> +Var Desc_Section02b
> +Var Desc_Section03
> +Var Desc_Section04
> +Var Desc_Section05
> +Var Desc_Section06
> +Var Desc_Section07
> +Var Desc_Section08
> +
> +Var Message_AlreadyInstalled
> +
> +Var Name_Section91
> +Var Name_Section92
> +Var Desc_Section91
> +Var Desc_Section92
> +
> +Var ShellAssociation_Play
> +Var ContextMenuEntry_PlayWith
> +Var ContextMenuEntry_AddToPlaylist
> +
> +Var Link_VisitWebsite
> +
> +Var Name_InstTypeRecommended
> +Var Name_InstTypeMinimum
> +Var Name_InstTypeFull
> +
> +Var Action_OnArrivalDVD
> +Var Action_OnArrivalAudioCD
> diff --git a/extras/package/win32/languages/english.nsh b/extras/package/win32/languages/english.nsh
> new file mode 100644
> index 0000000..194bbf1
> --- /dev/null
> +++ b/extras/package/win32/languages/english.nsh
> @@ -0,0 +1,56 @@
> +StrCpy $Name_Section01 "Media Player (required)"
> +StrCpy $Name_Section02a "Start Menu Shortcut"
> +StrCpy $Name_Section02b "Desktop Shortcut"
> +StrCpy $Name_Section03 "Mozilla plugin"
> +StrCpy $Name_Section04 "ActiveX plugin"
> +StrCpy $Name_Section05 "Discs Playback"
> +StrCpy $Name_Section06 "File type associations"
> +StrCpy $Name_SectionGroupAudio "Audio Files"
> +StrCpy $Name_SectionGroupVideo "Video Files"
> +StrCpy $Name_SectionGroupOther "Other"
> +StrCpy $Name_Section07 "Context Menus"
> +StrCpy $Name_Section08 "Delete preferences and cache"
> +
> +StrCpy $Desc_Section01 \
> +    "The media player itself"
> +StrCpy $Desc_Section02a \
> +    "Adds icons to your start menu for easy access"
> +StrCpy $Desc_Section02b \
> +    "Adds icon to your desktop for easy access"
> +StrCpy $Desc_Section03 \
> +    "The VLC Mozilla and Mozilla Firefox plugin"
> +StrCpy $Desc_Section04 \
> +    "The VLC ActiveX plugin"
> +StrCpy $Desc_Section05 \
> +    "DVD and CD playback registration"
> +StrCpy $Desc_Section06 \
> +    "Sets VLC media player as the default application for the specified file type"
> +StrCpy $Desc_Section07 \
> +    "Add context menu items ('Play With VLC' and 'Add To VLC's Playlist')"
> +StrCpy $Desc_Section08 \
> +    "Deletes VLC media player preferences and cache files leftover from previous installations"
> +
> +StrCpy $Message_AlreadyInstalled  \
> +"VLC media player has already been installed. $\nDo you want to remove \
> +the previous version before installing $(^Name) ?"
> +
> +StrCpy $Name_Section91 "Uninstall"
> +StrCpy $Name_Section92 "Delete preferences and cache"
> +
> +StrCpy $Desc_Section91 \
> +"Uninstall VLC media player and all its components"
> +StrCpy $Desc_Section92 \
> +"Deletes VLC media player preferences and cache files"
> +
> +StrCpy $ShellAssociation_Play "Play"
> +StrCpy $ContextMenuEntry_PlayWith "Play with VLC media player"
> +StrCpy $ContextMenuEntry_AddToPlaylist "Add to VLC media player's Playlist"
> +
> +StrCpy $Link_VisitWebsite "Visit the VideoLAN VLC media player Website"
> +
> +StrCpy $Name_InstTypeRecommended "Recommended"
> +StrCpy $Name_InstTypeMinimum "Minimum"
> +StrCpy $Name_InstTypeFull "Full"
> +
> +StrCpy $Action_OnArrivalDVD "Play DVD movie"
> +StrCpy $Action_OnArrivalAudioCD "Play audio CD"
> diff --git a/extras/package/win32/languages/french.nsh b/extras/package/win32/languages/french.nsh
> new file mode 100644
> index 0000000..e5592ff
> --- /dev/null
> +++ b/extras/package/win32/languages/french.nsh
> @@ -0,0 +1,56 @@
> +StrCpy $Name_Section01 "Lecteur Media (requis)"
> +StrCpy $Name_Section02a "Ajouter au menu Dmarrer"
> +StrCpy $Name_Section02b "Placer un raccourci sur le bureau"
> +StrCpy $Name_Section03 "Plugin Mozilla"
> +StrCpy $Name_Section04 "Plugin ActiveX"
> +StrCpy $Name_Section05 "Lecture de disques"
> +StrCpy $Name_Section06 "Types de fichiers"
> +StrCpy $Name_SectionGroupAudio "Fichiers Audio"
> +StrCpy $Name_SectionGroupVideo "Fichiers Video"
> +StrCpy $Name_SectionGroupOther "Autres"
> +StrCpy $Name_Section07 "Menus contextuels"
> +StrCpy $Name_Section08 "Effacer les preferences et le cache"
> +
> +StrCpy $Desc_Section01 \
> +    "Le lecteur multimedia"
> +StrCpy $Desc_Section02a \
> +    "Ajoute des icnes au menu Dmarrer pour un accs facile"
> +StrCpy $Desc_Section02b \
> +    "Place un icne sur le bureau pour un accs facile"
> +StrCpy $Desc_Section03 \
> +    "Le plugin VLC Mozilla et Mozilla Firefox"
> +StrCpy $Desc_Section04 \
> +    "Le plugin VLC ActiveX"
> +StrCpy $Desc_Section05 \
> +    "Lecture des CD et DVD"
> +StrCpy $Desc_Section06 \
> +	"Dfinit le lecteur media VLC comme application par dfaut pour les fichiers du type spcifi"
> +StrCpy $Desc_Section07 \
> +	"Ajoute des entres de menu contextuel ('Play With VLC' and 'Add To VLC's Playlist')"
> +StrCpy $Desc_Section08 \
> +	"Efface les prfrences de VLC et les fichiers cache laisss par une prcdente installation"
> +
> +StrCpy $Message_AlreadyInstalled  \
> +"Le lecteur multimedia VLC est dj install. $\nSouhaitez-vous dsinstaller \
> +l'ancienne version avant d'installer $(^Name) ?"
> +
> +StrCpy $Name_Section91 "Dsinstaller"
> +StrCpy $Name_Section92 "Effacer les prfrences et les fichiers cache"
> +
> +StrCpy $Desc_Section91 \
> +"Dsinstalle VLC et tous ses composants"
> +StrCpy $Desc_Section92 \
> +"Efface les prfrences de VLC et les fichiers cache"
> +
> +StrCpy $ShellAssociation_Play "Lire"
> +StrCpy $ContextMenuEntry_PlayWith "Lire avec VLC"
> +StrCpy $ContextMenuEntry_AddToPlaylist "Ajouter  la liste de lecture de VLC"
> +
> +StrCpy $Link_VisitWebsite "Visitez le site de VideoLAN"
> +
> +StrCpy $Name_InstTypeRecommended "Recommande"
> +StrCpy $Name_InstTypeMinimum "Minimale"
> +StrCpy $Name_InstTypeFull "Complte"
> +
> +StrCpy $Action_OnArrivalDVD "Lecture DVD"
> +StrCpy $Action_OnArrivalAudioCD "Lecture CD Audio"
> diff --git a/extras/package/win32/vlc.win32.nsi.in b/extras/package/win32/vlc.win32.nsi.in
> index 91d3d69..3290840 100644
> --- a/extras/package/win32/vlc.win32.nsi.in
> +++ b/extras/package/win32/vlc.win32.nsi.in
> @@ -41,9 +41,9 @@ SetOverwrite ifnewer
>  CRCCheck on
>  BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}"
>  
> -InstType "Recommended"
> -InstType "Minimum"
> -InstType "Full"
> +InstType $(Name_InstTypeRecommended)
> +InstType $(Name_InstTypeMinimum)
> +InstType $(Name_InstTypeFull)
>  
>  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>  ; NSIS Modern User Interface configuration ;
> @@ -74,7 +74,7 @@ InstType "Full"
>      !define MUI_FINISHPAGE_RUN "$INSTDIR\vlc.exe"
>      !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
>      !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
> -    !define MUI_FINISHPAGE_LINK "Visit the VideoLAN VLC media player Website"
> +    !define MUI_FINISHPAGE_LINK $(Link_VisitWebsite)
>      !define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
>      !define MUI_FINISHPAGE_NOREBOOTSUPPORT
>      !insertmacro MUI_PAGE_FINISH
> @@ -135,6 +135,7 @@ NoBackup:
>    ReadRegStr $0 HKCR "VLC$R0" ""
>    WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"
>    WriteRegStr HKCR "VLC$R0\shell" "" "Play"
> +  WriteRegStr HKCR "VLC$R0\shell\Play" "" $(ShellAssociation_Play)
>    WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
>    WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
>  
> @@ -254,10 +255,10 @@ FunctionEnd
>  
>  ; Generic function for adding the context menu for one ext.
>  !macro AddContextMenuExt EXT
> -  WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player"
> +  WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $(ContextMenuEntry_PlayWith)
>    WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"'
>  
> -  WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" "Add to VLC media player's Playlist"
> +  WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $(ContextMenuEntry_AddToPlaylist)
>    WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"'
>  !macroend
>  
> @@ -373,8 +374,9 @@ FunctionEnd
>  ; The CORE of the    ;
>  ; installer          ;
>  ;;;;;;;;;;;;;;;;;;;;;;
> +!include "languages.nsi\language_strings.nsh"
>  
> -Section "Media player (required)" SEC01
> +Section $(Name_Section01) SEC01
>    SectionIn 1 2 3 RO
>    SetShellVarContext all
>    SetOutPath "$INSTDIR"
> @@ -418,7 +420,7 @@ Section "Media player (required)" SEC01
>    ; Add VLC to "recomended programs" for the following extensions
>    WriteRegStr HKCR Applications\vlc.exe "" ""
>    WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
> -  WriteRegStr HKCR Applications\vlc.exe\shell\Play "" "Play with VLC"
> +  WriteRegStr HKCR Applications\vlc.exe\shell\Play "" $(ContextMenuEntry_PlayWith)
>    WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \
>      '$INSTDIR\vlc.exe --started-from-file "%1"'
>    !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
> @@ -437,7 +439,7 @@ Section "Media player (required)" SEC01
>    lbl_done:
>  SectionEnd
>  
> -Section "Start Menu Shortcut" SEC02a
> +Section $(Name_Section02a) SEC02a
>    SectionIn 1 2 3
>    CreateDirectory "$SMPROGRAMS\VideoLAN"
>    CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings"
> @@ -477,13 +479,13 @@ Section "Start Menu Shortcut" SEC02a
>      "$INSTDIR\vlc.exe" ""
>  SectionEnd
>  
> -Section "Desktop Shortcut" SEC02b
> +Section $(Name_Section02b) SEC02b
>    SectionIn 1 2 3
>    CreateShortCut "$DESKTOP\VLC media player.lnk" \
>      "$INSTDIR\vlc.exe" ""
>  SectionEnd
>  
> -Section /o "Mozilla plugin" SEC03
> +Section /o $(Name_Section03) SEC03
>    SectionIn 3
>  
>    SetOutPath "$INSTDIR"
> @@ -529,7 +531,7 @@ Section /o "Mozilla plugin" SEC03
>  
>  SectionEnd
>  
> -Section "ActiveX plugin" SEC04
> +Section $(Name_Section04) SEC04
>    SectionIn 1 3
>    SetOutPath "$INSTDIR"
>    !insertmacro OpenUninstallLog
> @@ -538,24 +540,24 @@ Section "ActiveX plugin" SEC04
>    RegDLL "$INSTDIR\axvlc.dll"
>  SectionEnd
>  
> -Section "Discs Playback" SEC05
> +Section $(Name_Section05) SEC05
>    SectionIn 1 2 3
> -  WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player"
> +  WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $(ContextMenuEntry_PlayWith)
>    WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
>      "$INSTDIR\vlc.exe --started-from-file cdda://%1"
> -  WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player"
> +  WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $(ContextMenuEntry_PlayWith)
>    WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
>      "$INSTDIR\vlc.exe --started-from-file dvd://%1"
>  
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
> -  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" "Play DVD movie"
> +  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $(Action_OnArrivalDVD)
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
>  
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
> -  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio"
> +  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $(Action_OnArrivalAudioCD)
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
>    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"
> @@ -573,48 +575,39 @@ Section "Discs Playback" SEC05
>  
>  SectionEnd
>  
> -SectionGroup "File type associations" SEC06
> -  SectionGroup "Audio Files"
> +SectionGroup $(Name_Section06) SEC06
> +  SectionGroup $(Name_SectionGroupAudio)
>      !insertmacro MacroAudioExtensions RegisterExtensionSection
>    SectionGroupEnd
> -  SectionGroup "Video Files"
> +  SectionGroup $(Name_SectionGroupVideo)
>      !insertmacro MacroVideoExtensions RegisterExtensionSection
>    SectionGroupEnd
> -  SectionGroup "Other"
> +  SectionGroup $(Name_SectionGroupOther)
>      !insertmacro MacroOtherExtensions RegisterExtensionSection
>    SectionGroupEnd
>  SectionGroupEnd
>  
> -Section "Context Menus" SEC07
> +Section $(Name_Section07) SEC07
>    SectionIn 3
>    !insertmacro MacroAllExtensions AddContextMenu
>    !insertmacro AddContextMenuExt "Directory"
>  SectionEnd
>  
> -Section /o "Delete preferences and cache" SEC08
> +Section /o $(Name_Section08) SEC08
>    !insertmacro delprefs
>  SectionEnd
>  
>  ; Installer section descriptions
>  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} \
> -    "The media player itself"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} \
> -    "Adds icons to your start menu for easy access"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} \
> -    "Adds icon to your desktop for easy access"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} \
> -    "The VLC Mozilla and Mozilla Firefox plugin"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \
> -    "The VLC ActiveX plugin"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \
> -    "DVD and CD playback registration"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} \
> -    "Sets VLC media player as the default application for the specified file type"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} \
> -    "Add context menu items ('Play With VLC' and 'Add To VLC's Playlist')"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} \
> -    "Deletes VLC media player preferences and cache files leftover from previous installations"
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $(Desc_Section01)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $(Desc_Section02a)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $(Desc_Section02b)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $(Desc_Section03)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $(Desc_Section04)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $(Desc_Section05)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $(Desc_Section06)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $(Desc_Section07)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $(Desc_Section08)
>  !insertmacro MUI_FUNCTION_DESCRIPTION_END
>  
>  ;;; Start function
> @@ -623,10 +616,7 @@ Function .onInit
>    "UninstallString"
>    StrCmp $R0 "" done
>  
> -  MessageBox MB_YESNO|MB_ICONEXCLAMATION \
> -  "VLC media player has already been installed. $\nDo you want to remove \
> -  the previous version before installing $(^Name) ?" \
> -  IDNO done
> +  MessageBox MB_YESNO|MB_ICONEXCLAMATION $(Message_AlreadyInstalled) IDNO done
>  
>    ;Run the uninstaller
>    ;uninst:
> @@ -715,7 +705,7 @@ Function un.RemoveEmptyDirs
>    !undef Index
>  FunctionEnd
>  
> -Section "Uninstall" SEC91
> +Section 'un.$(Name_Section91)' SEC91
>    SectionIn 1 2 3 RO
>    SetShellVarContext all
>  
> @@ -800,16 +790,14 @@ Section "Uninstall" SEC91
>    SetAutoClose true
>  SectionEnd
>  
> -Section /o "un.Delete preferences and cache" SEC92
> +Section /o 'un.$(Name_Section92)' SEC92
>    !insertmacro delprefs
>  SectionEnd
>  
>  ; Uninstaller section descriptions
>  !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} \
> -    "Uninstall VLC media player and all its components"
> -  !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} \
> -    "Deletes VLC media player preferences and cache files"
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $(Desc_Section91)
> +  !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $(Desc_Section92)
>  !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
>  
>  ;Function un.onUninstSuccess




More information about the vlc-devel mailing list