Difference between revisions of "Autobuild"

From Second Life Wiki
Jump to navigation Jump to search
m (No longer suggest people install autobuild with sudo)
 
(39 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Autobuild Nav}}
{{Autobuild Nav}}
__NOTOC__


== 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.
Autobuild is a 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 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.


{{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.}}
 
__TOC__
 
 
'''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. We regret this error.'''


== 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 


=== Installing Autobuild ===
You should use Python 3.7+ for autobuild 3.x.


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
To install with the appropriate python package dependencies, use a tool such as pip or [https://pypa.github.io/pipx/ pipx]:
  python setup.py install
  pip install autobuild
from the top level directory of the working copy.  You may need administrative privilege on your system to install into system command directories.
depending on how your permissions are defined and whether or not you
{{KBnote|If you are using Cygwin on Windows, use <code>python setup.py install</code> rather than running Autobuild directly from the checkout.  This ensures that Cygwin paths are translated to native Windows paths.  You must also add your Python scripts directory (for example <code>C:/Program Files/python26/Scripts</code>) to your PATH.}}
are working within a [http://docs.python-guide.org/en/latest/dev/virtualenvs/ python virtualenv],
you may need to adjust your system <tt>PATH</tt>.


== Running Autobuild ==  
== Running Autobuild ==  
=== Building the Viewer ===
See [[Building the Viewer with Autobuild]]
=== Changing or Adding Build Configuration Details ===
Usage:
Usage:
{{Syntax|autobuild [-v] [--help [HELP]] [--dry-run] [--quiet] [--verbose] [--debug] ''sub-command''
{{Syntax|autobuild ''options'' ''sub-command''
}}
}}


Options:
Supply zero or more options, and one sub-command.
 
'''Options''':
{|border="1" class="lltable"
{|border="1" class="lltable"


Line 31: Line 43:


|--
|--
| -v, --version
| --verbose
| Show version information
| Display verbose output. Useful in diagnosing errors in your configuration.


|--
|--
| --help&nbsp;[HELP]
| --dry-run
| Find all valid Autobuild tools and show help
| Run tool in dry run mode.  ''This mode will print information about what would have been done. It is supported for most subcommands.''


|--
|--
| --dry-run
| --help&nbsp;[''command'']
| Run tool in dry run mode if available
| Find all valid Autobuild tools and show help


|--
|--
Line 47: Line 59:


|--
|--
| --verbose
| -V, --version
| Display verbose output
| Show version information for autobuild


|--
|--
| --debug
| --debug
| Display debug information
| Display debug information; very very verbose, probably of interest only if you are modifying autobuild itself


|}
|}
Line 63: Line 75:
|--
|--
| [[autobuild build|build]]
| [[autobuild build|build]]
| Builds platform targets.
| Build platform targets.
|--
|--
| [[autobuild configure|configure]]
| [[autobuild configure|configure]]
| Configures platform targets.
| Configure platform targets.
|--
|--
| [[autobuild edit|edit]]
| [[autobuild edit|edit]]
Line 81: Line 93:
|--
|--
| [[autobuild package|package]]
| [[autobuild package|package]]
| Creates an archive of build output.
| Create an archive of build output.
|--
|--
| [[autobuild print|print]]
| [[autobuild print|print]]
Line 87: Line 99:
|--
|--
| [[autobuild source_environment|source_environment]]
| [[autobuild source_environment|source_environment]]
| Prints out the shell environment Autobuild-based buildscripts to use (by calling 'eval').
| Print the shell environment Autobuild-based build scripts to use (by calling 'eval').
|--
|--
| [[autobuild uninstall|uninstall]]
| [[autobuild uninstall|uninstall]]
| Uninstall package archives.
| Uninstall package archives.
|--
| [[autobuild upload|upload]]
| upload tool for autobuild
|}
|}


Line 121: Line 130:
* 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]]

Latest revision as of 10:21, 29 September 2022



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.



Linden Lab Autobuild is not the same as or derived from GNU Autobuild, but they are similar enough to cause confusion. We regret this error.

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 3.7+ for autobuild 3.x.

To install with the appropriate python package dependencies, use a tool such as pip or pipx:

pip install autobuild

depending on how your permissions are defined and whether or not you are working within a python virtualenv, you may need to adjust your system PATH.

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.