Home
Have you visited the Joomla! Extension Directory lately? We're there too!
Note: Do not post support questions in our listing, post them in our forum where you will receive better attention.
Chapter 1. Getting and Installing JoomlaPack PDF Print E-mail
Written by Nicholas K. Dionysopoulos   
Saturday, 08 November 2008 18:58

Chapter 1. Getting and Installing JoomlaPack

Getting the component

Latest published version

The latest version of the component is always available from the File Release System on our project's JoomlaCode.org page, available at http://www.joomlacode.org/gf/project/jpack/frs.

[Note]Note

JoomlaPack 2.0 and later versions only support Joomla! 1.5.x. If you wish to use JoomlaPack on Joomla! 1.0.x sites, please download the latest release from the 1.2.x series. There may be two component packages available for a given version. The one ending in -j10 is the version compatible with Joomla! 1.0.x.

Development snapshots

For the adventurous among you, there is the option to download the latest development version via SVN. The development code is located at http://joomlacode.org/gf/project/jpack/scmsvn/.

[Important]Important

SVN code is not meant to be secure, stable or thoroughly tested; it is just a snapshot of the development progress. You use it at your own risk. Support is minimal but we welcome all your comments and bug reports which help us make JoomlaPack a better component.

First of all, make sure you've got Subversion installed. You can get the latest snapshot by creating a new directory and issuing the command: svn checkout http://joomlacode.org/svn/jpack/trunk .. This results in a set of directories, containing the latest development files in the current directory.

In order to create an Joomla!-installable ZIP archive you have to go into the root directory of the checked out files and use the GNU make utility to build the distribution file.

[Note]Note

In order to build the JoomlaPack distribution you will need a correctly configured system with a complete set of tools. Even though all of these tools exist for Windows™ as well, we have found it to be extremely easier to build JoomlaPack on a Linux™ system.

In order to build the entire component distribution, you will have to run make all on this directory. If you only want to create an installable package without building optional items, like the documentation, the on-line help and utilities packages, just use make svnlight. If you wish to build only the component but include the on-line help as well, use make svn.

In order for the build to succeed, the following utilities must be present in your system:

  • The bash command line processor, or something compatible

  • GNU make which is use to build everything

  • The GNU find utility

  • xsltproc for building the documentation and on-line help

  • The latest DocBook XSL distribution for DocBook XML 5.0, required for building the documentation and on-line help

  • Apache's fop for building the PDF version of the documentation

  • GNU zip command line utility

  • The PHP command line client

All of the requiremed software is either installed by default or available for installation on modern Linux distributions. Specifficaly:

  • bash is installed by default; it's your command line shell.

  • make can be installed; the package is usually called make or make-utils.

  • find is also installed by default.

  • xsltproc is part of the libxml2 distribution; its package is usually named libxml2.

  • The DocBook XSL stylesheets can be downloaded from http://heanet.dl.sourceforge.net/sourceforge/docbook/docbook-xsl-ns-1.74.0.tar.bz2. Extract to somewhere on your home directory. You'll need to know the absolute path to where these are extracted.

  • Apache's fop is optional but can be installed; the package is usually named fop.

  • The GNU zip command line utility is usually pre-installed on modern Linux distributions. Otherwise, the package is usually named zip.

  • The PHP command line is seldom installed, even if you have the relevant Apache module instaleld. The usual package name for this is php-cli.

Installing packages is dependent on your Linux distribution. On Mandriva systems you can use either the graphical rpmdrake package manager to find and select packages, or the command line urpmi packagename command (as root) to install individual packages from the command line. On Ubuntu and other Debian-based systems there is also a package manager and the command line apt-get utility. Fedora Core and other Redhat-based distributions also have package manager of their own. Please refer to your distribution's documentation for more information.

Compiling JoomlaPack on Linux

Provided that you have all the prerequisites installed, compiling an installable JoomlaPack ZIP file is trivial. First you'll have to get a working copy of JoomlaPack's SVN repository as per the instructions on the preceeding section. All instructions hereby assume you have opened a terminal window and your current directory is your working copy's root directory.

If you want only the component, without building and including the help and documentation, just type make svnlight.

If you want to build and include the on-line help, but don't care about building the whole documentation, just type make svn XSLSTYLEROOT=/path/to/docbook/xsl. You'll have to replace /path/to/docbook/xsl with the actual absolute path to where your DocBook XSL files are stored.

Your last option is to build everything, including the utilities and documentation. To do so, just type make all XSLSTYLEROOT=/path/to/docbook/xsl. You'll have to replace /path/to/docbook/xsl with the actual absolute path to where your DocBook XSL files are stored.

[Important]Important

You have to use the "ng" series of DocBook XSL which are meant to be applied on DocBook 5 source files. Using the other version will result in make errors and inability to build the documentation and the release as a whole.

All output is stored in the release folder under the working directory's root. In order to install the component all you need is com_joomlapack-svn.zip.

Compiling JoomlaPack on Windows

Installing Cygwin

Cygwin offers a UNIX environment which runs from within Windows™ itself. Since most of the tools and utilities JoomlaPack uses come from the Linux™ world, Cygwin offers the most painless method for obtaining them and making sure everything works fine.

