Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 5th July 2003, 11:20   #1
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
How to display a README after the license page, before anything else?

I need to display a readme file with instructions... Is this supported? I would like to display an rtf or html file. Is their a workaround if a readme file is not supported?

It has to show up after the license page but before anything else. Can someone please help me out with this? Thank you
vbgunz is offline   Reply With Quote
Old 5th July 2003, 11:46   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
This recent thread discusses creating two different directory pages. The same goes to license pages. Note that the license page created by the script will not be able to show RTF files unless you start adding a lot of System.dll commands.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 5th July 2003, 12:30   #3
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
Also if you wanted to display the Readme file outside the installer, e.g. in notepad, you could also use the ExecShell or ExecWait commands to display the required file.

Vytautas
Vytautas is offline   Reply With Quote
Old 5th July 2003, 12:37   #4
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
Thank you Vytautas,

I much rather do it in this fashion; outside of the installer because it holds a bunch of instructions for several custom screens. Where should I place ExecShell or ExecWait in order for the instructions to open up after the license page?

Thank you in advance
vbgunz is offline   Reply With Quote
Old 5th July 2003, 12:52   #5
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
First of all you will need to use this define line
code:
!define MUI_CUSTOMFUNCTION_LICENSE_LEAVE LeaveLicense
after that you will need a function similar to this
code:
Function LeaveLicense
File /oname="$TEMP\readme.txt" "readme.txt"
ExecShell "open" "$TEMP\readme.txt"
FunctionEnd

Note that you should not use ExecWait unless you want the user to close down the readme file before installer proceeds and also note that ExecShell will use the default program to open the file. It would also be a good idea to use the ReserveFile command on the readme file to make sure that it is placed at the start of the installer.

Vytautas
Vytautas is offline   Reply With Quote
Old 5th July 2003, 13:06   #6
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
Thank you Vytautas,

code:
Function LeaveLicense
File /oname=$TEMP\readme.txt readme.txt
ExecShell "open" "$TEMP\readme.txt"
FunctionEnd



Absolutely brilliant! Thank you so very much Your snippet on my 7/2 NSIS build would build fine but would corrupt on the actual run. I simply had to remove the quotes on /oname=...

This is perfect, thank you so much
vbgunz is offline   Reply With Quote
Old 5th July 2003, 13:10   #7
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
Sorry about the quotes, I was not sure if they were needed or not.

Vytautas
Vytautas is offline   Reply With Quote
Old 5th July 2003, 13:16   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Strange.
That shouldn't corrupt the installer...

Never does that for me anyway.
What NSIS version are you using?
Latest CVS?

-Stu
Afrow UK is offline   Reply With Quote
Old 5th July 2003, 13:21   #9
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
I am using the July 2nd Build. It would not corrupt the installer as I can go ahead with install but it would pop up a nasty message stating it cannot open the file (retry, ignore).

Still brilliant, maybe those NSIS guys changed something?
vbgunz is offline   Reply With Quote
Old 5th July 2003, 13:34   #10
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Quote:
Originally posted by vbgunz
I am using the July 2nd Build. It would not corrupt the installer as I can go ahead with install but it would pop up a nasty message stating it cannot open the file (retry, ignore).

Still brilliant, maybe those NSIS guys changed something?
Looks like it...
I'm not going to use the latest CVS then; my scripts are riddled with /oname="blah"

-Stu
Afrow UK is offline   Reply With Quote
Old 5th July 2003, 14:35   #11
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Then your scripts are not written right Afrow. The correct syntax is:

File "/oname=File name with spaces.txt" File.txt

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 5th July 2003, 14:45   #12
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Thanks
Luckily, I found only 1 place where I had used the incorrect syntax.

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

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