Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 2nd September 2004, 00:30   #1
JeronimoColon
Junior Member
 
Join Date: Sep 2004
Location: New York City
Posts: 39
Red face Installing Third-party Software with NSIS

I recently discovered NSIS and I think it's fantastic!

I have already written 3 installation packages with it.

I'm currently upgrading a very old Microsoft installation package (1997) to NSIS and it involves shelling out Microsoft Access Runtime.

My question is I'm want to distribute this as an all-inclusive setup.exe so what's the best approach for this.

The setup function for handling MSAccess Runtime's setup needs to include:
1. Extracting it to a temporary folder.
2. Shelling out the installation.
3. Checking the error code.
4. Cleaning up the temporary directory.

Does NSIS have support for automating/shortcutting these steps or am I going to have to do each one.

If I do have to perform each step - is my approach correct or is there a better way.

Any recommendations, including what command I should use, would be greatly appreciated.

Sincerest Thanks.

jc3
JeronimoColon is offline   Reply With Quote
Old 2nd September 2004, 02:19   #2
KrYpT
Junior Member
 
Join Date: Aug 2003
Posts: 26
You probably could have found this by searching the forum, but anyway:

4 steps = 3 simple lines of code.

code:
(in a section)

File /oname=$PLUGINSDIR\AccessSetup.exe AccessSetup.exe
ExecWait $PLUGINSDIR\AcessSetup.exe $0
StrCmp $0 "0" it_worked it_didnt_work


$PLUGINSDIR is automatically deleted when the installer exits, but you could manually delete the setup program if you want.
KrYpT is offline   Reply With Quote
Old 2nd September 2004, 03:30   #3
JeronimoColon
Junior Member
 
Join Date: Sep 2004
Location: New York City
Posts: 39
Thanx!

BTW, I did spend a great deal of time searching the forum. Probably more that my employer would have liked me spending.

Thanks again.

jc3
JeronimoColon is offline   Reply With Quote
Old 15th September 2004, 18:20   #4
JeronimoColon
Junior Member
 
Join Date: Sep 2004
Location: New York City
Posts: 39
I had to put this one down for a while so I didn't get a chance to test it.

the "/oname=$PLUGINSDIR\" parameter will only allows one file to be copied at a time, so I don't think I can use this because the Access Runtime installer has great number of files and directories.

So, to re-state my original question:
Is there a better or recommended way of doing this?

If not, I'll just copy the directory structure manaually - a pain, but what can you do...

Thanks again.

jc3
JeronimoColon is offline   Reply With Quote
Old 15th September 2004, 18:23   #5
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
have a look at the docs.
search them for the "File" command.
it has more switches than just the "/oname=" ...
Comm@nder21 is offline   Reply With Quote
Old 15th September 2004, 18:28   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
You want to do something like:

SetOutPath "$PLUGINSDIR"
File "local_file.ext"
File ...

-Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp 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