Difference between revisions of "Autobuild/Package Layout"

From Second Life Wiki
Jump to navigation Jump to search
m (add category)
Line 1: Line 1:
=== tarball layout ===
== About autobuild packaging ==


The autobuild tool does not place much in the way of restrictions on how an package is bundled into an archive.  The <nowiki>autobuild package</nowiki> command will simply create an an archive from the build directory gathering all the files which match manifest entries.  When that package is installed using <nowiki>autobuild install</nowiki>, it is just expanded into the ''packages'' subdirectory of the build directory.  That said, there is a recommended layout of various build product which has (mostly) been followed by Linden apps.
=== Pakage layout ===
The following list gives a quick summary of the typical kinds of build product that may end up in a package archive:
*bin
*bin
*cmake
*cmake
Line 11: Line 16:
**lib/python25
**lib/python25
*LICENSES
*LICENSES
==== binaries ====
Executables should be packaged in the ''bin'' directory  of the archive.
==== headers ====
Header files should be packaged in the ''include'' directory of the archive typically in a subdirectory named after the package.  For example one might include the header ''foo.h" for the ''foo'' package in ''include/foo/foo.h''.
==== libraries ====
Static and shared libraries should be packaged in the ''lib'' directory in a subdirectory which matches the build configuration (all lower case).  This is especially important for packages built for windows where debug and release libraries are binary incompatible.  As an example, if the ''foo'' package produces a library ''foo.lib'', the version built with debugging enabled should be bundled in ''lib/debug'' whereas the optimized version should be bundled in ''lib/release''.


=== gotchas ===
=== gotchas ===

Revision as of 16:14, 15 February 2011

About autobuild packaging

The autobuild tool does not place much in the way of restrictions on how an package is bundled into an archive. The autobuild package command will simply create an an archive from the build directory gathering all the files which match manifest entries. When that package is installed using autobuild install, it is just expanded into the packages subdirectory of the build directory. That said, there is a recommended layout of various build product which has (mostly) been followed by Linden apps.

Pakage layout

The following list gives a quick summary of the typical kinds of build product that may end up in a package archive:

  • bin
  • cmake
  • include
    • include/<packagename>
  • lib
    • lib/debug
    • lib/relwithdebinfo
    • lib/release
    • lib/python25
  • LICENSES

binaries

Executables should be packaged in the bin directory of the archive.

headers

Header files should be packaged in the include directory of the archive typically in a subdirectory named after the package. For example one might include the header foo.h" for the foo package in include/foo/foo.h.

libraries

Static and shared libraries should be packaged in the lib directory in a subdirectory which matches the build configuration (all lower case). This is especially important for packages built for windows where debug and release libraries are binary incompatible. As an example, if the foo package produces a library foo.lib, the version built with debugging enabled should be bundled in lib/debug whereas the optimized version should be bundled in lib/release.

gotchas

  1. some existing packages have their libraries located directly under lib, some have them under lib/{debug,relwithdebinfo,release}
  2. python pacakges are not fully supported, as we have not determined how to cleanly organize python module directories for compatibility with multiple python versions
  3. this is not compatible with the legacy package layout used in the indra codebase, they need to be converted to the legacy layout to be used with install.py for now. UPDATE: Brad_Linden has gotten TeamCity to do this for us by using a BuildParam value to configure this (build_legacy_package can be set to true).