<h4>2.1 <span class="Heading">Unpacking the Example Package</span></h4>
<p>If the <strong class="pkg">Example</strong> package was obtained as a part of the <strong class="pkg">GAP</strong> distribution from the <q>Download</q> section of the <strong class="pkg">GAP</strong> website, you may proceed to Section <a href="chap2.html#X79E203C779518B3D"><span class="RefLink">2.2</span></a>. Alternatively, the <strong class="pkg">Example</strong> package may be installed using a separate archive, for example, for an update or an installation in a non-default location (see <a href="../../../doc/ref/chap9_mj.html#X7A4973627A5DB27D"><span class="RefLink">Reference: GAP Root Directories</span></a>).</p>
<p>Below we describe the installation procedure for the <code class="file">.tar.gz</code> archive format. Installation using other archive formats is performed in a similar way.</p>
<p>To install the <strong class="pkg">Example</strong> package, unpack the archive file, which should have a name of form <code class="code">example-<var class="Arg">XXX</var>.tar.gz</code> for some version number <var class="Arg">XXX</var>, by typing</p>
<p> <code class="code">gzip -dc example-<var class="Arg">XXX</var>.tar.gz | tar xpv</code></p>
<p>It may be unpacked in one of the following locations:</p>
<ul>
<li><p>in the <code class="file">pkg</code> directory of your <strong class="pkg">GAP</strong> 4 installation;</p>
</li>
<li><p>or in a directory named <code class="file">.gap/pkg</code> in your home directory (to be added to the <strong class="pkg">GAP</strong> root directory unless <strong class="pkg">GAP</strong> is started with <code class="code">-r</code> option);</p>
</li>
<li><p>or in a directory named <code class="file">pkg</code> in another directory of your choice (e.g. in the directory <code class="file">mygap</code> in your home directory).</p>
</li>
</ul>
<p>In the latter case one one must start <strong class="pkg">GAP</strong> with the <code class="code">-l</code> option, e.g. if your private <code class="file">pkg</code> directory is a subdirectory of <code class="file">mygap</code> in your home directory you might type:</p>
<p>where <var class="Arg">myhomedir</var> is the path to your home directory, which may be replaced by a tilde (the empty path before the semicolon is filled in by the default path of the <strong class="pkg">GAP</strong> 4 home directory).</p>
<h4>2.2 <span class="Heading">Compiling Binaries of the Example Package</span></h4>
<p>After unpacking the archive, go to the newly created <code class="file">example</code> directory and call <code class="code">./configure</code> to use the default <code class="code">../..</code> path to the <strong class="pkg">GAP</strong> home directory or <code class="code">./configure <var class="Arg">path</var></code> where <var class="Arg">path</var> is the path to the <strong class="pkg">GAP</strong> home directory, if the package is being installed in a non-default location. So for example if you install the package in the <code class="file">~/.gap/pkg</code> directory and the <strong class="pkg">GAP</strong> home directory is <code class="file">~/gap4r5</code> then you have to call</p>
<p>This will fetch the architecture type for which <strong class="pkg">GAP</strong> has been compiled last and create a <code class="file">Makefile</code>. Now simply call</p>
<div class="example"><pre>
make
</pre></div>
<p>to compile the binary and to install it in the appropriate place.</p>
<h4>2.3 <span class="Heading">Loading the Example Package</span></h4>
<p>To use the <strong class="pkg">Example</strong> Package you have to request it explicitly. This is done by calling <code class="func">LoadPackage</code> (<a href="../../../doc/ref/chap76_mj.html#X79B373A77B29D1F5"><span class="RefLink">Reference: LoadPackage</span></a>):</p>
<p>If <strong class="pkg">GAP</strong> cannot find a working binary, the call to <code class="code">LoadPackage</code> will still succeed but a warning is issued informing that the <code class="code">HelloWorld()</code> function will be unavailable.</p>
<p>If you want to load the <strong class="pkg">Example</strong> package by default, you can put the <code class="code">LoadPackage</code> command into your <code class="file">gaprc</code> file (see Section <a href="../../../doc/ref/chap3_mj.html#X7FD66F977A3B02DF"><span class="RefLink">Reference: The gap.ini and gaprc files</span></a>).</p>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.