- NSIS Discussion
- Problems with latest CVS build and Modern UI
Archive: Problems with latest CVS build and Modern UI
bradharding
5th September 2003 01:03 UTC
Problems with latest CVS build and Modern UI
Hi!
I'm having a couple of problems with the latest CVS build of NSIS, using Modern UI, and I'm not sure if it's something I need to change in my code.
1) The subtitle text in the window titlebar for each page is back when before I could just use Caption "${MUI_TITLE}" to disable it.
2) I've been using SetFont to change the font used on each page. That still works fine for all pages except for the inner dialog text on the license page, which stays at 8-point tahoma/ms sans serif/whatever.
3) Using !define MUI_BRANDINGTEXT " " no longer works. The default branding text is there, regardless.
I've put the !define's for the settings for each page before the !insertmacro command for the pages (which solved a few errors), but no idea what to do now....
Any ideas?
Thanks in advance..
Brad.
bradharding
5th September 2003 03:04 UTC
Well, I've resolved 1) and 3), but am having no luck with 2). Is this an oversight in the Modern UI code, or could I be doing something wrong? I'm guessing that SetFont should set the font for all pages, like it has previously....
Regards,
Brad.
R@m00n
5th September 2003 13:40 UTC
I've one problem:
I want one license page but the license file should depend on the language.
How can I do this with the latest Snapshot?
kichik
5th September 2003 13:41 UTC
LicenseLangString.
R@m00n
5th September 2003 13:42 UTC
Thanks,
I'll try.
R@m00n
5th September 2003 13:57 UTC
I'm using the following code:
LangString LicenseLangString ${LANG_ENGLISH} "License.rtf"
LangString LicenseLangString ${LANG_GERMAN} "Lizenz.rtf"
!define MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_PAGE_LICENSE LicenseLangString
I get only:
LicenseData: open failed "LicenseLangString"
Usage: LicenseData local_file_that_has_license_text | license_lang_string
Error in macro MUI_PAGE_LICENSE on macroline 15
kichik
5th September 2003 14:08 UTC
The command LicenseLangString...
LinceseLangString myLicense ${LANG_ENGLISH} "license.rtf"
LinceseLangString myLicense ${LANG_GERMAN} "license-german.rtf"
LicenseData $(myLicesnse)
or
!insertmacro MUI_PAGE_LICENSE $(myLicense)
R@m00n
5th September 2003 15:28 UTC
Ok, can you perhaps give me a whole example.
If I try to use LicenseLangString before the Language loading I get "LicenseLangString "myLicense" set multiple times for 0, wasting space (...)".
So it doesn't load the license and the field is blank.
If I use the code after language initialisation it's blank cause it's after the !insertmacro MUI_PAGE_LICENSE $(myLicense)
If I use the language initialisation before the page command I'm getting one warning after the other that some strings are missing and many fields are blank.
kichik
5th September 2003 15:47 UTC
Fixed in latest CVS version.
It wasn't because you've defined the LangString after you've used it, you should be able to do that. The right way is to use the LangString created by LicenseLangString before you set it.
bradharding
5th September 2003 23:35 UTC
Hi Joost,
Followed the link you gave, but I'm not sure how or where it'll help me resolve the issue I'm having.
It seems that for whatever reason, I'm unable to change the font on the license page, whereas every other page is displayed fine. I've put all the page settings before inserting the page, but other than that, it has worked as it should in the past. I've attached my nsi file. Any ideas?
Thanks in advance.
Brad.
kichik
5th September 2003 23:43 UTC
Assuming you are talking only about the license data itself your answer is that RTF has its own font settings. To change the font for the license data you should change the RTF or use a text file instead.
bradharding
5th September 2003 23:54 UTC
Thanks kichik, but no, I'm referring to the inner dialog text on the license page. (sorry, should have been clearer). The header text and button text are fine, and the overall width of the window is fine to match the other pages. I've attached a screenshot of the page to show you what I mean.
kichik
6th September 2003 10:48 UTC
Fixed in latest CVS version. I have also improved SetFont so you can set a different font for every language from the script.
Brummelchen
6th September 2003 12:01 UTC
>> Using !define MUI_BRANDINGTEXT no longer works.
i can copy this :(
CVS from this morning.
Joost Verburg
6th September 2003 12:34 UTC
You should use the normal BrandingText command.
Brummelchen
6th September 2003 12:53 UTC
huh?
Important: Because the Modern UI has its own macro system, its own default settings and a lot of new features, the interface configuration works differently. So you should not use commands like Icon, BrandingText etc.
Joost Verburg
6th September 2003 13:23 UTC
I'll change that. Because of the new langauge stuff, the Modern UI doesn't need it own BrandingText setting anymore.
Brummelchen
6th September 2003 13:24 UTC
@Joost
the change must be somewhere between 30-08 and 03-09.
all versions from september has bugs like "brandingtext has already been defined"
the version from 30-08 works fine here - i have to step back to get all my scripts so far to work.
little bit disappointed and angry about that.
Joost Verburg
6th September 2003 13:50 UTC
Please read http://forums.winamp.com/showthread....hreadid=148146
A lot has changed, you should not use MUI_BRANDINGTEXT anymore. You should also make other changes to make your script compatible (as descriped in that topic).
bradharding
7th September 2003 00:19 UTC
Thanks, everyone!
Now it works as before.
Just one other query: I've been experimenting with SetCtlColors, and have been able to set the background colour of all things on all pages except for two problems:
How do you set the background colour of the inner dialog of the start menu page? Becuase it doesn't have a custom show page, is it possible at all?
Also, how do you set the background colour of the branding text without the horizontal bevelled line disappearing altogether. Using the following example in the documentation does just that:
Function .onGUIInit
# 1028 is the id of the branding text control
GetDlgItem $R0 $HWNDPARENT 1028
CreateFont $R1 "Tahoma" 10 700
SendMessage $R0 ${WM_SETFONT} $R1 0
# set background color to white and text color to red
SetCtlColors $R0 FFFFFF FF0000
FunctionEnd
Thanks again.
Brad.
kichik
7th September 2003 09:43 UTC
As for the StartMenu, not yet. See http://sourceforge.net/tracker/index...49&atid=373088
For the branding in the MUI you need to set the background to control number 1256. I have added an option in latest CVS to combine both colors and /BRANDING. Use:
GetDlgItem $0 $HWNDPARENT 1256
SetCtlColors $0 /BRANDING FF0000
sealite
7th October 2003 13:52 UTC
I've updated my kit to use:
LicenseLangString myLicense ${LANG_ENGLISH} "license/en/license.txt"
...
but i want to copy it to the install dir BUT if I try:
File $(myLicense)
it tell that file does not exists!!
How do I resolve this problem ?
(Did I mention, the license is working and it's loaded in the kit but i need to copy it to the destionation foloder and create a link to it)
kichik
7th October 2003 14:00 UTC
$(myLicense) contains the text of the license and is a runtime "variable". You would have to copy the right license according to the language select (StrCmp $LANGUAGE ...).
sealite
7th October 2003 14:07 UTC
Imagine that now I have 5 languages and the list will grow soon. Do I have to include assembles style if/else code for every change?
I think we need a better way, quick.
Any ideea?
kichik
7th October 2003 14:14 UTC
You can always create a nice little macro.