- NSIS Discussion
- HM NIS Edit Bitmap
Archive: HM NIS Edit Bitmap
cai_sebas
26th November 2003 19:30 UTC
HM NIS Edit Bitmap
I looked everywhere but i couldnt find the answer.
answer: How to/ I cant get a picture in my .ini file with HM NIS Edit.
When i click on bitmap, and then click in the field this appears (picture).
http://imesh-light.com/overig/bitmap.jpg
But where do i specified the file? (Point to the file, so it appears in my setup)
I hope somebody know the answer.
Sebas
kichik
26th November 2003 20:45 UTC
You set the STATE field to a path to the bitmap. See InstallOptions readme for more information.
As for doing that with HM NIS Edit, I don't know if it does the script part for you...
cai_sebas
26th November 2003 21:24 UTC
When i give a path (in the ini files)
[Field 3]
Type=Bitmap
Text=Bitmap
State=C:\warning.bmp
Left=21
Right=42
Top=107
Bottom=126
It doesn't appear im my setup.
Can you tell what im doeing wrong?
Sebas
kichik
26th November 2003 21:41 UTC
Yes, you're giving it a path of a picture on your computer and not on the user's computer. You should extract the BMP to a temporary directory ($PLUGINSDIR would probably work best) and write that path into the INI file using WriteINIStr or the MUI macro - MUI_INSTALLOPTIONS_WRITE.
cai_sebas
27th November 2003 14:38 UTC
Script
With al the help i got i still not managed to put it in my script. :(
So maby somebody else can put it in my script.
I hope somebody can help me,
Sebas
Joost Verburg
27th November 2003 14:44 UTC
I can't find anything in your script related to this question. Please post your latest script that doesn't work.
cai_sebas
27th November 2003 14:55 UTC
I want that in my additionalpage (ioA.ini) (Field 1) a picture appears, i try it but i cant fix it. Ive read that i should use this:
SetOutPath $PLUGINSDIR
File image.bmp
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioX.ini" "Field X" "State" "$PLUGINSDIR\image.bmp"
to show a picture im my additonalpage. But i cant let it work, so please could somebody put it in my script.
----
NL:> Ik wil dat in mijn extra pagina (ioA.ini) een plaatje komt, nou heb ik dit ook gedaan. Het probleem is echter dat als ik de gecompilde installer open geen plaatje zie. Nou is mij toen verteld dat ik door middel van dit:
(Kijk naar de code boven)
Het plaatje op de harde schijf moet zetten zodat ie gebruikt kan worden. Mij lukt dit niet en mijn vraag is dan ook om dit door iemand anders in mijn script te laten zetten
----
Sebas
Joost Verburg
27th November 2003 16:34 UTC
You should use InitPluginsDir.
cai_sebas
27th November 2003 16:42 UTC
Script
Yeah but i dont know how, (where to place this, etc)
So could somebody put it in my script.
Sebas
Joost Verburg
27th November 2003 20:31 UTC
Before using the plug-ins folder.
cai_sebas
29th November 2003 08:38 UTC
Okay, i did every thing you said, it compiles fine, But the image still does not appeaer.
Please take a look at the script and tell me whats wrong.
Sebas
kichik
29th November 2003 13:31 UTC
Oops... You should set the TEXT field not the STATE field. Sorry.
cai_sebas
29th November 2003 13:47 UTC
Yes
Thank you very much!!
It works now. ;)
Sebas
zimsms
8th July 2004 22:03 UTC
Could someone please tell me what I am missing. The image shows up properly in hmedit, and when i look in the created plugins folder the image is there and the value in the ini file point to it correctly. I do not get any compile errors, and I do not see my image at runtime. NSIS v2.0 (May), Windows XP Prof.
pengyou
9th July 2004 11:38 UTC
The InstallOptions "Type=Bitmap" field section is used to display bitmaps.
SMSOfficeHeader.jpg is not a bitmap file, so it does not appear.
If you look at the Contrib\Graphics folders you'll find only two types of file: icons (*.ico) and bitmaps (*.bmp).
zimsms
9th July 2004 12:56 UTC
Ahh, that would be it then. HMEdit allows for .jpgs at design time, I guess that's what threw me off. Is there a way to use a jpeg instead of a bmp?