Building the Laszlo Presentation Server (LPS)

Prefatory remarks: These are the instructions we use at Laszlo for setting up a new build environment for LPS. Setting up an LPS build is reasonably complicated and there are number of places that things can go awry because of the large number of external dependencies. Sometime soon (with your input!), this document will improve and sometime after that, the build process for LPS will also likely improve. In the meantime, the details below are intended for the intrepid folks who are determined to build their own copy of LPS from the source distribution. If you having trouble, it's best to try the Laszlo developer forums.


(These instructions use the $ENV_VAR syntax for refering to environment variables).

  1. Get the source and build tools

    In this document, we refer to the top-most directory that contains the LPS and LPS-related source bits and build tools as ROOT.

    If you are working from a source distribution, ROOT is the top level directory of the unpacked source distribution and will contain subdirectories named

  2. Modify your environment to use ant

    We are currently using a slightly-modified version of Jakarta Ant 1.5.1 for LPS builds. This version of ant is at ROOT/tools/jakarta-ant-1.5.1.

  3. Set your LPS_HOME environment variable to point to the top of your LPS tree

    For most this will be something like:

    Windows set LPS_HOME=C:\lps-{version}-src\lps-{branch}
    Windows with Cygwin csh/tcsh setenv LPS_HOME C:\\lps-{version}-src\\lps-{branch}
    UNIX/OS X csh/tcsh setenv LPS_HOME /home/username/lps-{version}-src/lps-{branch}
    UNIX/OS X bash/sh export LPS_HOME=/home/username/lps-{version}-src/lps-{branch}

    Note: {branch} depends on the development branch (or released source version) in which you are working.

    Note: it's recommended that you use the Windows-style path rather than a cygwin one for LPS_HOME.

  4. For Windows and Linux systems, install Sun's J2SE SDK 1.4.2 as well.

    Set your JAVA_HOME environment variable to point to the J2SDK 1.4 directory (e.g., on Windows, C:\j2sdk1.4.2_3). Also, make sure that $JAVA_HOME/bin is in your $PATH and occurs before any system java binary locations.

    Mac OS X (Panther - 10.3) comes with Java 1.4.2 so there is no need to install it. On MacOS, set JAVA_HOME to /Library/Java/Home

  5. We are using JavaCC, Jython, and Python (with PyXML package installed)

  6. Install the modified Tomcat 5.0.24 found in ROOT/3rdparty

    Important Notes for Windows: You will have an easier time typing pathnames if you install it at C:\tomcat5 instead of the default location. Also, when asked, create an administrative user named 'admin' with password 'laszlo'. And finally, At the end of installing tomcat 5.0.24, do NOT start the server (the default is to start it). Let the build system do that for you. (If the installer leaves the service running, the LPS build system can't be used to stop/start it). (For those who care to know details, the LPS build system installs the Tomcat5 NT service under the name 'LPS' so you can use net stop LPS, net start LPS to start/stop the service)

    Important Notes for Linux and Mac OS X: If you install this as root in /usr/local - make sure the whole installed tree is world writable.

    Set the $TOMCAT_HOME environment variable to point to where you installed it.

    For example C:\Program Files\Apache Group\Tomcat 5.0.24 . (For windows users, it should be a windows PATH and not a cygwin one).

  7. Windows users should install Cygwin

    Add the Cygwin bin directory to your $PATH.

  8. Add $LPS_HOME/WEB-INF/lps/server/bin to your $PATH to make lzc, lzmc, and other LPS development utilities generally available from the shell.

  9. From the top of your source tree, try 'cd $LPS_HOME ; ant build ; ant start ; ant install'. Then browse to http://localhost:8080/lps-{version}.

  10. For other details, see ant -projecthelp from the top level lps-{version} directory