The qDecoder Project

qDecoder Installation Guide


Step 1. Getting qDecoder Package

The latest version of qDecoder can be downloaded from http://www.qDecoder.org/ or ftp://ftp.qDecoder.org/pub/qDecoder/.

To get working current : svn co svn://svn.qdecoder.org/qdecoder/trunk qdecoder

Step 2. Unpacking qDecoder Package

Basically, qDecoder is provided being compressed with tar on Unix. Follow the below procedure to decompress it.

$ tar xvfz qDecoder-VERSION.tar.gz

A directory corresponding to qDecoder-VERSION will be created. And the files will be unpacked like the following:

$ cd qDecoder-VERSION

$ ls -asCF
  4 ./              32 config.sub*    12 INSTALL
  4 ../            160 configure*     16 install-sh*
  4 AUTHORS          8 configure.ac    4 Makefile.in
 16 CHANGES          4 COPYING         4 qDecoder.jpg
 44 config.guess*    4 doc/            4 src/
  4 config.h.in      4 examples/

AUTHORS    - List of manufacturers' names
CHANGES    - Changes of each version
COPYING    - Copyright-related documents
INSTALL    - Installation guide
README     - General guide
REFERENCE  - Manual on how to use functions
qDecoder.jpg - Logotype picture

Makefile.in --+
configure     +
configure.ac  +
install-sh    +--> Autoconf-related files
config.guess  +
config.sub    +
config.h.in --+

doc/... - Documentations
examples/... - Collection of example sources.
src/... - qDecoder main sources.

Step 3. Compile

qDecoder makes the compilation between different platforms more convenient by applying Autoconf (6.0.1 and above) which almost all the GNU software and free/open source software adopt. The compilation method is, like that of general open sources, through "make" after configuration, which checks to see if the compiler environment, needed functions and commands of the pertinent system can be used, and then constructs Makefile for them to be compiled in the system most efficiently.

$ cd qDecoder-VERSION

$ ./configure --help
(...some messages...)
Optional Features:

  --enable-debug          enable debugging output
  --enable-threadsafe     enable thread-safe feature
  --enable-lfs            enable large file supports
  --enable-fastcgi=/FASTCGI_INCLUDE_DIR_PATH/
                          enable FastCGI supports
  --enable-mysql=/MYSQL_INCLUDE_DIR_PATH/
                          enable MySQL database supports
  --disable-cgi           disable CGI APIs
  --disable-socket        disable socket APIs
  --disable-ipc           disable IPC APIs
  --disable-datastructure disable data-structure APIs

$ ./configure (for general purpose)
ex) $ ./configure --disable-cgi (for general application library)
ex) $ ./configure --disable-cgi --enable-threadsafe (for general thread application library)
ex) $ ./configure --disable-socket --disable-ipc --disable-datastructure (only for CGI usages)

creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
...(skip)...
configure: optional flags:
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating examples/Makefile
config.status: creating config.h

$ ls -asCF
 4 ./               4 config.h.in       8 COPYING        4 Makefile.in
 4 ../             16 config.log        4 doc/           4 qDecoder.jpg
 4 AUTHORS         24 config.status*    4 examples/      8 README
16 CHANGES         32 config.sub*      16 INSTALL        4 REFERENCE
44 config.guess*  164 configure*       16 install-sh*    4 src/
 4 config.h         8 configure.ac      4 Makefile       4 .svn/

$ make

NOTE) Type "make distclean", if you wish to clean up the library and object as it was.

Step 4. Install

Type "make install" to install a library on the system.

$ cd qDecoder-VERSION

$ make install
The installation path of headers and libraries can be adjusted by the --prefix, --libdir, --includedir configure options. The default locations will be /usr/local/lib, /usr/local/include when configured with no specific options.

${prefix}          ===> /usr/local        (default)
${libdir}          ===> ${prefix}/lib     (default)
${includedir}      ===> ${prefix}/include (default)

libqDecoder.a      ===> ${libdir}/libqDecoder.a
libqDecoder.so.[n] ===> ${libdir}/libqDecoder.so.[n]
libqDecoder.so     ===> ${libdir}/libqDecoder.so
qDecoder.h         ===> ${includedir}/include/qDecoder.h

ex) $ ./configure --prefix=/usr
ex) $ ./configure --libdir=/home/qdecoder/mylib --includedir=/home/qdecoder/myinclude

NOTE) libqDecoder.so is a symbolic link that refers to libqDecoder.so.[n] which is the actual shared library. The number n increases when the downward compatibility lacks.

NOTE) A root privilege is required for an installation in the system area.

Step 5. Deinstall

The installed qDecoder can be completely deleted by "make deinstall".

$ cd qDecoder-VERSION

$ make deinstall

Step 6. Test & Examples

There are some of examples in the examples directory. After compiling the examples, test can be performed by opening examples.html by your web browser.

For your convenience, all examples have been written in CGI executable, but some of them also can be executed on command line if it does not require CGI inputs. (ex: config.cgi, obstack.cgi, ...)

$ cd examples

$ make

$ ls -al *.cgi
-rwxr-xr-x 1 qdecoder qdecoder 193582 Jan  4 19:56 config.cgi
-rwxr-xr-x 1 qdecoder qdecoder 194382 Jan  4 19:56 cookie.cgi
-rwxr-xr-x 1 qdecoder qdecoder 192904 Jan  4 19:56 download.cgi
-rwxr-xr-x 1 qdecoder qdecoder 173796 Jan  4 19:56 hashtable.cgi
-rwxr-xr-x 1 qdecoder qdecoder 193130 Jan  4 19:56 multivalue.cgi
-rwxr-xr-x 1 qdecoder qdecoder 163111 Jan  4 19:56 obstack.cgi
-rwxr-xr-x 1 qdecoder qdecoder 193109 Jan  4 19:56 query.cgi
-rwsr-sr-x 1 qdecoder qdecoder 204774 Jan  4 19:56 session.cgi
-rwxr-xr-x 1 qdecoder qdecoder 194519 Jan  4 19:56 socket.cgi
-rwxr-xr-x 1 qdecoder qdecoder 193266 Jan  4 19:56 streamedit.cgi
-rwsr-sr-x 1 qdecoder qdecoder 194070 Jan  4 19:56 upload.cgi
-rwsr-sr-x 1 qdecoder qdecoder 194758 Jan  4 19:56 uploadfile.cgi

[Home] [About] [Examples] [Changes] [Download] [SVN Repository] [Install] [Reference]