<Start> <Intro> <Install> <Legal> <Screen> <Buffer> <Sprite> <Input> <Misc> <Debug> <Utes> <Author>
Installation

Decompress the Archive

JLib normally comes compressed using PKZIP 2.04g compatible software. The file name of the library archive indicates the version, i.e. jlib_1-6.zip is JLib version 1.6. Before you can do anything else, you must decompress the archive to wherever you would like it on your system.

The library archive has a directory structure in it which includes the base jlib directory. If you are using PKUNZIP to decompress the archive you must use the "-d" switch to recreate the directory structure.

  1. Go to the directory you would like JLib installed in.
  2. Copy the JLib archive file into that directory.
  3. Decompress the archive using one of the following commands:
    1. Users of pkunzip: pkunzip -d jlib_X-X.zip
    2. users of unzip: unzip -L jlib_X-X.zip

Or the appropriate commands for your archive program.

The archive should expand into a directory structure containing the JLib source code and documentation files.

Choose a Target

Choose a target from the following list, and change to the directory listed next to that target.

djgpp

320x200x256 jlib\source\target\djv2_13h\

640x480x256 jlib\source\target\djgrx2\

800x600x256 jlib\source\target\djgrx2\

gcc/linux

320x200x256 jlib/source/target/svgalib/

640x480x256 jlib/source/target/svgalib/

800x600x256 jlib/source/target/svgalib/

Watcom

320x200x256 jlib/source/target/watcom13/

640x480x256 jlib/source/target/wat_vesa/

800x600x256 jlib/source/target/wat_vesa/

Ansi, w/X11

320x200x256 jlib/source/target/x/

640x480x256 jlib/source/target/x/

800x600x256 jlib/source/target/x/

Testing Only

jlib/source/target/generic/

  1. There are two header files and a makefile in each directory, named jconfig.h, jtarget.h and makefile. Copy these to the jlib\source directory.
  2. Change to the jlib\source directory.

Configuration

You may now edit the file jconfig.h to configure the target if you wish. The following configuration options are available:

  1. If there are multiple modes that the target may be built for, then you may select a mode from the list at the top of the header file. Ensure that only the mode you want is uncommented.
  2. You may comment out the line reading "#define JDEBUG" if you wish the library to be built with out debugging code enabled.
  3. You may add the line "#define JLIB_SAFE_SWAP 1" if you would like integer variable swapping to use a temporary variable rather than an exclusive-or trick.
  4. You may add the line "#define DEBUG_JLB 1" to have the JLib image code output debug information if you are having problems with loading .jlb files.

When you have made your changes, copy the three header files in the jlib/source directory (jlib.h, jconfig.h, and jtarget.h) to the standard include directory of your compiler, so that they may be included in the compilation. This step may require privileged access on UNIX systems. (Hint: this directory is <path>\gcc\include for djgpp, <path>\Watcom\h for Watcom, and usually /usr/include for UNIX systems).

Configure Make Options

You may edit the following components of the file makefile to change the way the library is built by your compiler:

  1. You may change any command line options to the compiler by changing the CFLAGS= definition. You may wish to put parameters for symbolic debugging code generation or code optimisation. Be sure you know what you are doing if you choose to perform this customisation.

You should change the LIBDIR definition to point to the library file directory used by your compiler. (Hint: this is <path>\gcc\lib for djgpp, <path>\Watcom\lib386 for Watcom, and usually /usr/lib for UNIX systems).

Next Section: Compiling the library

<Start> <Intro> <Install> <Legal> <Screen> <Buffer> <Sprite> <Input> <Misc> <Debug> <Utes> <Author>