Archive: Full screen colour


Full screen colour
I've been trying out BgImage::SetBg as I want to cover the whole screen in white with a simple logo displayed in the middle of the screen while the installer runs. I don't seem to be able to get this to work and the examples have proved no help. Can anyone give me any pointers on how to do this?


Examples are the best pointers there are. What have you tried? What doesn't work?


I've tried stripping out parts of the example in the BgImage folder in the NSIS install location. try as I may I can't work out how to get a pure white screen.


Care to go into more detail? The script itself would help figuring out what's wrong.


This was the last attempt:-


Name "Southcot Services Ltd : On Line Backup"
outfile "Test.exe"

;--------------------------------
; Start Includes

!include "LogicLib.nsh"
!include "Locate.nsh"
!include "MUI2.nsh"
!include 'FileFunc.nsh'
!include 'MoveFileFolder.nsh'
!insertmacro Locate

; End Includes
;--------------------------------

Edited after post and replies to reduce length of thread

;--------------------------------
; Start Functions

Function .onInit

SetOutPath $TEMP

BgImage::SetBg /GRADIENT 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
!insertmacro GetReturnValue

File /oname=spltmp.bmp "\\Southcotpdc\users\Charlie-markwick\My Documents\Scripts\Images\Southcot_logo_300dpi.bmp"
advsplash::show 3000 600 400 -1 $TEMP\spltmp
Pop $0
Delete $TEMP\spltmp.bmp

FunctionEnd

Function .onRebootFailed
MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK
FunctionEnd

; End Functions
;--------------------------------

Can you whittle that down to a minimal test case? :) For example, just a welcome and finish page?


Guess I could but Kichik was asking for the script I was working on.


Have to agree with lewellyn here. Would be a whole lot easier figuring it out if just the relevant code was there. Also, if already adding such a large script, attaching it is nicer.


Sorry doing my best to provide what is needed, I am grateful for you taking the time to respond. (Also earlier I couldn't see how to attach a file, I have just seen the message at the bottom of the edit box here :>{.) As far as I can see the relevant code is here:-


Function .onInit

SetOutPath $TEMP

BgImage::SetBg /GRADIENT 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
!insertmacro GetReturnValue

File /oname=spltmp.bmp "\\Southcotpdc\users\Charlie-markwick\My Documents\Scripts\Images\Southcot_logo_300dpi.bmp"
advsplash::show 3000 600 400 -1 $TEMP\spltmp
Pop $0
Delete $TEMP\spltmp.bmp

FunctionEnd

If you can give us a full minimal script that demonstrates the issue, we can more easily tell you exactly what's up.

But I've not tried using a UNC there... What happens if you use a local file?


The logo displays fine and works with the UNC path. What doesn't happen is the whole screen in white and the logo disappears when the installer starts.


Well, provide us your complete minimal test case and someone's bound to take a look. ;)


You're missing a BgImage::Redraw call. Before this call, the window is not displayed.


In itself this made no difference. I revisited the example and noticed that the function was .onGUIInit and not .onInit adding this function and it works in a fashion and certainly enough to get me started on what I want to do. Thanks