Installation Instructions

Note on third party tools/libraries used

The thirdparty tools/libraries used are:

Installing the prerequisites

The thirdparty packages that would need to be installed as prerequisites are:

These tools are typically already present on most Linux distributions. If they are not available on your system, you would need to get them before proceeding on installations. Please read the OS specific subsections to find how to install the prerequisites.

Note: suggested package names, may sometimes not be correct/exact with respect to your OS release. Please find the exact package name based on your system's OS. For example, to list various available packages names matching a pattern(eg. expat) on Fedora, try following command:
$ yum search expat


Installing the prerequisites on Ubuntu, Debian and the likes

  1. If not already installed, install automake, autoconf, libtool
    $ sudo apt-get install automake autoconf libtool

  2. If not already installed, install xsltproc
    $ sudo apt-get install xsltproc

  3. If not already installed, install expat library and devel packages
    $ sudo apt-get install libexpat libexpat-dev

Installing the prerequisites on Redhat, Fedora etc.

  1. If not already installed, install automake, autoconf, libtool
    $ sudo yum install automake autoconf libtool

  2. If not already installed, install xsltproc
    $ sudo yum install xsltproc

  3. If not already installed, install expat library and devel packages
    $ sudo yum install expat expat-devel

Installing the prerequisites on Mac OS X

  1. If not already installed, install automake, autoconf, libtool
    $ sudo port install automake autoconf libtool

    Note: on Mac OS X, there is a binary named libtool, which is different from what we need. On Mac OS X, we need glibtool, which is exactly what the port install of libtool would bring.

  2. If not already installed, install xsltproc
    $ sudo port install xsltproc

  3. If not already installed, install expat library and devel packages
    $ sudo port install expat expat-devel


Building the source

Building the source the first time
Typically because of version mismatch of autotools, the configure script that comes with source tarball may not work, when building the source for the first time. Therefore, for the first time build, run autogen.sh which generates compatible configure and Makfile.in files and then runs the configure script. Next time onwards you can just run configure instead of autogen.sh( alongwith with --prefix option if needed).
Please follow these steps:
  1. If you want the build to be installed in standard system paths:
    $ ./autogen.sh
    This step generates configure script and relevant Makefile.in files and then runs configure script which generates the Makefiles.

    Alternatively, if you want the build to be installed in user defined path
    $ ./autogen.sh --prefix=/path/of/installation
    For example:
    $ ./autogen.sh --prefix=$HOME/xplusbuild

  2. $ make && make install
    This will build and install the build in the specified installation path.
Rebuilding the source later(probably with different options)
Please follow these steps:
  1. If you want the build to be installed in standard system paths:
    $ ./configure
    This step generates relevant Makefiles.

    Alternatively, if you want the build to be installed in user defined path:
    $ ./configure --prefix=/path/of/installation
    For example:
    $ ./configure --prefix=$HOME/xplusbuild

  2. $ make && make install
    This will build and install the build in the specified installation path.

Updating the environment with the installation path

If you chose custom path of instalation in previous steps, you would need to update your working environment with those paths. (typically done by exporting these variables in ".bashrc" or ".profile" files in Linux or Mac-OS machines).

$ export PATH=$PATH:/path/of/installation/bin
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/of/installation/lib


For example:
$ export PATH=$PATH:$HOME/xplusbuild/bin
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/xplusbuild/lib


Note:On Mac OS X, however, you would need to export DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH.
$ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/path/of/installation/lib


Verifying the installation

Once you have installed the XmlPlus tool, the libraries and the binaries must be in LD_LIBRARY_PATH and PATH respectively. Assuming that you have installed the build in the path $HOME/xplusbuild/, let us peek into the installation.

Some directories inside installation path:
   [~/xplusbuild] $ ls -1
   bin
   include
   lib
 
Some of the installed binaries:
   [~/xplusbuild] $ ls -1 bin/
   domParser
   xsd2cpp
 
Some of the installed headers:
 [~/xplusbuild] $ ls -1 include/
 DOM
 Poco
 XPlus
 XSD
 
Some of the installed shared libraries:
 $ ls -1 lib/ | grep "so.*"
 libxsdall.so
 libxsdall.so.0
 libxsdall.so.0.0.0
 
The static libraries:
 $ ls -1 lib/ | grep "\.a$"
 libxsdall.a
 
Now, try accessing the xsd2cpp tool:

  $ xsd2cpp 
  Usage:

  1.  xsd2cpp xsd-file [outdir]
        outdir: directory to output the generated source to
        (if unspecified, defaults to xsd-file-name)

  2.  xsd2cpp -v
        prints verion

  3.  xsd2cpp -h
        prints help


If you reached here fine, then you have finished the installation part.
If you had problems with installation, send us an email mentioning the details of installation problems. (see Report Bugs)