Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 14th December 2002, 09:08   #1
pcristip
Junior Member
 
Join Date: Dec 2002
Posts: 26
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
code:

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
pcristip is offline   Reply With Quote
Old 14th December 2002, 11:08   #2
RIV@NVX
Senior Member
 
RIV@NVX's Avatar
 
Join Date: Feb 2002
Location: Rijeka, Croatia
Posts: 396
Send a message via ICQ to RIV@NVX Send a message via AIM to RIV@NVX Send a message via Yahoo to RIV@NVX
Re: possible bugs in 2.0b0

1. Don't know.
2. Look at ModernUI readme, it is explained there.

DriverHeaven Moderator
kX Product Quality Tester
RIV@NVX is offline   Reply With Quote
Old 14th December 2002, 13:42   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
The readme should answer "bug" number one too.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 15th December 2002, 06:08   #4
pcristip
Junior Member
 
Join Date: Dec 2002
Posts: 26
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
code:

!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
pcristip is offline   Reply With Quote
Old 15th December 2002, 11:48   #5
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Please read it again (the Define interface settings part). You have to define MUI_BRANDINGTEXT etc.
Joost Verburg is offline   Reply With Quote
Old 15th December 2002, 12:59   #6
pcristip
Junior Member
 
Join Date: Dec 2002
Posts: 26
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
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
pcristip is offline   Reply With Quote
Old 15th December 2002, 13:43   #7
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
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.
Joost Verburg is offline   Reply With Quote
Old 15th December 2002, 15:50   #8
pcristip
Junior Member
 
Join Date: Dec 2002
Posts: 26
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
code:

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
pcristip is offline   Reply With Quote
Old 15th December 2002, 16:27   #9
RIV@NVX
Senior Member
 
RIV@NVX's Avatar
 
Join Date: Feb 2002
Location: Rijeka, Croatia
Posts: 396
Send a message via ICQ to RIV@NVX Send a message via AIM to RIV@NVX Send a message via Yahoo to RIV@NVX
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?

DriverHeaven Moderator
kX Product Quality Tester
RIV@NVX is offline   Reply With Quote
Old 15th December 2002, 17:44   #10
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
I'm sorry, there is a bug with multilanguage branding texts in the Modern UI. Will be fixed ASAP.
Joost Verburg is offline   Reply With Quote
Old 15th December 2002, 20:46   #11
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Download the updated Modern UI and define MUI_BRANDINGTEXT before the MUI_LANGUAGE macro's:

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

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

Joost Verburg is offline   Reply With Quote
Old 16th December 2002, 02:28   #12
pcristip
Junior Member
 
Join Date: Dec 2002
Posts: 26
Thanks Joost,

It worked


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



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
pcristip is offline   Reply With Quote
Old 16th December 2002, 12:59   #13
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Same way (check the language files for the string names):

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

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

Joost Verburg is offline   Reply With Quote
Old 16th December 2002, 13:16   #14
pcristip
Junior Member
 
Join Date: Dec 2002
Posts: 26
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
pcristip is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump