|
|
#1 |
|
Junior Member
Join Date: Dec 2004
Posts: 3
|
Header image in Modern UI
I am using the Modern UI with the following entries in my .nsi script.
!define MUI_ICON "Messenger.ico" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "STPMessengerTitleSmall.bmp" The icon displays fine but I can't get get the header image to display. Am I missing something? Also the following colors command seems to have no effect: !define MUI_INSTFILESPAGE_COLORS "F0F0F0 000000" Any help would be appreciated. |
|
|
|
|
|
#2 |
|
Major Dude
|
works just fine for me. could you plz attach your script, or an example, where it doesn't work?
hand by comm@nder21 ---------- WiKi pages:CreateInternetShortcut|Enhanced FindWindow|Parse CSV-Data|Open/Close CD-Drive|Installer without Icon|Vista application compatibility |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2004
Posts: 3
|
Here's the whole script
; main.nsi
; Main installer script for use with NSIS Installer ;-------------------------------- ;-------------------------------- ; Let's use the "Modern" UI style !include "MUI.nsh" ;-------------------------------- !define VERSION "3.2.0" !define MUI_ICON "Messenger.ico" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "MessengerTitleSmall.bmp" LangString MUI_TEXT_WELCOME_INFO_TEXT ${LANG_ENGLISH} "Welcome to Messenger Install" LangString MUI_TEXT_WELCOME_INFO_TITLE ${LANG_ENGLISH} "Messenger Install" LangString MUI_TEXT_INSTALLING_TITLE ${LANG_ENGLISH} "Installing Messenger" ; The name of the installer Name "Messenger version ${VERSION}" ; The file to write OutFile "InstallMessenger_v${VERSION}.exe" ; The default installation directory InstallDir $PROGRAMFILES\Messenger${VERSION} ;-------------------------------- ; Pages ;-------------------------------- !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES ; The stuff to install Section "" ;No components page, name is not important ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put files there File /r ..\FilesToInstall\*.* SectionEnd ; end the section |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
1. The header bitmap must be extracted to a temporary location using File/ReserveFile.
2. You must specify the full path to the bitmap. E.g. code: -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2004
Posts: 3
|
Thanks for the reply. After making the .onInit Entry change now a welcome page which wasn't displaying before is coming up. I still don't see the bitmap. The page is completely blank. NSIS seems very tempermental.
|
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Sorry,
ReserveFile "/oname=$PLUGINSDIR\MessengerTitleSmall.bmp" "MessengerTitleSmall.bmp" ...won't work. You'd need to use: SetOutPath $PLUGINSDIR ReserveFile "MessengerTitleSmall.bmp" -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Ok, I think the problem is being caused because you are using LangString's when you aren't including any seperate languages. If you are only using English then you don't need to use LangString's. If you do, MUI just seems to fall to pieces (I have found).
Just use plain !defines rather than LangString's. -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#8 | |
|
Major Dude
Join Date: Mar 2003
Posts: 569
|
Quote:
Did you remember to include the line in your script ?code: |
|
|
|
|
|
|
#9 | |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Quote:
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
|
#10 | |
|
Major Dude
Join Date: Mar 2003
Posts: 569
|
Quote:
Surely there is no harm in using language strings even if the script only uses one language, provided the necessary MUI_LANGUAGE line is used? Some of my installers start out as English-only and end up supporting several languages and I have found it easier to use language strings right from the start. |
|
|
|
|
|
|
#11 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
You need to include the English language:
!insertmacro MUI_LANGUAGE "English" This must be put in after you insert the Page macro's and before you insert any LangStrings. I think the reason that your installer isn't working properly is because you are currently using LangStrings specifying ${LANG_ENGLISH} when you do not have ${LANG_ENGLISH} set (using the MUI_LANGUAGE macro). -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#12 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
There is absolutely no need to add that .onInit code in this topic. For a MUI header image you only need:
!define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "STPMessengerTitleSmall.bmp" But an installer always needs a language, if you are only using Ennglish, you have to include the MUI_LANGUAGE macro for English. |
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Dec 2004
Posts: 17
|
Uninstaller header image
Hi, I have a similar problem, I am successfully displaying my bitmaps in the header using the command !define MUI_HEADERIMAGE_BITMAP but when trying to change the header image of my uninstaller the same header image as the one set by !define MUI_HEADERIMAGE_BITMAP is shown.
How would I set the uninstaller header image. I am using !define MUI_UNHEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange-uninstall.bmp" but it does not work |
|
|
|
|
|
#14 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Use !define MUI_HEADERIMAGE_UNBITMAP "$PLUGINSDIR\file.bmp"
Also remeber it's the path to the Bitmap file on the user's computer, not yours!!! -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#15 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
That's not true, the MUI will extract the file to the users system automatically.
|
|
|
|
|
|
#16 |
|
Junior Member
Join Date: Dec 2004
Posts: 8
|
This doesnt work for me either
!define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" I get no header image without the mui_headerimage_bitmap line i'll get the default |
|
|
|
|
|
#17 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Did you include the language macro? Try to modify a basic example script to see whether the problem is related to your script.
|
|
|
|
|
|
#18 |
|
Junior Member
Join Date: Dec 2004
Posts: 8
|
!insertmacro MUI_LANGUAGE "English"
;-------------------------------- ;Interface Configuration !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" !define MUI_ABORTWARNING ;-------------------------------- ;Pages !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt" I was just modifying the basic script . I added the headerimage_bitmap line and moved the language line to the top |
|
|
|
|
|
#19 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Please see the MUI readme. It shows you how to make a script in steps. You always insert the MUI_LANGUAGE macro after all interface configuration and MUI_PAGE macro's.
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#20 |
|
Junior Member
Join Date: Dec 2004
Posts: 8
|
I did have that there. The only reason I moved it was I was getting an error, which seems to be gone now interestingly enough. maybe it ws something else.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|