Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Using !system (http://forums.winamp.com/showthread.php?t=326290)

isawen 21st January 2011 16:38

Using !system
 
Hello guys,

Again me and my NSIS problems. Didn't succeed to find this problem in the forum and here I am writing this small question.

How could I stop the NSIS compilation using the !system compile command when the passed command doesn't exist and when it exists it's return values are 2,1 or 0

code:

!system '"file.exe"' = 0



1. When the "file.exe" is not accessible the !system command returns 1 and the compilation stops which is good.
2. When the "file.exe" exists and it's accesible depending on the passed arguments it's return values are 2 in case of errors, 1 in case warning and 0 if all is ok.

How could I handle the build scenario when I would like that the NSIS compilation to not be halted when I potentially got warnings when running the "file.exe" - warnings return code is 1 and I cannot specify multiple conditions to be tested in the !system command?

My only idea is to call it twice but I don't like to have in the compilation log the command line arguments help information.

code:

!system '"file.exe"' = 0 ; shows possible command line arguments
!system '"file.exe" <some_arguments>' = 0 ; this should do the work I need for my NSIS compilation



Is there any other possibility to do this?

Thanks,
Isa

Anders 21st January 2011 16:56

I don't understand your problem...

Afrow UK 21st January 2011 17:46

Don't use any = n?

Stu

isawen 21st January 2011 17:52

If I don't specify any compare value the compilation still continues even if I got:

code:
'"file.exe"' is not recognized as an internal or external command,
operable program or batch file.



I would like to stop the compilation if the program is not found (in this case !system returns 1) or if I got the return code 2 (which signals errors)

isawen 21st January 2011 18:08

I could change the "file.exe" to return 1 in case of errors and 0 if warnings or success.


All times are GMT. The time now is 17:40.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.