Autobuild Shell Functions
You can install autobuild 1.0 (e.g. into a virtualenv) from the alternate repository using a command such as (bash):
pip install 'hg+http://bitbucket.org/lindenlab/autobuild-1.0#egg=autobuild'
or (Windows command prompt):
pip install hg+http://bitbucket.org/lindenlab/autobuild-1.0#egg=autobuild
Autobuild offers a set of shell functions for use in
build-cmd.sh scripts which can be added to the environment by inserting lines such as the following into your build script:
if [ "$OSTYPE" == "cygwin" ] then autobuild="$(cygpath -u "$AUTOBUILD")" else autobuild="$AUTOBUILD" fi eval "$("$autobuild" source_environment)"
When invoking autobuild from within your build-cmd.sh, you must convert it to cygwin syntax so that cygwin bash doesn't get confused. However, it is essential to avoid overwriting the AUTOBUILD environment variable itself, or various child programs will, in turn, be confused. Capture the converted autobuild pathname in a different environment variable local to your script. Since bash environment variables are case-sensitive, it works to use autobuild for the cygwin-form path, leaving AUTOBUILD for the native-form path.
Shell functions provided by autobuild:
|pass||Indicates build has succeeded|
|fail $comment||Indicates build has failed, citing $comment in the output|
|fetch_archive $url $archive $md5||Uses curl to download $archive from the $url and checks the downloaded file hash against the $md5 provided.|
|extract $file||Extracts contents of an archive appropriate for the tar extension of $file.|
|calc_md5 $file||Calculate the md5 of $file|
Windows-only shell commands (Cygwin):
|build_vcproj $vcproj $config||Launches a Visual Studio build of $vcproj, building configuration $config.
If $USE_INCREDIBUILD is set, the same build is launched via BuildConsole, Incredibuild's command-line launcher.
|build_sln $sln $config $project||Launches a Visual Studio build using the solution file $sln, configuration $config, and specifying project $project.
If $project is omitted, then the entire solution will be built.
|load_vsvars||Import Visual Studio paths, includes and libs into the shell environment|