diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /bin/xcos.bat | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'bin/xcos.bat')
-rwxr-xr-x | bin/xcos.bat | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/bin/xcos.bat b/bin/xcos.bat new file mode 100755 index 000000000..ccbc717b4 --- /dev/null +++ b/bin/xcos.bat @@ -0,0 +1,57 @@ +@ECHO OFF +SETLOCAL ENABLEEXTENSIONS +SET argC=0 +SET bSimu=0 +SET "argList=[" +SET "cmd1=WScilex -e" +FOR %%x IN (%*) DO Set /A argC+=1 + + +IF %argC% EQU 0 ( + START %cmd1% xcos + EXIT /B +) + +FOR %%x IN (%*) DO ( + IF %%x == -simulate ( + SET bSimu=1 + ) ELSE ( + call :strcat %%x + ) +) + +set "argList=%argList% ]" + +IF %argC% EQU 1 ( + IF %bSimu% EQU 1 ( + goto :Syntax + ) +) + +IF %argC% GTR 2 ( + IF %bSimu% == 1 ( + echo Wrong Syntax: When -simulate is used, only one file must be provided + EXIT /B 43 + ) +) + +IF %bSimu% EQU 1 ( + START %cmd1% "importXcosDiagram(%argList%);xcos_simulate(scs_m, 4);" +) ELSE ( + START %cmd1% "xcos(%argList%)" +) +EXIT /B + + +:Syntax +ECHO Start Xcos, the hybrid simulator +ECHO Usage: +ECHO xcos [ file1.xcos, [ file2.xcos ]] +ECHO. +ECHO Possible arguments are: +ECHO -simulate : Start the simulation. Only one file will be accepted. +EXIT /B + +:strcat +set "argList=%argList% '%1', " +goto :eof |