The Eqela Runtime includes a complete scripting environment for the dynamic installation and execution of various tools and commands. The scripting environment is fully cross-platform and works the same way on Windows, macOS and Linux, and does not depend on or require any other pre-existing environment (like Bash, cmd or Powershell) to operate.

The Eqela Runtime contains a custom scripting interpreter for executing QX scripts. This syntax can be thought of as being somewhere in between a shell script, a makefile and a maven pom.xml file. A sample qx file is shown below for reference:

set helloText Hello

default {
	info This is default action
}

hello {
      info ${helloText}
}

This script defines two functions named "default" and "hello". In qx scripts, the function that is defined first is considered the "default", and is executed automatically if no function name is otherwise specified. This script could then be executed with the eqela command like this (if saved as "sample.qx"):

eqela sample.qx

.. or, to invoke the second function ..

eqela sample.qx hello

Much of the power of the Eqela Runtime, when compiling software or doing other automation tasks, is the ability to automatically download and install the necessary tools and libraries upon execution. This is done with the use keyword in the beginning of the script. The following script downloads a particular version of the Sling compiler (slingc) and the Jkop framework libraries:

use eqela:slingc:r311
use eqela:jkop:20180712
use eqela:dotnet:2.1.301
use eqela:builder:r2

build {
      eqela:slingc myapp -target=netcore -libdir=${eqela:jkop}/src -output=build/myapp -builder=${(eqela:builder)} -BdotnetPath=${eqela:dotnet}
}

The Sling compiler and Jkop framework packages with the specified versions are then automatically downloaded and cached upon execution of the script, and are then referenced in the script where they are needed.

For more examples of qx scripts, see the projects of Eqela in Github.


Twitter Facebook LinkedIn Youtube Slideshare Github