<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css">
<title>
Gambas Documentation - How To Package Gambas
</title>
</head>
<div class="path">&nbsp;<a href="../help.html"><img class="flag" alt="Home" border="0" src="../../img/lang/en.png" align="center"></a>&nbsp;/&nbsp;<a href="../howto.html">howto</a>&nbsp;/&nbsp;package&nbsp;</div>
<div>
<div class="title">
How To Package Gambas
</div>
This file won't explain you how to make the packages, but the structure they
must follow.
<p>
Gambas <b>must</b> be packaged the way described in this document, because the
development environment relies on this structure when it creates a package
of a gambas project.
<p>
If a distribution does not follow this requirement, then the packages
generated by the development environment won't be able to be installed,
and the user will be very unhappy.
<p>
Not all distributions make correct gambas binary packages at the moment.
So, if you are a packager from these distributions, and if you read this
text, please try to help Gambas work on your distribution.
<p>
Thanks in advance,
<p>
<b>Beno&icirc;t.</b>
<p>
<hr>
<h2>SPECIFICATIONS FOR GAMBAS 1.0.x</h2>
<p>
Gambas binary packages must follow the following names and contents:
<p>
<h3>The runtime package</h3>
<p>
This package includes the Gambas interpreter needed to run Gambas
applications.
<p>
It contains:
<ul>
<li>The interpreter: <tt>gbx</tt>.
<li>The informer: <tt>gbi</tt>.
<li>The internal <a href="../def/component.html">component</a> description: <tt>lib.gb.<a href="../def/component.html">component</a></tt>, <tt>gb.info</tt> and <tt>gb.list</tt>.
<li>The readme files, <tt>TODO</tt> files, and so on.
<p>
</ul>

Its name must be <u><tt>gambas-runtime</tt></u>.
<p>
This package must register the <tt>application/x-gambas</tt> mime type as specified by the <tt>application-x-gambas.xml</tt> file and
the <tt>application-x-gambas.png</tt> icon.
<p>
<h3>The component packages</h3>
<p>
Each <a href="../def/component.html">component</a> must have its own package.
<p>
The package of a <a href="../def/component.html">component</a> contains:
<ul>
<li>The shared library files: <tt>*.so</tt>, <tt>*.la</tt>.
<li>The <a href="../def/component.html">component</a> file: <tt>*.component</tt>.
<li>The information file: <tt>*.info</tt> and <tt>*.list</tt>.
<p>
</ul>

The name of a component package <b>MUST BE</b> <u><tt>gambas-gb-XXX</tt></u> where <tt>gb-XXX</tt> is
the name of the component, where the point were replaced by a minus sign.
<p>
For example, the <tt>gb.qt.ext</tt> component package name is <tt>gambas-gb-qt-ext</tt>.
<p>
<hr>
<h2>SPECIFICATIONS FOR GAMBAS 2.0</h2>
<p>
<b>WARNING:</b> These specifications can change before the release of the final version.
<p>
The specifications look like the old ones, except that
<tt>lib.XXX.component</tt> files were renamed as <tt>XXX.component</tt>, and that now
a <a href="../def/component.html">component</a> can have a part written in Gambas.
<p>
Gambas binary packages must have the following names and contents:
<p>
<h3>The runtime package</h3>
<p>
This package includes the Gambas interpreter needed to run Gambas
applications.
<p>
It contains:
<ul>
<li>The interpreter: <tt>gbx2</tt>.
<li>The symbolic link on <tt>gbx2</tt>: <tt>gbr2</tt>.
<li>The internal <a href="../def/component.html">component</a> description: <tt>gb.<a href="../def/component.html">component</a></tt>, <tt>gb.info</tt> and <tt>gb.list</tt>.
<li>The readme files, <tt>TODO</tt> files, and so on.
<li>The <tt>gb.debug</tt> <a href="../def/component.html">component</a>: <tt>gb.debug.info</tt>, <tt>gb.debug.list</tt>, <tt>gb.debug.component</tt>, <tt>gb.debug.so.*</tt>, <tt>gb.debug.la</tt>.
<li>The <tt>gb.eval</tt> component: <tt>gb.eval.info</tt>, <tt>gb.eval.list</tt>, <tt>gb.eval.component</tt>, <tt>gb.eval.so.*</tt>, <tt>gb.eval.la</tt>.
<li>The <tt>gb.draw</tt> component: <tt>gb.draw.info</tt>, <tt>gb.draw.list</tt>, <tt>gb.draw.component</tt>, <tt>gb.draw.so.*</tt>, <tt>gb.draw.la</tt>.
<p>
</ul>

<div class="warning"><table class="none" border="0"><tr><td width="40" valign="top"><img border="0" src="../../img/info.png" align="center"></td><td valign="top">
Note that <tt>gb.la</tt>, <tt>gb.so</tt>, <tt>gb.so.0</tt> and <tt>gb.so.0.0.0</tt>
do not need to be distributed. They are temporary files used for generating
<tt>gb.info</tt> and <tt>gb.list</tt> only.
</td></tr></table></div>
<p>
Its name must be <u><tt>gambas2-runtime</tt></u>.
<p>
<h3>The development package</h3>
<p>
This package includes all tools needed to compile Gambas projects without
having to install the complete development environment.
<p>
It contains:
<ul>
<li>The compiler: <tt>gbc2</tt>.
<li>The archiver: <tt>gba2</tt>.
<li>The informer: <tt>gbi2</tt>.
<p>
</ul>

