Difference between revisions of "Autobuild"

From Second Life Wiki
Jump to navigation Jump to search
m
m
(45 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{RightToc}}
{{Autobuild Nav}}
Autobuild is an in-house framework for maintaining and building libraries. It acts as director providing a common interface to build and package libraries, but it is not a build system like make or cmake. You will still need platform specific make, cmake, or project files to actually configure and build your library. Autobuild will, however, allow you invoke these commands and package the product with a common interface. (''for Linden old hands: Autobuild is designed as a replacement for the old [https://svn.lindenlab.com/svn/lindenlib/trunk lindenlib] policies, doing the right thing so you don't have to.'')
 
{{KBwarning|
These instructions ''will not work'' with viewer-release because they are being updated to build the 64bit (Alex Ivy) repository; for instructions that will work on other repositories, use the '''history''' tab above to view the instructions from 15 Jun 2017.
 
Be aware that upgrading the tools on your system to those described here will mean that you will not be able to build older versions of the viewer.
}}
 
== Overview ==
Autobuild is a framework for building packages and for managing the dependencies of a package on other packages. It provides a common interface to configuring and building any package, but it is not a build system like make or cmake. You will still need platform-specific make, cmake, or project files to configure and build your library. Autobuild will, however, allow you invoke these commands and package the product with a common interface.


{{KBcaution|Linden Lab Autobuild is not the same as or derived from [http://josefsson.org/autobuild/ GNU Autobuild], but they are similar enough to cause confusion.}}
{{KBcaution|Linden Lab Autobuild is not the same as or derived from [http://josefsson.org/autobuild/ GNU Autobuild], but they are similar enough to cause confusion.}}
{{KBnote|This page and the rest of the autobuild documentation is in the process of being updated for the changes between autobuild 0.8 and autobuild 1.0 - if you are having difficulties, ask for help on the [[OpenSource-Dev]] mailing list.}}


== Getting Autobuild ==
== Getting Autobuild ==


Autobuild is available as a Mercurial repository:
Autobuild is under active development, so it's recommended that you get the latest version and keep it up to date.
https://bitbucket.org/lindenlab/autobuild
 
You should use Python 2.7 for autobuild 1.1 (python version 2.6.6 may work for most subcommands, but will complain).


== Running Autobuild ==
To install with the appropriate python package dependencies, use:
pip install 'hg+https://bitbucket.org/lindenlab/autobuild-1.1#egg=autobuild'
depending on how your permissions are defined and whether or not you
are working within a [http://docs.python-guide.org/en/latest/dev/virtualenvs/ python
virtualenv], you may need to run that under the <tt>sudo</tt> command.


You can either run the autobuild command directly from the "bin" directory in a working copy of that repository, or install it as a normal python package by running
{{KBcaution|Projects that have not yet upgraded to autobuild 1.1 will need the version of autobuild from
  python setup.py install
https://bitbucket.org/lindenlab/autobuild
from the top level directory of the working copy. You may need administrative privilege on your system to install into system command directories.
or
  https://bitbucket.org/lindenlab/autobuild1.0
those versions are deprecated; users are strongly urged to move to version 1.1.}}


== Running Autobuild ==  
== Running Autobuild ==  
=== Building the Viewer ===
See [[Building the Viewer with Autobuild]]
=== Changing or Adding Build Configuration Details ===
Usage:
Usage:
      <nowiki>autobuild [-v] [--help [HELP]] [--dry-run] [--quiet] [--verbose]</nowiki>
{{Syntax|autobuild ''options'' ''sub-command''
                <nowiki>[--debug]</nowiki>
}}
               
                <nowiki>{installables,configure,package,edit,upload,manifest,build,install,print,source_environment,uninstall}</nowiki>
                <nowiki>...</nowiki>


Sub Commands:
Supply zero or more options, and one sub-command.


:;<nowiki>build</nowiki>
'''Options''':
::<nowiki>Builds platform targets.</nowiki>
{|border="1" class="lltable"
:;<nowiki>configure</nowiki>
::<nowiki>Configures platform targets.</nowiki>
:;<nowiki>edit</nowiki>
::<nowiki>Manage build and package configuration.</nowiki>
:;<nowiki>install</nowiki>
::<nowiki>Fetch and install package archives.</nowiki>
:;<nowiki>installables</nowiki>
::<nowiki>Manipulate installable package entries in the autobuild configuration.</nowiki>
:;<nowiki>manifest</nowiki>
::<nowiki>Manipulate manifest entries to the autobuild configuration.</nowiki>
:;<nowiki>package</nowiki>
::<nowiki>Creates an archive of build output.</nowiki>
:;<nowiki>print</nowiki>
::<nowiki>Print configuration.</nowiki>
:;<nowiki>source_environment</nowiki>
::<nowiki>Prints out the shell environment Autobuild-based buildscripts to use (by calling 'eval').</nowiki>
:;<nowiki>uninstall</nowiki>
::<nowiki>Uninstall package archives.</nowiki>
:;<nowiki>upload</nowiki>
::<nowiki>upload tool for autobuild </nowiki>


Options:
|--
:{|border="0" cellpadding="5" style="border-collapse: collapse; border-style: none;"
! Option
! Description


|- style="vertical-align: top;"
|--
|<nowiki>-v, --version</nowiki>
| --verbose
| Display verbose output. Useful in diagnosing errors in your configuration.


|- style="vertical-align: top;"
|--
|<nowiki>--help&nbsp;[HELP]</nowiki>
| --dry-run
|<nowiki>find all valid Autobuild Tools and show help</nowiki>
| Run tool in dry run mode.  ''This mode will print information about what would have been done. It is supported for most subcommands.''


|- style="vertical-align: top;"
|--
|<nowiki>--dry-run</nowiki>
| --help&nbsp;[''command'']
|<nowiki>run tool in dry run mode if available</nowiki>
| Find all valid Autobuild tools and show help


|- style="vertical-align: top;"
|--
|<nowiki>--quiet</nowiki>
| --quiet
|<nowiki>minimal output</nowiki>
| Display minimal output


|- style="vertical-align: top;"
|--
|<nowiki>--verbose</nowiki>
| -V, --version
|<nowiki>verbose output</nowiki>
| Show version information for autobuild


|- style="vertical-align: top;"
|--
|<nowiki>--debug</nowiki>
| --debug
| Display debug information; very very verbose, probably of interest only if you are modifying autobuild itself
 
|}


'''Sub-commands'''
{| class=lltable border=1
|--
! Sub-command
! Description
|--
| [[autobuild build|build]]
| Build platform targets.
|--
| [[autobuild configure|configure]]
| Configure platform targets.
|--
| [[autobuild edit|edit]]
| Manage build and package configuration.
|--
| [[autobuild install|install]]
| Fetch and install package archives.
|--
| [[autobuild installables|installables]]
| Manipulate installable package entries in the autobuild configuration.
|--
| [[autobuild manifest|manifest]]
| Manipulate manifest entries to the autobuild configuration.
|--
| [[autobuild package|package]]
| Create an archive of build output.
|--
| [[autobuild print|print]]
| Print configuration.
|--
| [[autobuild source_environment|source_environment]]
| Print the shell environment Autobuild-based build scripts to use (by calling 'eval').
|--
| [[autobuild uninstall|uninstall]]
| Uninstall package archives.
|}
|}


Line 87: Line 127:
; [[Autobuild Class Model]]
; [[Autobuild Class Model]]
: Describes the fundamental objects in the autobuild design and the relationships between them.
: Describes the fundamental objects in the autobuild design and the relationships between them.
; [[Autobuild Package Examples]]
; [[Autobuild Package Examples|Autobuild Examples]]
: Links to packages built with autobuild.
; [[Build Script Anatomy]]
: An annotated build script typical of those used to build third party libraries.
; [[Autobuild Shell Functions]]
: A description of all shell functions provided by Autobuild for use in build scripts.


== Contributing to Autobuild ==
== Contributing to Autobuild ==
Line 95: Line 140:
* Discussion of and help with Autobuild are available on the [https://lists.secondlife.com/cgi-bin/mailman/listinfo/opensource-dev opensource-dev mailing list] and the [irc://irc.freenode.org/%23opensl #opensl channel on the freenode.org IRC network].
* Discussion of and help with Autobuild are available on the [https://lists.secondlife.com/cgi-bin/mailman/listinfo/opensource-dev opensource-dev mailing list] and the [irc://irc.freenode.org/%23opensl #opensl channel on the freenode.org IRC network].
* Bug reports and feature suggestions are tracked in the [https://jira.secondlife.com/browse/OPEN Open Development project on jira.secondlife.com].
* Bug reports and feature suggestions are tracked in the [https://jira.secondlife.com/browse/OPEN Open Development project on jira.secondlife.com].
** Suggested patches for issues from the jira are reviewed on our [https://codereview.secondlife.com code review system] (see [[Code Review Tool|the documentation on how to use it]]).
** Testing procedures for patch submissions are documented here: [[Autobuild/Integration]]


[[Category:Autobuild]] [[Category:Open Source Portal]]
[[Category:Autobuild]] [[Category:Open Source Portal]]

Revision as of 11:09, 16 June 2017


KBwarning.png Warning:

These instructions will not work with viewer-release because they are being updated to build the 64bit (Alex Ivy) repository; for instructions that will work on other repositories, use the history tab above to view the instructions from 15 Jun 2017.

Be aware that upgrading the tools on your system to those described here will mean that you will not be able to build older versions of the viewer.

Overview

Autobuild is a framework for building packages and for managing the dependencies of a package on other packages. It provides a common interface to configuring and building any package, but it is not a build system like make or cmake. You will still need platform-specific make, cmake, or project files to configure and build your library. Autobuild will, however, allow you invoke these commands and package the product with a common interface.

KBcaution.png Important: Linden Lab Autobuild is not the same as or derived from GNU Autobuild, but they are similar enough to cause confusion.
KBnote.png Note: This page and the rest of the autobuild documentation is in the process of being updated for the changes between autobuild 0.8 and autobuild 1.0 - if you are having difficulties, ask for help on the OpenSource-Dev mailing list.

Getting Autobuild

Autobuild is under active development, so it's recommended that you get the latest version and keep it up to date.

You should use Python 2.7 for autobuild 1.1 (python version 2.6.6 may work for most subcommands, but will complain).

To install with the appropriate python package dependencies, use:

pip install 'hg+https://bitbucket.org/lindenlab/autobuild-1.1#egg=autobuild'

depending on how your permissions are defined and whether or not you are working within a [http://docs.python-guide.org/en/latest/dev/virtualenvs/ python virtualenv], you may need to run that under the sudo command.

KBcaution.png Important: Projects that have not yet upgraded to autobuild 1.1 will need the version of autobuild from
https://bitbucket.org/lindenlab/autobuild

or

https://bitbucket.org/lindenlab/autobuild1.0
those versions are deprecated; users are strongly urged to move to version 1.1.

Running Autobuild

Building the Viewer

See Building the Viewer with Autobuild

Changing or Adding Build Configuration Details

Usage:

autobuild options sub-command

Supply zero or more options, and one sub-command.

Options:

Option Description
--verbose Display verbose output. Useful in diagnosing errors in your configuration.
--dry-run Run tool in dry run mode. This mode will print information about what would have been done. It is supported for most subcommands.
--help [command] Find all valid Autobuild tools and show help
--quiet Display minimal output
-V, --version Show version information for autobuild
--debug Display debug information; very very verbose, probably of interest only if you are modifying autobuild itself

Sub-commands

Sub-command Description
build Build platform targets.
configure Configure platform targets.
edit Manage build and package configuration.
install Fetch and install package archives.
installables Manipulate installable package entries in the autobuild configuration.
manifest Manipulate manifest entries to the autobuild configuration.
package Create an archive of build output.
print Print configuration.
source_environment Print the shell environment Autobuild-based build scripts to use (by calling 'eval').
uninstall Uninstall package archives.

Background and Tutorials

Autobuild How To
A tutorial introduction to using autobuild
Autobuild Lexicon
A list of terms and how they are used in the context of autobuild
Autobuild Package Layout
Describes the standard directory tree for packages managed with autobuild
Autobuild Quick Start
A basic walkthrough of how to add autobuild management to an existing software project
Autobuild Class Model
Describes the fundamental objects in the autobuild design and the relationships between them.
Autobuild Examples
Links to packages built with autobuild.
Build Script Anatomy
An annotated build script typical of those used to build third party libraries.
Autobuild Shell Functions
A description of all shell functions provided by Autobuild for use in build scripts.

Contributing to Autobuild

Autobuild is open source. Improvements are most welcome.