Puting an image into a custom page
I am using the HM NIS Edit program and I see there is a Bitmap icon to insert an image I am assuming... but how would you set the image?
Archive: Puting an image into a custom page
Puting an image into a custom page
I am using the HM NIS Edit program and I see there is a Bitmap icon to insert an image I am assuming... but how would you set the image?
Extract the BMP or ICO file at run time to $PLUGINSDIR with File.
-Stu
so I use something like this
File /oname=$PLUGINSDIR\iw.ico iw.ico
then how would I set that to a custom page?
Read the InstallOptions readme. Look at the Text attribute.
-Stu
ohh ok... thanks :)
Well I thought I was set but when I run the script it is blank... I can see the icon on the ini file when I am editing it in HM NIS Edit. You said something about extracting the image before but I wasn’t exactly sure what you meant.
The File instruction code you posted will work.
Make sure you use are using MUI_INSTALLOPTIONS_EXTRACT as well.
-Stu
ok I am sure this is wrong... but I am not sure if I am putting the code in the right spot. When you are talking about using the MUI_INSTALLOPTION_EXTRACT you mean for the image right?
here is my code... I probably butchered this really good lol.
Function IconPage
!insertmacro MUI_HEADER_TEXT "Choose an Icon" "From the selection below"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "iw.ico"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "iconPage.ini"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "iconPage.ini"
File /oname=$PLUGINSDIR\iw.ico iw.ico
FunctionEnd
this is just my custom page. It is all working like it should just not showing the image.
MUI_INSTALLOPTIONS_EXTRACT is for INI files only.
Remove the MUI_INSTALLOPTIONS_EXTRACT "iw.ico" line.
Move the File instruction above the DISPLAY line.
Logically, you can't display the image if you're extracting it after you show the page?
-Stu
ok... I did have it that way before and it wasn't working... I tried that again with the fixes you told me and it still is not showing up.
What path have you specified in the INI file?
It needs to be:
Text=iw.ico
-Stu
yeah that is what I have for it.
Try this before the DISPLAY call:
SetOutPath $PLUGINSDIR
!insertmacro MUI_INSTALLOPTIONS_WRITE "iconPage.ini" "Field #" "Text" "$PLUGINSDIR\iw.ico"
I just realized that when I use the Icon box it works but if I use the Bitmap it dosen't. I guess I have figured out the problem now... thanks for helping :)