Archive: more bitmaps


more bitmaps
How can I specify two different bitmaps for welcome and finish page with modern user interface?


You can't without modifying the Modern UI source code. If you feel you're up to the challenge, it's: Contrib\Modern UI\System.nsh

-Stu


Then I have to recompile?


Hmm I have the same problem, is it necessary to recompile the whole NSIS, I hope not since .nsh files should be includes right?

Anyway I checked System.nsh and it only references:

!insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"

which I assume is to initialize the default image to use...

There currently is no macro or define to set a different image for the finish page. That's why someone would have to modify the Modern UI code (not NSIS source code) to allow for two settings.

Perhaps it would be best to wait for Joost (Modern UI author)to do it for you. I'll have a go, but I don't get home til 5.

-Stu


I was thinking that maybe is possible to create a custom page, but I couldn't find a way to set the bitmap to load in the ini file.


You can write the new image location to ioSpecial.ini in the pre function of the welcome or finish page.


Sorry to be boring, but you may be a little more specific, do you mean I have to modify System.nsh or my script? Maybe you can show some code...
Ok it's a try...


That's a good idea Kichik. Basically, something like this should work:

!define MUI_PAGE_CUSTOMFUNCTION_PRE changeFinishBmp
!insertmacro MUI_PAGE_FINISH

Function changeFinishBmp
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field #" "Text" "$PLUGINSDIR\new.bmp"
FunctionEnd

Note the field number needs changing (no clue which the right one is... you'll have to find out!)

-Stu


Yup it worked perfectly, just for those who are interested the field is 1.

Thank you again Afrow, you saved my life...