Building Bookshelf from sources.
Requirements
If you decided to build bookshelf from source, you will need the following:
- Java JDK version 1.4.* (1.5 will not work with unmodified build files)
- J2ME Wireless Toolkit
- Apache Ant
- Apache BCEL
- Jython
Optionally, you can install platform SDK's to build specific platform jars:
- Nokia 7210 SDK for Nokia Series 40 platform.
- Siemens SL45i SDK for Siemens BW and Color platforms.
- Sony Ericsson J2ME SDK 2.2.* for Soneric MIDP1 platform.
- Motorola SDK v4.* for J2ME for Motorola A1 platform.
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.
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 |
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