Archive: Background image


Background image
Hi
I'm trying to make a installation CD for my program. My installation is based on the NSIS Example (Example.nsi) that includes a background image. The original path is <<File /oname=$PLUGINSDIR\2.bmp "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp">>. When I change the path to my installation directory <<...."$EXEDIR\mydirectory\Graphics\image.bmp">> I've got the error that it wasn't able to find my image, but it's there and the path is written right. It only works when I type in a unique path like <<"$E:\my...\..\image.bmp">>. But thats not possible because the device letter might change according to different pcs. How can I solve this problem? Please help me


Path to BMP should be relative to directory where is your script.

e.g. File "/oname=pic.bmp" "Art\pic.bmp"


$EXEDIR is a run time constant. You are trying to use it at compile time for the source path when you should only use it with /oname in the destination path. As pospec says, use a source path relative to where the script is located.

Stu


I tryed it but it didn't work. Maybe I've still got a mistake in it.
The directory of my istaller is <<E:\Install>>. This is where my Example.nsi is located. The image is under <<E:\Install\Graphics\image.bmp>>. I worte:
File /oname=$image.bmp "$Graphics\image.bmp"
and a bit later:
BgImage::AddImage /NOUNLOAD $Graphics\image.bmp 150 0
!insertmacro GetReturnValue


Why do you prefix directory name with '$'?


I thought it is a good idea :)


I'm quite new in using Nsis. I didn't know it better.
But how do I have to write it then?


Remove the $.

Stu


Now it works. Thanks for your help