Old 23rd May 2003, 12:33   #1
Leonard S
Junior Member
 
Join Date: May 2003
Posts: 7
Install a JRE with the NSIS installer

Hello,

i wanna write an installer for Jext.
This java-editor needs a JRE.
I must include the main components of Jext + the latest
JRE.

My Question:
Can NSIS launch the JRE Setup? So, the installer shouldn't only extract the *.exe, it should run the setup of the JRE.

Is this possible?
Thanks
Leonard S is offline   Reply With Quote
Old 23rd May 2003, 12:58   #2
Sunjammer
Major Dude
 
Join Date: Jun 2002
Location: Swindon, UK
Posts: 559
Something like :-
code:
File /oname="$TEMP/jre_setup.exe" jre_setup_exe_filename.exe
ExecWait "$TEMP/jre_setup.exe"

Sunjammer is offline   Reply With Quote
Old 23rd May 2003, 13:50   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
If ExecWait doesn't wait see:
http://forums.winamp.com/showthread....ghlight=%2FSMS

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 23rd May 2003, 14:11   #4
Leonard S
Junior Member
 
Join Date: May 2003
Posts: 7
Ok, thanks!
I'll try it
Leonard S is offline   Reply With Quote
Old 23rd May 2003, 16:52   #5
Leonard S
Junior Member
 
Join Date: May 2003
Posts: 7
After using the code of Sunjammer i was getting an error (screenshot).
It means, that there was an error while overwriting a file (?).

What means "jre_setup_exe_filename.exe"
Which Filename?

Ok, kichik, now i have a look at your link

btw:
With NSIS i can check if Flash-player is installed, right?
Can i also check if a JRE/JDK is installed?
If not, could i use a checkbox at the end of the installation?
Many installers are using checkboxes for "view the readme now" and so on, can i use a checkbox for installing the JRE?
So, if the user checks the box "install the JRE now", the installtion of the JRE starts. (In modern UI)
Attached Images
File Type: png error.png (6.7 KB, 568 views)

Last edited by Leonard S; 23rd May 2003 at 17:24.
Leonard S is offline   Reply With Quote
Old 23rd May 2003, 22:57   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Try (notice the back slash instead of the forward slash):

code:
File /oname="$TEMP\jre_setup.exe" jre_setup_exe_filename.exe
ExecWait "$TEMP\jre_setup.exe"



There have been some threads about detecting JRE. Search the forum and have a look at The Archive too.

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 23rd May 2003, 23:14   #7
Leonard S
Junior Member
 
Join Date: May 2003
Posts: 7
Thanks, i've found one .

Yes, i know, i've changed the slash to a backslash, but i get still this error.

What about the checkbox method?
Leonard S is offline   Reply With Quote
Old 23rd May 2003, 23:16   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
According to that screen shot you haven't changed both, namely the one in the /oname.

Joost or somebody else will have to answer the checkbox question because I can't quite remember right now (it's 2am here ).

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 23rd May 2003, 23:44   #9
Leonard S
Junior Member
 
Join Date: May 2003
Posts: 7
It doesn't work, and yes, i've changed both slashes.
It seems, that the Installer thinks the "JRE" is extracted to "$INSTDIR\$TEMP\jre_setup.exe", but it must be only "$TEMP\jre_setup".
Attached Images
File Type: png error2.png (6.3 KB, 531 views)
Leonard S is offline   Reply With Quote
Old 24th May 2003, 09:46   #10
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Use (without the quotes in /oname):

code:
File /oname=$TEMP\jre_setup.exe jre_setup_exe_filename.exe
ExecWait "$TEMP\jre_setup.exe"


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 24th May 2003, 12:24   #11
Sunjammer
Major Dude
 
Join Date: Jun 2002
Location: Swindon, UK
Posts: 559
Quote:
Originally posted by Leonard S What means jre_setup_exe_filename.exe"
Which Filename?
The file name of the program you have to run to perform the JRE installation.
Sunjammer is offline   Reply With Quote
Old 24th May 2003, 13:53   #12
Leonard S
Junior Member
 
Join Date: May 2003
Posts: 7
Thanks very much dudes.
Now it works
Another Question:
Jext has many files, must i include them all with the "File" command?
Leonard S is offline   Reply With Quote
Old 24th May 2003, 14:29   #13
Sunjammer
Major Dude
 
Join Date: Jun 2002
Location: Swindon, UK
Posts: 559
File /r will recursively add the contents of a directory and wildcards are also supported. See http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.5
Sunjammer is offline   Reply With Quote
Old 24th May 2003, 14:45   #14
Leonard S
Junior Member
 
Join Date: May 2003
Posts: 7
Very Quick answer! Thanks!
Leonard S 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