Its name must be <u><tt>gambas2-devel</tt></u>.
<p>
<h3>The scripter package</h3>
<p>
This package includes the scripter program that allows to write script files in <a href="../def/gambas.html">Gambas</a>.
<p>
It contains:
<ul>
<li>The scripter: <tt>gbs2.gambas</tt>.
<li>The symbolic link on it: <tt>gbx2</tt>.
<p>
</ul>

Its name must be <u><tt>gambas2-script</tt></u>.
<p>
It depends on the following Gambas packages:
<ul>
<li><tt>gambas2-runtime</tt>.
<li><tt>gambas2-devel</tt>.
<p>
</ul>

This package must register the <tt>application/x-gambasscript</tt> mime type as specified by the <tt>application-x-gambasscript.xml</tt> file and
the <tt>application-x-gambasscript.png</tt> icon.
<p>
<h3>The component packages</h3>
<p>
Each gambas <a href="../def/component.html">component</a> must have its own package.
<p>
The package of a <a href="../def/component.html">component</a> contains:
<p>
<ul>
<li>The shared library files: <tt>gb.XXX.la</tt>, <tt>gb.XXX.so</tt>, <tt>gb.XXX.so.0</tt>, <tt>gb.XXX.so.0.0.0</tt>.
<li>The <a href="../def/component.html">component</a> file: <tt>gb.XXX.component</tt>.
<li>The information file: <tt>gb.XXX.info</tt> and <tt>gb.XXX.list</tt>.
<li>Sometimes a part written in Gambas: <tt>gb.XXX.gambas</tt>.
<p>
</ul>

...where <tt>gb.XXX</tt> is the name of the component
<p>
Then name of a component package <b>MUST BE</b> <u><tt>gambas2-gb-XXX</tt></u> where <tt>gb-XXX</tt> is
the name of the component, the point being replaced by a minus sign.
<p>
For example, the <tt>gb.qt</tt> component package name is <tt>gambas2-gb-qt</tt>.
It must include:
<ul>
<li><tt>gb.qt.la</tt>
<li><tt>gb.qt.so</tt>
<li><tt>gb.qt.so.0</tt>
<li><tt>gb.qt.so.0.0.0</tt>
<li><tt>gb.qt.component</tt>
<li><tt>gb.qt.gambas</tt>
<li><tt>gb.qt.info</tt>
<li><tt>gb.qt.list</tt>
<p>
</ul>

Some component are entirely written in Gambas, i.e. they have only a Gambas part.
These components are located in the <tt>comp</tt> directory of the source archive.
<p>
You must follow the previous rules for these components, except that there is no
shared library files inside.
<p>
<div class="warning"><table class="none" border="0"><tr><td width="40" valign="top"><img border="0" src="../../img/info.png" align="center"></td><td valign="top">
Note that <tt><a href="../comp/gb+debug.html">gb.debug</a></tt>, <tt><a href="../comp/gb+eval.html">gb.eval</a></tt> and <tt>gb.draw</tt> do not have their own package, as they are distributed with
the <tt>gambas2-runtime</tt> package.
</td></tr></table></div>
<p>
<h3>The development environment package</h3>
<p>
This package includes the complete Gambas Development Environment, with the
database manager, the help files, and all components.
<p>
It contains:
<ul>
<li>The development environment: <tt>gambas2.gambas</tt>.
<li>The symbolic link on it: <tt>gambas2</tt>.
<li>The database manager: <tt>gambas-database-manager.gambas</tt>.
<li>The examples.
<li>The help files.
<p>
</ul>

It depends on the following Gambas packages:
<ul>
<li><tt>gambas2-runtime</tt>.
<li><tt>gambas2-devel</tt>.
<li>The packages of the components needed by the IDE and the database manager.
<p>
</ul>

Its name must be <u><tt>gambas2-ide</tt></u>.
<p>
<div class="warning"><table class="none" border="0"><tr><td width="40" valign="top"><img border="0" src="../../img/warning.png" align="center"></td><td valign="top">
The IDE relies on the following external tools:
<ul>
<li>The GNU translation tools for translating a project.
<li>The RPM tools for creatings RPM packages.
<li>The <tt>tar</tt> & <tt>gzip</tt> tools for creating <tt>*.tar.gz</tt> archives.
<p>
</ul>

So you must add the dependencies on the packages that provide these tools. The name of these
packages depends on the distribution.
<p>
For example, on Mandriva, they are:
<ul>
<li><u><tt>gettext</tt></u>
<li><u><tt>rpm-build</tt></u>
<li><u><tt>gzip</tt></u>
<li><u><tt>tar</tt></u>
</ul>

</td></tr></table></div>

</div>
</body>
</html>

