Old 3rd May 2012, 14:35   #1
KC8TNF
Junior Member
 
Join Date: May 2012
Posts: 2
Question MUI_PAGE_CUSTOMFUNCTION_SHOW function

I’m trying to customize the MUI_PAGE_WELCOME, using a custom MUI_PAGE_CUSTOMFUNCTION_SHOW function (change the colors, etc). Which works as intended, but I noticed that if you click the “Back” button on the second page (in my case the LICENSE page), all the custom changes are lost…?

To see an example, copy the code from: http://nsis.sourceforge.net/Demonstrating_Page's_Custom_Functions_Pre_Show_Leave, compile, run, click “No” to see the welcome page, click “Next”, click “Back.”

Is there a way to retain these changes?

Thanks,
KC8TNF is offline   Reply With Quote
Old 3rd May 2012, 17:47   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
That is an example using MUI1 (InstallOptions). I would switch to MUI2 (nsDialogs) which will clean up your code a lot and will avoid this problem. I am not sure why those changes are not staying, though.

Stu
Afrow UK is offline   Reply With Quote
Old 3rd May 2012, 18:27   #3
KC8TNF
Junior Member
 
Join Date: May 2012
Posts: 2
Quote:
Originally Posted by Afrow UK View Post
That is an example using MUI1 (InstallOptions). I would switch to MUI2 (nsDialogs) which will clean up your code a lot and will avoid this problem. I am not sure why those changes are not staying, though.

Stu
I thought nsDialogs was strictly for creating custom pages, not for customizing existing / built-in MUI pages (welcome, license, etc.)? The MUI2 readme lists MUI_PAGE_CUSTOMFUNCTION_SHOW as a method for customizing the interface of a built-in page. Is there another way to do this? Thanks,
KC8TNF is offline   Reply With Quote
Old 3rd May 2012, 20:55   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I think it states this in the MUI2 readme: MUI2 uses nsDialogs to create its welcome and finish pages (these are not "built in"). That is why you must use nsDialogs to alter these two pages if you use MUI2 (for the other pages, nsDialogs is not suitable). With MUI1 you have to write to the ioSpecial.ini file in the page's PRE function because MUI1 uses InstallOptions to create its welcome and finish pages. The method required for MUI1 is not very intuitive and requires more code. In either cases, there are examples if you search.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
customfunction_show, mui

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump