|
|
#1 |
|
Junior Member
|
Readme page for the modern UI
Hi,
I'm new to NSIS. I started using it yesterday, I chose the modern UI, but there's something I can't find: a readme page. Is it possible to include a readme page in a modern UI? If yes, how? Thanks in advance, Pieter De Decker |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
If you launch the main NSIS menu, there is a link to the ModernUI Readme. Or you can browse to it--it's location is ${NSISDIR}\docs\ModernUI\Readme.html
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 400
|
Or, to answer his question, you would have to make a custom page using installoptions, and use my CustomLicense plug-in to display the text from the readme in it.
|
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
D'OH! Sorry pdedecker! I thought you were asking where the readme for MUI was, not how to insert a readme page!
(Thanks JasonFriday!) |
|
|
|
|
|
#5 |
|
Junior Member
|
I already figured out how to use custom pages, but every time I make a change to my readme file (let's just say readme.txt), I have to change it in the custom page too. Does this CustomLicense plug-in allow you to display a .txt?
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 400
|
Yes, thats one of the points of this plugin. The other point is to get around the 1024 char length limit on NSIS strings.
It loads a .txt file into the specified hwnd. When using MUI, use it in the show function. When using classic, initialise the page, pop the hwnd off the stack, then get the hwnd of the control you want the text to go into using GetDlgItem, then set the text using the show function in the CustomLicense plug-in. Example: code: |
|
|
|
|
|
#7 |
|
Junior Member
|
I embedded the code in my script, but it doesn't show my readme. Why?
(you can ignore the double readme page)code: |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 400
|
This line should specify a full path:
code: You have to extract your readme to the $PLUGINSDIR in order to show it: code: Next is pages: Now, the function is what actually shows the page. You only need one function to show the page.code: code: |
|
|
|
|
|
#9 |
|
Junior Member
|
Did I forget something?
Edit: I did the thingy, but it still doesn't work.code: Last edited by pdedecker; 29th August 2006 at 06:57. |
|
|
|
|
|
#10 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
You forgot to pop the HWND after MUI_INSTALLOPTIONS_INITDIALOG. You use $MUI_HWND, but it has an incorrect and outdated value. This makes CustomLicense::LoadFile fail, because it tries to set the text to the wrong window.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#11 |
|
Junior Member
|
I'm sorry, I still don't get it. You see, I'm still very new to this 'programming language'. Can you post the right code please?
|
|
|
|
|
|
#12 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#13 |
|
Junior Member
|
Didn't work. Strange.
|
|
|
|
|
|
#14 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Are you sure you're using the correct id for GetDlgItem? You should use the new HWND field in the INI instead, it's much simpler. Assuming the text field is really [Field 2], use:
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#15 |
|
Junior Member
|
Do I have to insert that line in the Readme function, like this?
By the way, my .ini looks like this:code: code: |
|
|
|
|
|
#16 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Almost, it comes instead of GetDlgItem.
Just for your information, the GetDlgItem line was indeed incorrect. You tried to get the HWND of Field 2, which doesn't exist.code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#17 | |
|
Junior Member
|
Quote:
I can't know such things after a week, can I?code: Anyway, I will try your new code asap. Edit: it's 100% working. |
|
|
|
|
|
|
#18 |
|
Senior Member
Join Date: May 2005
Location: Taranaki, New Zealand
Posts: 400
|
Good to see it works. Always here to help.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|