![]() |
#1 |
Junior Member
Join Date: Jul 2008
Location: Ivanovo, Russia
Posts: 16
|
![]()
Hello! I need help... I'm trying to create multilanguage setup using MUI2. I'm using defines:
!define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "Header.bmp" !define MUI_WELCOMEFINISHPAGE_BITMAP "Wizard.bmp" All works perfectly, but I need use different images for each language... Witch way I can do it (if it is possible)??? Thank you for your help. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
|
I believe that you can use a variable instead of the filename and fill the variable in onInit with some language string.
I didn't tried it. EDIT: Ooops, it doesn't work... |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jul 2008
Location: Ivanovo, Russia
Posts: 16
|
I trying different ways to solve this problem (image substitution in .onGUIInit, MUI_HEADERIMAGE_BITMAP redefining), but it does not woking... May be ChangeUI function help me? I am a novice in NSIS-script developing and don't know which parameters use for ChangeUI...
|
![]() |
![]() |
![]() |
#4 |
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
LanguageString!
code: My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
![]() |
![]() |
![]() |
#5 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Neither will work because it needs to include the image file at compile time. For the header image you can extract a new image depending on $LANGUAGE and set it with SetBrandingImage. For the welcome and finish pages you should be able to extract a new bitmap file to $PLUGINSDIR overwriting the existing one in a function set with MUI_PAGE_FUNCTION_GUIINIT.
Stu |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Jul 2008
Location: Ivanovo, Russia
Posts: 16
|
Thanks for help. Solution is simple as usual.
![]() |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Jul 2008
Location: Ivanovo, Russia
Posts: 16
|
A new trouble. Method with using LangString is not working (as Afrow UK says). I using an image substitution in .onGUIInit. Script fragment:
*** !include MUI2.nsh *** !define MUI_CUSTOMFUNCTION_GUIINIT GUIInit *** ReserveFile "HeaderEN.BMP" ReserveFile "WizardEN.BMP" *** Function GUIInit File /oname=$PLUGINSDIR\bg.bmp bg.bmp BgImage::SetBg /NOUNLOAD /TILED "$PLUGINSDIR\bg.bmp" BgImage::Redraw /NOUNLOAD IntCmp $LANGUAGE ${LANG_RUSSIAN} End CopyImages CopyImages CopyImages: File /oname=$PLUGINSDIR\modern-header.bmp HeaderEN.bmp File /oname=$PLUGINSDIR\modern-wizard.bmp WizardEN.bmp #MessageBox MB_OK $PLUGINSDIR End: FunctionEnd I see that images in $PLUGINSDIR are replaced. Start and Finish pages are using new WizardEN.BMP (substituted bitmap), but header uses old bitmap... May be old header image has been cached? May be I must make it in other place (I try make it on .onInit, but in this case all images are not changed)? Where is problem? Thanks for support. |
![]() |
![]() |
![]() |
#8 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
As I said you have to use SetBrandingImage as well:
SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp" Edit: I also recommend using LogicLib: ${If} $LANGUAGE == ${LANG_RUSSIAN} ... ${EndIf} Stu |
![]() |
![]() |
![]() |
#9 |
Junior Member
Join Date: Jul 2008
Location: Ivanovo, Russia
Posts: 16
|
SetBrandingImage solves this problem! Now I using LogicLib
![]() BIG thanks for support! |
![]() |
![]() |
![]() |
#10 |
Member
Join Date: May 2007
Posts: 98
|
Greetings
I've tested this Does not work Sample code to write the Thanks... |
![]() |
![]() |
![]() |
#11 |
Member
Join Date: May 2007
Posts: 98
|
Professors ؟؟
I'm waiting ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ ![]() ![]() ![]() ![]() ![]() ![]() ![]() Should I open a new Post |
![]() |
![]() |
![]() |
#12 | |
Member
Join Date: May 2007
Posts: 98
|
no work?
Quote:
|
|
![]() |
![]() |
![]() |
#13 | |||
Member
Join Date: May 2007
Posts: 98
|
Quote:
Quote:
Quote:
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||
![]() |
![]() |
![]() |
#14 |
Member
Join Date: May 2007
Posts: 98
|
PHP Code:
![]() ![]() I do not know Somebody could help Make an example? |
![]() |
![]() |
![]() |
#15 |
Major Dude
|
I think paths to your images are wrong.
The language is not initialized on .onInit, chcek the language immediately after .onInit function finishes. Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2019: www.visual-installer.com or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|