- NSIS Discussion
- Full screen colour
Archive: Full screen colour
southcot
12th May 2009 23:10 UTC
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?
kichik
13th May 2009 16:56 UTC
Examples are the best pointers there are. What have you tried? What doesn't work?
southcot
13th May 2009 17:12 UTC
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.
kichik
13th May 2009 17:53 UTC
Care to go into more detail? The script itself would help figuring out what's wrong.
southcot
13th May 2009 19:18 UTC
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
13th May 2009 19:26 UTC
Can you whittle that down to a minimal test case? :) For example, just a welcome and finish page?
southcot
13th May 2009 19:30 UTC
Guess I could but Kichik was asking for the script I was working on.
kichik
13th May 2009 19:49 UTC
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
13th May 2009 20:15 UTC
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
13th May 2009 21:02 UTC
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
13th May 2009 21:09 UTC
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.
lewellyn
13th May 2009 21:35 UTC
Well, provide us your complete minimal test case and someone's bound to take a look. ;)
kichik
13th May 2009 23:40 UTC
You're missing a BgImage::Redraw call. Before this call, the window is not displayed.
southcot
14th May 2009 07:33 UTC
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