Archive: Custom Page Images


Custom Page Images
I was able to make a custom page with using MUI and custom pages. I put an image in it (bmp) and it seemed to work while the compiled installer and the image are in the same directory, but if I move the installer, it no longer shows the image. Any suggestions?


Your image needs to be in $pluginsdir (extract it before you create the custom page), so the path to the image should look something like "$pluginsdir\someimage.bmp" and NOT a path on your local machine "c:\myinstaller\someimage.bmp" etc


Thanks. It makes sense but where do I acutally put my image file then and where do I define the image path to "$pluginsdir\someimg.bmp", in the MUI_INSTALLOPTIONS_EXTRACT line or in my ini file?


Extract the file to $PLUGINSDIR at run time as said and write the exact path into the INI file with MUI_INSTALLOPTIONS_WRITE.

Stu


Thanks guys. I still don't know to do it with the $PLUGINSDIR. This is for others who might read this later. My coworker who did most of the programming for the installer anyway (I'm just skinning it) told me to just put in this:
'File "plugins\soldier.bmp"' into the init function. Then you can just say Text=soldier.bmp in your ini file.


that should probably be File "/oName=$pluginsdir\soldier.bmp" "pathonbuildsystem\soldier.bmp"

and you should also use MUI_INSTALLOPTIONS_WRITE or WriteIniStr to set the full path ("$pluginsdir\soldier.bmp") instead of just soldier.bmp


Hey guys, I'm back at this and it isn't working. I'm not even sure if it worked last time or if it was just a fluke on my computer.

Right now, in my function for my custom page, I have:
!insertmacro INSTALLOPTIONS_EXTRACT "$PLUGINSDIR\soldier.bmp"
!insertmacro INSTALLOPTIONS_WRITE "welcome.ini" "Field 3" "Text" "$PLUGINSDIR\soldier.bmp"


i got it to work by replacing $pluginsdir with $TEMP



ReserveFile `soldier.bmp`
File `/oname=$PLUGINSDIR\soldier.bmp` `soldier.bmp`
!insertmacro MUI_INSTALLOPTIONS_WRITE "welcome.ini" "Field 3" "Text" "$PLUGINSDIR\soldier.bmp"


Stu