You can download Cygwin from http://www.cygwin.com/. Click the link for setup.exe, download it and run it. On the first screen, choose Install from Internet. Keep pressing Next. In the Choose a download site screen, select a mirror close to you. On the Select Packages page, select the following items on top of the defaults:

  • Archive > zip

  • Devel > subversion (optional, to get the JoomlaPack sources from SVN)

  • Devel > make

  • Text > libxslt

  • Web > wget

Click Next and wait for installation to complete.

Installing PHP binaries

Unfortunately, Cygwin doesn't offer PHP as part of its distribution. No worries, though! Any Windows™ command line program will work from within Cygwin. So, we'll have to install PHP binaries for Windows™. At the time of this writing, the current PHP version is 5.2.6. You can always get the latest version from http://www.php.net/downloads.php. Make sure you select the “PHP x.y.z installer” package (where x.y.z is the PHP version number). Download and run the installer.

For destination folder you'd better use a path with no spaces. For the purpose of this How-To, we'll assume you install PHP on C:\PHP. On the next screen, select Do not setup a web browser and click Next. On the following screen, make sure everything is installed (by default only a small subset of features is installed), this means make sure no item has a red X and no item is greyed out. Click Next and Finish. Wait for the installation to complete.

After that, edit the php.ini file found in PHP's installation directory. At the end of the file you will find a bunch of lines like this:

[PHP_BZ2]
extension=php_bz2.dll
[PHP_CURL]
extension=php_curl.dll
[PHP_DBA]
extension=php_dba.dll
[PHP_DBASE]
extension=php_dbase.dll

and so on.

Remove these lines and replace them with:

[PHP_BZ2]
extension=php_bz2.dll
[PHP_CURL]
extension=php_curl.dll
[PHP_GD2]
extension=php_gd2.dll
[PHP_GETTEXT]
extension=php_gettext.dll
[PHP_IMAP]
extension=php_imap.dll
[PHP_MBSTRING]
extension=php_mbstring.dll
[PHP_MCRYPT]
extension=php_mcrypt.dll
[PHP_MHASH]
extension=php_mhash.dll
[PHP_MIME_MAGIC]
extension=php_mime_magic.dll
[PHP_MING]
extension=php_ming.dll
[PHP_SOCKETS]
extension=php_sockets.dll
[PHP_SQLITE]
extension=php_sqlite.dll
[PHP_XSL]
extension=php_xsl.dll
[PHP_DOMXML]
extension=php_domxml.dll
[PHP_ZLIB_FILTER]
extension=php_zlib_filter.dll
[PHP_EXIF]
extension=php_exif.dll

Also, find the line

error_reporting = E_ALL

and change it to

error_reporting = E_ALL & ~E_NOTICE | E_STRICT
Making sure all can be found

In order to make sure all tools can be found from the command line, we'll have to edit the system's PATH variable. Open Windows Explorer. Right-click “My Computer” icon and click on “Properties”. Go to the Advanced tab and click on the Environment Variables button. In the second list box, find and click on the “Path” variable to make it selected, then click Edit. In the end of the existing text append (do not replace with!) the following text:

;c:\cygwin\bin;c:\php

I assume you have installed Cygwin on the defaultl folder and you installed PHP on C:\PHP, which you should if you followed these instructions to the letter.

Click OK, then OK and once more OK.

Get the DocBook XSL for DocBook 5.0

First of all, make sure you have Internet access on your PC! The process you are about to go through requires a fair ammount of data to be downloaded from the Internet.

Open up the Cygwin command line by clicking on your desktop's Start - Programs - Cygwin - Cygwin Bash Shell. You'll see a UNIX-style command line. Type the following commands:

cd /usr/share
mkdir dbxsl
cd dbxsl
wget http://heanet.dl.sourceforge.net/sourceforge/docbook/docbook-xsl-ns-1.74.0.tar.bz2
tar xjf docbook-xsl-ns-1.74.0.tar.bz2
mv docbook-xsl-ns-1.74.0/* .
Compiling

First of all, make sure you have Internet access on your PC! The process you are about to go through requires a fair ammount of data to be downloaded from the Internet.

If you have not done so yet, open up the Cygwin command line by clicking on your desktop's Start - Programs - Cygwin - Cygwin Bash Shell. You'll see a UNIX-style command line. In order to get a new copy of JoomlaPack's SVN and compile it you have to enter the following commands:

cd /usr/src
mkdir jp13
cd jp13
svn co http://joomlacode.org/svn/jpack/branch/1.3 .
make svn XSLSTYLEROOT=/usr/share/dbxsl/      -- alternatively, you can use: --
make svnlight XSLSTYLEROOT=/usr/share/dbxsl/

The "make svn" command includes the on-line help, whereas the "make svnlight" command does not build and include the on-line help. Use either one of them, not both! Use the com_joomlapack-svn.zip to install JoomlaPack on your site.

Next time you want to update your SVN copy and compile JoomlaPack again, you just need to type the following commands:

cd /usr/src/jp13
svn update
make svn XSLSTYLEROOT=/usr/share/dbxsl/      -- alternatively, you can use: --
make svnlight XSLSTYLEROOT=/usr/share/dbxsl/
Last Updated ( Saturday, 08 November 2008 18:58 )
 
Copyright (C) JoomlaPack. All Rights Reserved.
JoomlaPack is proudly hosted by Rochen Ltd.