Archive: Modern UI Bitmap Replacement


Modern UI Bitmap Replacement
Ok, this is probably faulty because I'm guessing most of this, and it was a very rushed job, but the header and wizard images in my installer aren't displaying, there just white. I have editted both the System.nsh of MUI and of course my own script. I've tried the images in the default folders in NSIS, and now the images are in the folder under the paths currently, and they just will not show.

Here is the script code: (I've removed the file install lists and the uninstall lists to save space.)



; Define your application name
!define APPNAME "Dark Signs"
!define APPNAMEANDVERSION "Dark Signs v0.96.1"

; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\Vectra Media\Dark Signs"
InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "..\DSSetup.exe"

; Use compression
SetCompressor LZMA

; Modern interface settings
!include "MUI.nsh"

!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "C:\Documents and Settings\Ross\Desktop\Vectra Media\DarkSigns\Source\vm.bmp"
!define MUI_ABORTWARNING
!define MUI_FINISHPAGE_RUN "$INSTDIR\darksigns.exe"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\license.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_RESERVEFILE_LANGDLL

Section "Dark Signs" Install

{Removed to save space.}

SectionEnd

Section -FinishSection

WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"

SectionEnd

; Modern install component descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} ""
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;Uninstall section
Section Uninstall

{Removed to save space.}

SectionEnd

BrandingText "Vectra Media"

; eof


I have pasted my MUI into Nopaste to save space in the thread, it can be read here:

http://rafb.net/paste/results/poskne59.html

Many thanks.

You need
!define MUI_HEADERIMAGE
before it as well.

-Stu


Yeah it's not that, it had that in before, but I removed it to see if it would work without it. I'll put it back in though.


Without MUI_HEADERIMAGE, MUI_HEADERIMAGE_BITMAP is completely ignored.

-Stu


Okay. i've fixed it now, but it still doesn't work. Do you have any other ideas?


Firstly try moving the !include MUI.nsh line to the top of your script above anything else.

If that does not work, try putting this in your script:

Function .onInit
InitPluginsDir
FunctionEnd

-Stu


Neither of those fixes worked. :(


I built the exact script that you have there, but used C:\trees.bmp for the image and it works fine.
Perhaps the bitmap that you are trying to use is corrupt or the incorrect format. Try copying it to C:\ and referencing it from there.

-Stu


Nope it still doesn't work! *rips hair out*

Could you make the changes you did with c:\trees.bmp

To change them to c:\darksigns.bmp for the large sidebar and c:\vm.bmp for the header. So I know that I'm changing the right ones.


Can anyone help with this? I'm going to try and get a blank copy of System.nsh and start over if I can find one.


I've just totally remade it, with a clean system.nsh, and it still won't work, if I replace my images with one of the standards, it works fine. But if I put in my own custom bitmaps, it won't display them.

They where created and saved using Photoshop.


Ah ha! I did it, had to make sure it was saved as 8bit Indexed, rather than 16bit RGB.