When starting the acdkcfgscript executable without arguments you will receive following output:
CfgScript Interpreter. Copyright 2003-2005 by Roger Rene Kommer, artefaktur
Syntax:
acdkcfgscript <acdk-options> <cfgscript-options> file.csf <script arguments>
acdkcfgscript <acdk-options> <cfgscript-options> -e <scriptcode>
cfgscript-options:
-csfinclude directory insert include search directory
-csfpath directory insert path for the CfgScript class loader
-csfdebug start interpreter in debug mode
-csfdebugonfail branch to debugger if exception is thrown
acdk-options:
common acdk options:
-acdk-home=<pathname> set the path to acdk home directory
-acdk-home <pathname>
-acdk-tools-home=<pathname> set the path to acdk tools home directory
-acdk-tools-home <pathname>
-acdk-path <pathlist> Env path list for ACDKPATH, to find acdk libraries
-acdk-gc run with mark/sweep garbage collection (experimental)
-acdk-rc run with reference counting garbage collection
-acdk-rcgc run with reference counting and mark/sweek gc
-acdk-pa run with PageAllocator garbage collection (default)
-acdk-st run in single thread mode
-cygpath on windows platform runs in cygwin enviromnent
-acdk-enc <char enc> use encoding for console in/output
-acdk-maxmem <number> limit memory usage -1 no limit, otherwise number of MB
-loglevel <loglevel> integer [0(all)-65535(Non)] or
[All|Trace|Debug|Info|Warn|Note|Error|Fatal|None]
The base syntax to start a CfgScript is: cfgscript MyScriptFile.csf
If you want to pass argument to the script: cfgscript MyScriptFile.csf -first -second
These arguments are availabe in the script:
To execute a mini script directly from commandline just use the -e option:
cfgscript -e 'out.println("hello");'
Please note: the quoting of the following code after the -e option depends on the operation system and shell you use.
You can also use the CSFINCLUDES environment variable, to declare a list of include path.
On Unix: export CSFINCLUDES=/usr/local/acdk/extmodules/csf:~/acdk/csf/include
On Windows: set CSFINCLUDES=c:\programr\acdk\extmodules\csf;c:\MyDocs\acdk\csf\include
The -csfpath insert a directory in the CSFPATH environment variable.
Is a list of directory where the CfgScript ClassLoader tries to load CfgScript Classes.