ER/Box powered by Compiere
 
Font size:      

Building ER/Box

Thanks to Compiere's Ant based build environment compiling the sources is straightforward and fully automated. A small modification was integrated to allow for building a source distribution in addition to the binaries for Linux/Unix and Windows systems.

Tested on Windows
The following explanations apply to a Windows environment and were not tested on Linux/Unix. They should be transferable, though.

Prerequisites

  • Installed JDK 5.0
  • Download of of the current ER/Box source distribution from SourceForge (zip archive with erbox_Src_ prefix)

Step-by-Step

1. Create source directory

Create a new directory to contain the sources; this will be reffered to as {SOURCE_ROOT}.

2. Extract the Source Files

Extract the source files into the newly created directory. {SOURCE_ROOT} will then contain several subdirectories and two files: .classpath and .project .

3. Prepare Build Environment

In directory {SOURCE_ROOT}\utils_dev copy file myDevEnvTemplate.bat and rename the copy myDevEnv.bat .

Several lines in myDevEnv.bat have to be adapted to reflect your environment. Those lines are marked red in the following source listing. Explanations follow below.

@Rem  My Development Environment
@Rem
@Rem  This script sets variable for compiling Compiere from source
@Rem  
@Rem  
@Rem  $Header$


@Rem  Check the following parameters:
@Rem  -------------------------------

@Rem  Set Java Home
@SET JAVA_HOME=C:\Program Files\Java\jdk1.5.0_04
@IF NOT EXIST "%JAVA_HOME%\bin" ECHO "** JAVA_HOME NOT found"
@SET PATH=%JAVA_HOME%\bin;%PATH%

@Rem  Set Compiere Source Directory
@SET COMPIERE_SOURCE=C:\Compiere\compiere-all
@IF NOT EXIST "%COMPIERE_SOURCE%" ECHO "** COMPIERE_SOURCE NOT found"

@Rem  Passwords for the keystore
@SET KEYTOOL_PASS=%KEY_PASSWORD%
@IF "%KEYTOOL_PASS%"=="" SET KEYTOOL_PASS=myPassword

@Rem  Keystore & FTP Password
@SET ANT_PROPERTIES=-Dpassword=%KEYTOOL_PASS% -DftpPassword=%FTP_PASSWORD%

@Rem  Ant to send email after completion - change or delete
@SET ANT_PROPERTIES=%ANT_PROPERTIES% -DMailLogger.mailhost=...

@Rem  Automatic Installation - Where Compiere2 will be unzipped
@SET COMPIERE_ROOT=C:\
@Rem  Automatic Installation - Resulting Home Directory
@SET COMPIERE_HOME=%COMPIERE_ROOT%Compiere2
@Rem  Automatic Installation - Share for final Installers
@SET COMPIERE_INSTALL=C:\Install
@IF NOT EXIST %COMPIERE_INSTALL% Mkdir %COMPIERE_INSTALL%


@Rem  ---------------------------------------------------------------
@Rem  In most cases you don't need to change anything below this line
@Rem  If you need to define something manually do it above this line,
@Rem  it should work, since most variables are checked before set.
@Rem  ---------------------------------------------------------------

@SET CURRENTDIR=%CD%

@Rem  Set Version
@SET COMPIERE_VERSION=Custom
@SET COMPIERE_VERSION_FILE=C252
@SET COMPIERE_VENDOR=Unsupported

@Rem  ClassPath
@IF NOT EXIST "%JAVA_HOME%\lib\tools.jar" ECHO "** Need Full Java SDK **"
...
JAVA_HOME
Set to the root directory of your local JDK 5.0 installation.
COMPIERE_SOURCE
Set to {SOURCE_ROOT} (see above).
COMPIERE_ROOT
Target directory for the unzipped ER/Box installation; you may run ER/Box from here.
COMPIERE_HOME
Insert a missing backslash ('\') between %COMPIERE_ROOT% and Compiere2.
COMPIERE_INSTALL
Target directory for the zipped or tar'ed installation archives.
COMPIERE_VERSION_FILE
Choose an appropriate suffix for naming your version, e.g. 2.5.3-1

4. Start the Build Process

Open a command window and navigate to {SOURCE_ROOT}\utils_dev . From there run

> RUN_build.bat

The build process will run for a few minutes and end with an error message like the following:

End of Compilation with Error

The build will fail in the setupInit target, which is ok. Simply press a key and look in the {COMPIERE_INSTALL} directory for the bundled installers.