|
|
#1 |
|
Junior Member
|
Am I doing this correctly???
Alright, I've been experimenting with the IfFileExists instruction, and I'm hoping this is right:
code: 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: 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
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2002
Location: France / Paris
Posts: 138
|
I should have read the doc before, but i'll try to remember it
!Well, 3 must mean that "jump 3 lines" ! So 0 is interpreted as a jump 0 line (continue) ! -3 is allowed too !
|
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
A jump can be relative to the current location in the script. In that case use as jump parameter: +q or -q where q is the number of commands from the current command. Eg. +1 would lead to the next instruction, -1 to the previous instruction. So do not forget the sign in the jump and do for example:
to test if this dir exists. Notice that this is not the best thing to d when still developing a script since you will need to adapt all jumps if you add commands to the script. Use labels to jump to a fix location in the script to overcome this problem (just like you did in your script).code: BTW, this is in the NSIS Docs. Running the exe? Not compiling correctly? Do you mean "$INSTDIR\baldurdash.exe" should be some compiler? Use a MessageBox to check the commandline before executing. Maybe something is wrong there and the compiler file cannot find the script file. Try to find out using MessageBoxes (the only way to debug the NSIS code, btw). -Hendri. |
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|