Skip to content

Variables

Maeiky edited this page Apr 30, 2019 · 17 revisions

Using Vars

You can define and using varaible inside commands They are always inside bracket '{' '}'

Example:

-c src.cpp -o obj/{_sPlatform}/MyProject/

You can set a variable using: -{YourVar}="Value"

Form

Variables require prefix followed by any uppercase letter

Usual variables prefix:

Prefix Description Example
s String -{sName} = "Bob"
p Path -{pExe} = "C:/Project/"
n Number -{nTotal} = 5
b Boolean -{bIsBool} = true
a Array -{aObj} = [obj1.cpp, obj2.cpp, ...]
w Wide ('/' separator) -{wLib_GZE} = VLiance/GZE/v1.0

Note: There is no real check behind this, this is just for a conventional way


Built-in Vars List

Variable beginning with '_' have internal use by Cwc and have default value. You can also redefine these variables.


_wToolchain : ([Server]/Author/Name[Type]/[Version])

Download & Set current Toolchain

  • Default Server: Github[/releases]
Example:

-#Run Build.cwc -{_wToolchain}= VLianceTool/WebRT


_sPlatform : (Windows/Linux/Web_Emsc/Android/IOS/...)

Plateform name


_sOpt : (Debug/O2/O3/OS)

Optimisation Level


_pOutput: (Path)

Current output directory


_pOutput_Bin: (Path)

Current output binary directory


_pProject: (Path)

Current working directory


_pModule: (Path)

Current module directory (Lib or Toolchain)