Go Back   Winamp Forums > Developer Center > NSIS Discussion

 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 2nd July 2002, 03:07   #1
japheth
Junior Member
 
Join Date: Mar 2002
Location: Canada
Posts: 10
Send a message via ICQ to japheth Send a message via AIM to japheth
Am I doing this correctly???

Alright, I've been experimenting with the IfFileExists instruction, and I'm hoping this is right:

code:

;called when the install was successful
Function .onInstSuccess
CreateDirectory "$INSTDIR\baldurdashbackup"
IfFileExists "$INSTDIR\baldurdash\abazigal\abazigal.tp2" 0 abaz
ExecWait "$INSTDIR\baldurdash.exe --yes baldurdash/abazigal/abazigal.tp2"
abaz:
IfFileExists "$INSTDIR\baldurdash\balthazar\balthazar.tp2" 0 balth
ExecWait "$INSTDIR\baldurdash.exe baldurdash/balthazar/balthazar.tp2"
balth:
IfFileExists "$INSTDIR\baldurdash\bhaalspawn\bhaalspawn.tp2" 0 bhaal
ExecWait "$INSTDIR\baldurdash.exe baldurdash/bhaalspawn/bhaalspawn.tp2"
bhaal:
IfFileExists "$INSTDIR\baldurdash\romance\romance.tp2" 0 romance
ExecWait "$INSTDIR\baldurdash.exe baldurdash/romance/romance.tp2"
romance:
MessageBox MB_OK "Installation complete."
FunctionEnd



Am I using those labels correctly? So, the 0 tells it to proceed to the next instruction if the file exsits, and the internal label tells it to goto that label if it doesn't exist correct?

I looked at some examples, and some people were using it like this:

code:

IfFileExists "$INSTDIR\blah.tmp" 0 3



What exactly does that 0 3 mean? I tried compiling my script with just numbers as labels, and it spat out some stuff about not being able to use 0-9 or - as labels. However, if I put 0 and an internal label it has no problems.

Oh yeah, it's also not executing that exe correctly for some reason. It runs it, however, the exe doesn't compile the script correctly like it's supposed to. I've tested the exe outside of the installer with the exact same command line instruction, in the exact same directory and it works fine.

Thanks for any help in advance
japheth is offline   Reply With Quote
 
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