Archive: my installer dont displays lang selection


my installer dont displays lang selection
Hi

what did i made wrong



;--------------------------------
;Pages


!insertmacro MUI_PAGE_LICENSE "licence.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
;
!insertmacro MUI_RESERVEFILE_LANGDLL


Section "Dummy Section" SecDummy

; The file to write



SetOutPath $INSTDIR


; Put file there
File *.dll
File *.exe

SectionEnd


Function .onInit

!insertmacro MUI_LANGDLL_DISPLAY

FunctionEnd




This script compiles fine but dont display the initial language selection menu ... why ??

It could be because you missed out the registry language settings:
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\Modern UI Test"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"

-Stu


no i included it

here is the complete script

!include "MUI.nsh"

CRCCheck off
SetPluginUnload alwaysoff
Name "Lab Project Deluxe"
OutFile "setup.exe"
InstallDir "$PROGRAMFILES\LabProjectTest"
;Get install folder from registry if available
UninstallIcon "nullsoftuninstall.ico"
Icon "nullsoftinstaller.ico"

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING


InstallDirRegKey HKLM "Software\LabProject" "Install_Dir"


;--------------------------------
;Language Selection Dialog Settings

;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\LabProject"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"


;--------------------------------
;Pages


!insertmacro MUI_PAGE_LICENSE "licence.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Slovenian"

;--------------------------------
;Reserve Files

;These files should be inserted before other files in the data block
;Keep these lines before any File command
;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)

!insertmacro MUI_RESERVEFILE_LANGDLL

;--------------------------------


Section "Dummy Section" SecDummy

; The file to write



SetOutPath $INSTDIR


; Put file there
File *.dll
File *.exe
File *.url
File *.txt
File "activemark\aminstall.dll"

System::Call 'aminstall::ActiveMARKReadInstaller(t) i (r9) r8'
Delete "$INSTDIR\aminstall.dll"

SetOutPath $INSTDIR\data

File data\*.*

SetOutPath $INSTDIR\data\mesh

File data\mesh\*.*

SetOutPath $INSTDIR\Save

File Save\*.*

SetOutPath $INSTDIR\sound

File sound\*.*

SetOutPath $INSTDIR\sources

File sources\*.*

SetOutPath $INSTDIR\lang





; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\NSIS_Example2 "Install_Dir" "$INSTDIR"

; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LabProject" "LabProject Deluxe" "LabProject Deluxe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LabProject" "Uninstall Lab Project"

'"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LabProject" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LabProject" "NoRepair" 1
WriteUninstaller "uninstall.exe"

SectionEnd

; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"

CreateDirectory "$SMPROGRAMS\LabProjectTest"
CreateShortCut "$SMPROGRAMS\LabProjectTest\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0


SectionEnd

;--------------------------------
;Installer Functions

Function .onInit

!insertmacro MUI_LANGDLL_DISPLAY

FunctionEnd


;--------------------------------

; Uninstaller

Section "Uninstall"

; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LabProject"
DeleteRegKey HKLM SOFTWARE\LabProject

; Remove files and uninstaller
Delete $INSTDIR\makensisw.exe
Delete $INSTDIR\uninstall.exe

; Remove shortcuts, if any
Delete "$SMPROGRAMS\LabProjectTest\*.*"

; Remove directories used
RMDir "$SMPROGRAMS\LabProjectTest"
RMDir "$INSTDIR"

SectionEnd


ok ,

i must uninstall the program first to test the installer again , because it reminds the language selection

is it possible to remove this feature ? i dont consider selecting language at each install as an heavy task for user..


[EDIT]

ok,

i just have to remove
;--------------------------------
;Language Selection Dialog Settings

;Remember the installer language
; !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
; !define MUI_LANGDLL_REGISTRY_KEY "Software\LabProject"
; !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"

[/EDIT]


is it possible to remove this feature ?
To make your installer always ask the user to select a language use

!define MUI_LANGDLL_ALWAYSSHOW

There is no need to remove the MUI_LANGDLL_REGISTRY_ROOT, MUI_LANGDLL_REGISTRY_KEY and MUI_LANGDLL_REGISTRY_VALUENAME defines.

The MUI_LANGDLL_ALWAYSSHOW define ensures the installer always shows the language selection dialog, even if a language has been stored in the registry. The language stored in the registry will be selected by default.

See the "Language Selection Dialog" part of the MUI ReadMe for further details.

Multilingual example in Moreinfo

Multilingual example in Moreinfo plugin. Multi language in an easy extensible way in one of the demos. Will solve a lot of multilanguage language problems.
The "CustomLanguageDemo" Fully shows the power of getting the OS GUI language. I the demo a good example of how custompage localization works and could be implemented.

See the Wikipage

http://nsis.sourceforge.net/wiki/MoreInfo_plug-in

Or take a look in:

http://forums.winamp.com/showthread...hlight=moreinfo

Just try the "CustomLanguageDemo" demo included.