Headless mode allows you to use the Image Builder without going through the Eclipse GUI. The Image Builder still requires Eclipse because it has to be started as an Eclipse application (uses com.prosyst.tools.builder.core.generator application). The Headless implementation of the Image Builder supports all the features included in the regular one. Its intended use is with build tools such as Ant, Maven, etc..
Parameters
The Image Builder command line have the following format:
eclipse -consoleLog -application com.prosyst.tools.builder.core.generator -desc D:/ImTest.img -runtime D:/TestIoT/runtime -output D:/ImTest.zip
The Image Builder in headless mode accepts the following parameters:
Name |
Description |
Usage |
|---|---|---|
desc |
Path to the exported image. |
required |
runtime |
Path to the SDK. |
required |
output |
Destination of the exported image. |
required |
outformat |
Format of the exported image. The default is .zip. |
optional |
Example
Example of using a headless Image Builder inside an Ant script:
<macrodef name="image-generator">
<attribute name= "desc">
<attribute name= "runtime"/>
<attribute name= "output"/>
<attribute name= "outformat" default= "zip"/>
<sequential>
<exec executable= "${eclipse.home}/eclipsec" failonerror= "true ">
<arg value= "-application"/>
<arg value= "com.prosyst.tools.builder.core.generator"/>
<arg value= "-data"/>
<arg value= "${eclipse.home}/workspace"/>
<arg value= "-desc"/>
<arg value= "@{desc}"/>
<arg value= "-runtime"/>
<arg value= "@{runtime}"/>
<arg value= "-output"/>
<arg value= "@{output}"/>
<arg value= "-outformat"/>
<arg value= "@{outformat}"/>
<arg value= "-clean"/>
<arg value= "-noSplash"/>
<arg value= "-consoleLog"/>
<arg value= "--launcher.suppressErrors"/>
</exec>
</sequential>
</macrodef>
<target name= "build-target-image">
<image-generator desc= "D:/ImTest.img"
runtime= "D:/TestIoT/runtime"
output= "D:/ImTest.zip"
outformat= "zip"/>
</target>
This example exports the image from "D:/ImTest.img" to "D:/ImTest.zip" using the runtime located in "D:/TestIoT/runtime".