Sling programs can be compiled in many different ways, with many combinations of the compiler, libraries, and/or target platforms. The slingbuild package provides simple and straightforward ways to execute commonly used build commands in a reusable way.

Filed under

Slingbuild is a QX script that enables easy execution of commonly used compiling targets using the slingc compiler on the Eqela Runtime. Commonly, Sling programs are also compiled together with Jkop libraries and, in the case of backend server programs, also often with Sympathy libraries. All these are available in multiple versions, which allows developers a great deal of flexibility when building their applications. However, with great flexibility also comes a great amount of things to manage, and sometimes that is unecessary. So slingbuild enables you to hide much of this complexity when it is not needed.

Using slingbuild from the command line

With slingbuild, you can execute commands like this:

eqela eqela:slingbuild:r19 run MyProgram.sling

Each version of slingbuild depends on a fixed set of versions of the dependencies. Like in the case of the above command, slingbuild r19 then uses eqela:slingc:r325, eqela:rocks:r6, eqela:jkop:20180902, eqela:jsh:r4 and .NET Core version 2.1.301 to compile and run your program. Different versions of slingbuild would usually have different versions of the dependencies. But by using slingbuild, you do not necessarily need to keep track of all versions of each of those packages.

Using from QX scripts

You can of course likewise use slingbuild from your build.qx file. This would be a common build script:

use eqela:slingbuild:r19

build {
	eqela:slingbuild buildEqelaPackageFromSource src=src/myprogram name=myprogram vendor=mycompany version=1.0
}

Available functions

The examples above have demonstrated how to use the run and buildEqelaPackageFromSource functions. Many other functions are also available. For a definitive reference, the code of the script itself is the best source of information:

Slingbuild is open source software, and is hosted on github: https://github.com/eqela/slingbuild


Twitter Facebook LinkedIn Youtube Slideshare Github