Building Bookshelf from sources.

Requirements

If you decided to build bookshelf from source, you will need the following:

Optionally, you can install platform SDK's to build specific platform jars:

Install locations of these packages must be specified with appropriate environment variables.

Please make sure that these paths do not contain spaces, if you are doing build on Windows and some paths have space chars in them, please use mangled 8+3 (DOS style) variant of path. See Motorola SDK MOTOROLA_A1_HOME for example.

Required software
Variable Name Software Package Example
JAVA_HOME Install location of JDK c:\java\j2sdk1.4.2_05
ANT_HOME Ant install location c:\java\apache-ant-1.6.2
WTK_HOME Wireless Toolkit install location c:\java\wtk21
JYTHON_HOME Jython install location c:\java\jython
BCEL_HOME BCEL install location c:\java\bcel-5.1

Optional software
Variable Name Description Example
NOKIA40_HOME Series 40 API lib/classes.zip c:\java\Nokia\Devices\Nokia_7210_MIDP_SDK_v1_0
SIEMENS_HOME Siemens API lib/API.jar c:\java\siemens\SMTK\emulators\SL45i
SONERIC1_HOME Sony Ericsson API semc_api.zip from T610 emulator c:\java\SonyEricsson\J2ME_SDK\PC_Emulation\ WTK1\wtklib\devices\executables\T610Series
MOTOROLA_A1_HOME Motorola API extensions lib/javaextensions.jar from directory c:\java\Motorola\SDK v4.3 for J2ME\EmulatorA.1 c:\java\Motorola\SDKV4~1.3FO\EMULAT~1.1

Compiling

Once all required packages has been installed, you can start building Bookshelf.

Unpack bookshelf source distribution, change to the folder and start ant:

C:\build\bookshelf-2.1.3-src>ant
Buildfile: build.xml
.....
      

When build completes, you will find a compiled version of Bookshelf in the dist/ folder.

If you did not have optional platform SDKs installed, resulting build will not have relevant plaform jars in the platform/ folder.

Structure of Bookshelf

Bookshelf sources are grouped in several related packages, each with own ant buildfile.

core

This package contains core functionality of Bookshelf: formatting, hypenation, fonts import, etc.

reader

Contains platform-independent sources for Bookshelf MIDlet.

gui

Bookshelf GUI written in Jython.

platforms

Platform dependant code: canvas access, backlight control, etc.

  • platform-midp1
  • platform-motorola-a1
  • platform-nokia1
  • platform-siemens
  • platform-siemens-bw
  • platform-soneric1

Using Eclipse IDE

Note
TODO