Skip to content
⌘ NSIS Forum Archive

Full screen colour

14 posts

southcot#

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?
southcot#
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.
southcot#edited
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
;--------------------------------
lewellyn#
Can you whittle that down to a minimal test case? 🙂 For example, just a welcome and finish page?
kichik#
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.
southcot#
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
lewellyn#
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?
southcot#
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.
southcot#
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