Deployment scripts are part of Live CVs build, deploy and package process, offering a standardized way to create packages. If you will look into Live CVs main repository or the tutorial repository, you will see a file named livecv.json and live.tutorial.json respectively. These files describe the contents of the repository in terms of modules and dependencies, and the steps required to build, deploy and package the repository with different compilers. The files are used by Live CV's deployment kit in order to determine the repository configuration. Whithin a Live CV repository, the scripts expect to find a file that starts with live and ends with .json extension.
The files are split into the following main sections:
The version, name and webpage are pretty straight forward, so we will go into the other 3.
dependencies defines a list of livecv packages this current package is dependent on. For each list item, the following fields are expected:
components defines a map of components this package will export. The component name is specified by its key. The version of the component is added through the version field:
"components" : { "tutorial" : { "version": "1.0" }, "tutorial.extended" : { "version": "1.0" } }
releases provides a map of items this package can be released to. The form for each release is to provide the key as the release id, and the following set of values as part of the release object:
QTDIR
is standard hereAn example of a release for the gcc compiler in the tutorial package is as follows:
"gcc_64" : { "compiler" : "gcc_64", "environment" : { "OPENCV_DIR" : "opencv_dir", "QTDIR" : "qtdir" }, "build" : [ {"qmake" : ["-recursive"]}, {"make" : []} ], "deploy" : [ { "copy" : { "{release}/bin" : { "plugins" : { "tutorial": "plugins/tutorial" } }, "{source}/samples/tutorial" : "samples/tutorial" } } ] },
The environment captures our QTDIR
and OPENCV_DIR
environment variables, during our build we launch our qmake and make processes, and in the deployment part we copy the "plugins/tutorial" directory from the release/bin directory, as well as the "samples/tutorial" directory from our source code. The copy command takes a set of keys that define the files or directories to be copied, and a set of relative paths to which the entries will be copied to in the deployment dir (e.g. "{source}/samples/tutorial" : "samples/tutorial"
will be copied to our deployment directory in "samples/tutorial".