Book Image

ADempiere 3.6 Cookbook

Book Image

ADempiere 3.6 Cookbook

Overview of this book

Table of Contents (16 chapters)
ADempiere 3.6 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Creating the installer from the source code


The recipe describes the steps involved in building the ADempiere source code and creating an installer out of it, which is ready for you to install on your own system or any other system. These installer images are installable on MS Windows as well as Linux systems.

This is the basic recipe and a pre-requisite for any other recipe mentioned in this book.

How to do it...

  1. 1. Check out the ADempiere code from the following SVN URL:

    https://adempiere.svn.sourceforge.net/svnroot/adempiere/tags/adempiere360lts.

    • Say, we have checked out the ADempiere code in the C:\adempiere_svn\ tags\adempiere360lts folder. We'll refer to the C:\adempiere_svn folder by name, say, ADEMPIERE_SVN

  2. 2. Start Eclipse.

  3. 3. Click on File menu and select Import...

  4. 4. Select the Existing Projects into Workspace option under the General category and click on the Next button. Dialog with the title Import Projects appears with the Select root directory radio button.

  1. 5. Click on the Browse button next to the Select root directory radio button and select the adempiere360lts folder under the<ADEMPIERE_SVN>\tags folder. This will add adempiere_360 to the Projects list.

  1. 6. Click on the Finish button. This will import the project adempiere_360 into your Eclipse Workspace and build it, if the Build Automatically option is set in your Eclipse. If not, build the project.

  1. 7. Expand the adempiere_360 project in Eclipse. You will see the utils_dev folder.

  2. 8. Expand the utils_dev folder and you will find build.xml. This is the Ant build script to compile the ADempiere source code and create the installable binaries.

  3. 9. Right click on build.xml and select Run As | Ant Build. This will start the build process.

The following message appears in the console at the end of the build:

A successful build will create the adempiere folder under the project folder and the following binary installers are created, which can be used to install ADempiere on MS Windows or Linux:

  • Adempiere_360LTS.zip

  • Adempiere_360LTS.tar.gz

How it works...

In step 1, we first get the ADempiere code from its SVN repository. In steps 2 through to 6, we compile the code. In steps 7 through to 9, we create the distributions (Linux as well as MS Windows) by running the default Ant target inside the build.xml file, present under the utils_dev folder

There's more...

In this recipe, we saw how we can use the Ant build file build.xml to compile the code and create the installation packages (.zip and .tar.gz files). The same can be achieved by running a batch file.

Using RUN_Build.bat to create the installer

If you like working with command prompt, then you can use the<ADEMPIERE_SVN>\ tags\adempiere360lts\utils_dev\RUN_Build.bat script from the command prompt. This script, after a successful build, will create the installers.

Note

For the Linux users, there is an equivalent script with the extension .sh. For all the .bat script for MS Windows, there is a corresponding .sh shell script available.