Archive: possible bugs in 2.0b0


possible bugs in 2.0b0
I think I may found some bugs, please tell me if someone else get these, or I'm doing something wrong:

1. the branding text not correctly localized, i use something like


BrandingText /LANG=${LANG_ENGLISH} "English text"
BrandingText /LANG=${LANG_FRENCH} "French text"

what actually happens is that if I choose english, I get the english text but if I choose french I get the default text "NullSoft Install System v2.0b0"


2. I get some strange warnings regarding ComponentText and UninstallText: "specified multiple times, wasting space"
The script is well compiled, but I wanted to understand what's causing this.

I know for sure that I only use each once in the whole script.
So what gives ?

The documentation even encourages the use of ComponentText if multiple sections are present.

thx for any help
Chris

Re: possible bugs in 2.0b0
1. Don't know.
2. Look at ModernUI readme, it is explained there.


The readme should answer "bug" number one too.


Hmmm...



It's seems that everything is in place, but I still can't find the problems :( . I'm pretty sure it's either something very obvious or something that has to do with the order in which in do things in the script (some NSIS voodoo :) ).

The readme doesn't say anything specific to the problems that i encounter, so please be more specific.

Here is how my script looks like


!define MUI_PRODUCT "Product name"
!define MUI_VERSION "1.90"

!include "${NSISDIR}\Contrib\Modern UI\System.nsh"

!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe" ;Select the modern ui version that has the description at bottom

!define MUI_WELCOMEPAGE
!define MUI_LICENSEPAGE
!define MUI_COMPONENTSPAGE
!define MUI_DIRECTORYPAGE

!define MUI_ABORTWARNING

!define MUI_UNINSTALLER
!define MUI_UNCONFIRMPAGE

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"

OutFile "Product v1.90.exe"

LicenseData /LANG=${LANG_ENGLISH} "license.txt"
LicenseData /LANG=${LANG_FRENCH} "license.txt"

BrandingText /LANG=${LANG_ENGLISH} "Product version 1.90"
BrandingText /LANG=${LANG_FRENCH} "Product version 1.90"


;string descriptions follow
;...


ComponentText /LANG=${LANG_ENGLISH} "Something in english"
ComponentText /LANG=${LANG_FRENCH} "Something in french"

InstType "Full instalation"

InstallDir "C:\${MUI_PRODUCT}"
XPStyle on


!insertmacro MUI_SYSTEM


;.... the sections and functions follow


any help is appreciated

Cheers,
Chris

Please read it again (the Define interface settings part). You have to define MUI_BRANDINGTEXT etc.


Joost,

I'm a little confused here,

why doesn't the MultiLanguage.nsi example (that you created :) )
doesn't have no MUI_BRANDINGTEXT definitions ?
I mean the readme says "Define interface settings (optional)"
so it's not mandatory to declare it.

And if I add BrandingText /LANG=.... to MultiLanguage.nsi
then it displays correctly for both languages :confused:
I'll try to see the exact difference between my script and MultiLanguage.nsi .

Can you also tell me why do I get warnings for declaring ComponentText and UninstallText

thx for your help,
Chris


Again, do not use BrandingText etc. in Modern UI scripts.

Optional means that that the Modern UI will use the default Modern UI values if you don't define them.

So you should use:

!define MUI_BRANDINGTEXT "Your brandingtext"

BrandingText works when you put it after all Modern UI stuff, but it wastes space, because the Modern UI already sets it.


Ok,

but how do I localize a branding text then ?
I mean !define doesn't support this, does it ?

and I got it to work properly in MultiLanguage.nsi
if you add there 2 lines after the LicenseDate lines something like


BrandingText /LANG=${LANG_ENGLISH} "English text"
BrandingText /LANG=${LANG_FRENCH} "French text"

the branding text is localized correctly.


And it's not the branding text that causes the wasting space warnings is ComponentText.

I'll keep looking, thx
Chris

C:\Program Files\NSIS\Contrib\Modern UI\Readme.html
!define MUI_BRANDINGTEXT /LANG=${LANG_ENGLISH}
!define MUI_BRANDINGTEXT /LANG=${LANG_FRENCH}
Should do it. Or should it?


I'm sorry, there is a bug with multilanguage branding texts in the Modern UI. Will be fixed ASAP.


Download the updated Modern UI and define MUI_BRANDINGTEXT before the MUI_LANGUAGE macro's:

!define MUI_BRANDINGTEXT "English Installer"
!insertmacro MUI_LANGUAGE "English"

!define MUI_BRANDINGTEXT "French Installer"
!insertmacro MUI_LANGUAGE "French"

Thanks Joost,

It worked :up:


to RIV@NVX:
it doesn't work this way cause !define is much like C style #define
you can only define simbols with no additional params
actually i tried it myself in the beginning :D



now I only have to see about the ComponentText and UninstallText warnings, BTW does anyone have an example of a Modern UI script that uses ComponentText and UninstallText and doesn't get any warnings ?

for me even basic.nsi gets the warning if I add a ComponentText declaration

Cheers,
Chris


Same way (check the language files for the string names):

!define MUI_INNERTEXT_COMPONENTS_TOP "English txt"
!insertmacro MUI_LANGUAGE "English"

!define MUI_INNERTEXT_COMPONENTS_TOP "French txt"
!insertmacro MUI_LANGUAGE "French"

thanks Joost,

I think I have to see think in v2 way :)
I was used to the old way of calling functions
(in fact I'm porting from a nsis v1.x so it seemed
faster to do the /LANG stuff)

and I have to look more inside the language files,
not only into the documentation,

thx again,
Chris