Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 14th April 2006, 00:28   #1
JATO
Junior Member
 
Join Date: Sep 2005
Location: Sacramento CA
Posts: 24
Question copying files from compiled EXE

Searched the forum and can't find a solution/suggestion for my very basic NEWB issue.

Can't get NSIS to copy 3 files that are added into the
EXE file at time of compile.
code:

File "Mapifix.exe"
File "ETSTempfix.exe"
File "ETS Temp fix.bat"
CopyFiles "$EXEDIR\ETSTempFix.exe" "$INSTDIR\ETSTempfix.exe"
CopyFiles "$EXEDIR\Mapifix.exe" "$INSTDIR\Mapifix.exe"
CopyFiles "$EXEDIR\ETS Temp Fix.bat" "$INSTDIR\ETS Temp fix.bat"



Do I have to define the EXEDIR? Isn't that predefined variable which means the files are part of the compiled EXE?

Any assistance would be appreciated.. I'm not understanding the User Manual when it comes to copying files from the EXE
JATO is offline   Reply With Quote
Old 14th April 2006, 03:29   #2
dienjd
Senior Member
 
Join Date: Oct 2005
Posts: 189
Your installer extracts files to the destination machine. You've done this with "File." CopyFiles is for copying files from one spot on the destination machine to another, which I don't think you want to do in this case.
code:

SetOutPath $INSTDIR
File "Mapifix.exe"
File "ETSTempfix.exe"
File "ETS Temp fix.bat"


Try running that (assuming those 3 files are in the same directory on your computer as your script--if not, enter their full paths). You'll see those files in are now on the destination machine in $INSTDIR. So you had the right code...you were just trying to do an extra step that's not necessary.
dienjd is offline   Reply With Quote
Old 21st April 2006, 02:12   #3
JATO
Junior Member
 
Join Date: Sep 2005
Location: Sacramento CA
Posts: 24
OK... now I'm not getting the copied failed errors..thank you
but no files were copied into the Directory
The directory is there.. but empty.

The 3 files are in the same directory as the script..but how do I know they were added to the EXE when it was compiled?

I searched the user manual.. but can't find the command to ensure they are added to the EXE.. so I think my EXE doesn't have the 3 files compressed into it.

Do I need to put something in the "Function .onInit" command?
JATO is offline   Reply With Quote
Old 21st April 2006, 03:59   #4
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
If you want to test your script, then why don't you try setting the OutPath to a different folder than your script? Otherwise, how are you going to know that anything actually happened?

Also:
The compiler does a pretty good job of complaining if there are any errors adding files to your EXE. If there were any problems, compiling will stop.

And if you look closely at the compiler's log, you'll see where each file was added. It will look something like this:
code:

File: "example1.nsi" [compress] 388/831 bytes



If you need more help, I suggest you look at some of the examples included with NSIS. (The compiler example above came from the EXAMPLE1.NSI script located in the NSIS install folder.)
Comperio 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