![]() |
#1 |
Junior Member
Join Date: Oct 2007
Posts: 16
|
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?
|
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
|
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
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Oct 2007
Posts: 16
|
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?
|
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Extract the file to $PLUGINSDIR at run time as said and write the exact path into the INI file with MUI_INSTALLOPTIONS_WRITE.
Stu |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Oct 2007
Posts: 16
|
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. |
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
|
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 IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Oct 2007
Posts: 16
|
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" |
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Oct 2007
Posts: 16
|
i got it to work by replacing $pluginsdir with $TEMP
|
![]() |
![]() |
![]() |
#9 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
code: Stu |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|