Building BePDF from Source Code

2009/01/05 Michael Pfeiffer <michael.pfeiffer@utanet.at>


Requirements

BeOS R5 or compatible (tested on R5 only)
jam for building BePDF and required libraries.


Required Libraries

The following required libararies are included (name <directory>):
Freetype 2        <freetype2>
Layout library    <layout>
Santa's Gift Bag  <santa>
xpdf              <xpdf>
See file versions.txt for the current version of a library.


Building

Use the bash script "build.sh" to build BePDF.

Usage:
  build.sh [option]

If option is omitted BePDF and its required libraries are built
but the distributable package is not created (= ZIP file).

Option can be one of
  clean ... to remove generated files and folders.
  package ... to create the distributable zip file.
  debug ... to build libraries with debug information turned on.
  bepdf ... to build files in folder 'bepdf' only.

The version of the binary and package is stored in file etc/VERSION.

Jam is used to build BePDF, libsanta.a, libfreetype.a and libxpdf.a.

A slightly modified version of the OpenBeOS Generic Jamfile Engine v1.0.1
by Ryan Leavengood is used (action MkDir1 was added, so Jam does
not fail when it tries to create a directory that exists already) for santa, 
xpdf and BePDF.
Freetype 2 provides already Jamfiles for building with jam.

The temporary build files are created inside the project directories:
freetype2/objs/libfreetype.a
santa/obj.X86/libsanta.a
xpdf/obj.X86/libxpdf.a
bepdf/obj.X86/BePDF

The application directory contents is created in

  generated/x86

its contents is mainly copied from folder bepdf:

  Add BePDF to Deskbar       shell script that adds an icon to 
                             launch BePDF to the Deskbar
  BePDF                      the executable file
  bookmarks                  the bookmark files  
  docs                       the folder with documenation
  encodings                  the enconding files and folders
  fonts                      the PS and TT fonts
  lib                        the folder for shared libraries
  license                    the folder containing license text of 3rd 
                             party libraries 
  locale                     the localization files
  Remove BePDF from Deskbar  shell script to remove BePDF icon from Deskbar

The application folder is created only the first time
the build script is run.
To regenerate the application directory either do a "clean" build followed
by a regular build or delete the directory generated/x86 and do a regular
build.

At the end of the build the BePDF binary is copied into 
the application folder and the version information is updated in the file.

See build script for details.


Documentation

The build script also generates the documenation (see bepdf/docs/make.sh)
when the application directory is set up the first time the
build script is run.

Note: htmldoc (www.htmldoc.org) is required to generate PDF files from
the HTML documentation.


The last version that used BeIDE project files for building has CVS tag:
BePDF-1_1_0b1
