![]() |
#1 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Customizing MUI_PAGE_INSTFILES
Sorry if this has been asked before, but my GoogleFu got me nowhere.
I want to customize the MUI_PAGE_INSTFILES page. I have a plugin all worked out that just runs the page when clicked. I currently have tried to use the NSISDialogDesigner to create such a page but when I reference it with 'Page custom fnc_test_Show' , all it does is how the page with all the buttons and stuff that do not do anything and the progressbar does not move. So obviously I'm missing something. My NSIS knowledge isn't the greatest, so if possible, dumb it down for me a tad. Any help is appreciated. edit: This is how it looks currently.. Is there a way to get rid of the top banner, bottom banner, have the image encompass the entire install window and also the progress bar to actually move? I can probably figure out how to remove the banners, but getting the progress bar to work with my installation is my main problem at the moment. |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
To customize the instfiles page you can download Resource hacker and the edit one of the UIs in the Contrib\Ui folder and then apply it with the ChangeUI instruction.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Which one am I supposed to change? When I'm running my installer, it looks exactly like default.exe but when I'm making changes to see if it's the right one(Taking off icon, progress bar), the change isn't going through when I recompile. (Also tried changing a couple other ones too and the change still isn't going through.)
edit: it shows on Resource Hacker, but doesn't on NSIS. |
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
One of the modern*. exe ones should be your startingpoint, depends on your MUI settings. Then save it as yourfile.exe and then add !define MUI_UI ${NSISDIR}\Contrib\UIs\yourfile.exe
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Ok, now I'm getting a hit.. I'm trying to modify modern.exe, i saved it as modern_edited and used '!define MUI_UI ${NSISDIR}\Contrib\UIs\yourfile.exe' as you've stated, but I am getting an error. In Resource Hacker, I removed all controls except for the push buttons and now it's giving me grief for it. Any reason why?
It's trying to find the things that I deleted :/ but I want to get rid of them. |
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
If you saved it as modern_edited then the define also has to point to modern_edited.
You cannot delete all controls but you can make them not visible and/or move them so they are not visible... IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
This may make my life easier. Thanks for being patient with me.
|
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Hi Anders, Sorry to bother you again but I have seen this page from you: http://nsis.sourceforge.net/Image_in...dow_background
and am wanting to incorporate it with what I am trying to do. I want to ONLY use just the MUI_PAGE_INSTFILES. I've been able to get rid of most of the other pages without a problem and cleave all the corresponding page functions but as soon as I try to get rid of MUI_PAGE_FINISH, I get the following error that points to 'Function InstFilesPageShow'. code: And it seems to only trigger on the finish page and I'm wondering why. |
![]() |
![]() |
![]() |
#9 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Quote:
![]() The code on the page you linked to was never tested without a Welcome nor Finish page and when you remove those the MUI_HWND variable is never declared. Add PHP Code:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#10 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
I... may have drank some alcohol without even knowing it. No idea how I associated the two of you as one entity.
Thanks for the help, much appreciated. |
![]() |
![]() |
![]() |
#11 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
One more thing.. I'm now trying to change the color of the progress bar and I've used the following references:
https://nsis-dev.github.io/NSIS-Foru.../t-268395.html http://forums.winamp.com/showthread.php?t=268395 And I've placed the above the page insertions, made sure my installer wasn't XPStyle, and tried turning it off as well. No errors, but no change in color.code: I've also tried this from gfm688 code: but the error I get is that the variables were already defined. I was hoping this was an easier problem. |
![]() |
![]() |
![]() |
#12 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Which variable? The PBM defines? If that is the case you can comment them out or use !ifndef around it. Posting the error message would help or at least tell us the name of the variable or define.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#13 | |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Quote:
It is giving me an error on the SendMessage for PBM_SETBKCOLOR. code: This is the error: code: I have also added the ifndefs as you stated as such before the page inserts code: |
|
![]() |
![]() |
![]() |
#14 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
I think you are confusing variables and defines, defines are transformed into text/numbers early in the compiling stage but are also sometimes used to ensure that some other operation is only done once. Variables are storage slots used in the installer/uninstaller.
This time you just want: Quote:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#15 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Ahh I definitely did confuse the two. I made the appropriate change though and I still got the same error.
SendMessage: ($0,0x409,0,0x000000) I had believed the 2nd variable was supposed to change when I redefined it to 0x2001 |
![]() |
![]() |
![]() |
#16 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
I think the problem is with the 2nd SendMessage, put a dummy !warning between them to make sure. It looks OK from here so I'm not sure what the issue is, not on a Windows machine right now so I can't really check.
The compiler is not very good at telling you what the problem is. SendMessage $0 $1 $2 $3 should compile, replace with real parameters until it fails to compile... IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#17 | |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Quote:
code: |
|
![]() |
![]() |
![]() |
#18 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Just use 0x2001 directly as the 2nd parameter then.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#19 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Did that, error gone, but the color of the progress bar remains green. I've tampered with the numbers too to no avail.
edit: stripped the code down to the bare bones and just to what gfm688 originally recommended with your edits, and it actually works.. guess I've got some digging to do. Thanks a bunch Anders. Last edited by Bungkai; 24th March 2016 at 18:12. |
![]() |
![]() |
![]() |
#20 |
Junior Member
Join Date: Nov 2015
Posts: 23
|
Just an update in case anyone stumbles into the same problem.. taking the other road that Anders told me to take (replace all iterations of MUI_HWND to $1) actually worked perfectly and the color no longer stays green and I'm finally able to play around with the color.
|
![]() |
![]() |
![]() |
#21 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
I'm guessing the window handle in $0 was invalid, probably because of GetDlgItem $0 $0 1004, it should have a FindWindow command before it like it does at the start of the function but for $0
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|