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).
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
3rdparty - 3rd Party code that has been modified by Laszlo for use in LPS
lps-{version} - the source tree for LPS
tools - various tools (some modified, others not) for building LPS
3rdPartyCredits - credits for all libraries and tools used in LPS
building-lps.html - this documentModify 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.
ROOT/tools/jakarta-ant-1.5.1$ANT_HOME/bin to your PATH environment variable to
make sure you pick up the right version of ant.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.
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
We are using JavaCC, Jython, and Python (with PyXML package installed)
ROOT/tools/JavaCC2_1.class
Typical command is java -cp . JavaCC2_1
Set your $JAVACC_HOME environment variable to the location where you installed JavaCC. You may need to make the cache directory writing enabled on a linux and Mac OS X machine.
IMPORTANT Check to see if $LPS_HOME/3rd-party/jars/dev/JavaCC.zip exists.
If it doesn't, copy $JAVACC_HOME/bin/lib/JavaCC.zip to $LPS_HOME/3rd-party/jard/dev/JavaCC.zip
ROOT/tools/jython-21.class
Typical command is java -cp . jython-21
Mac OS X Note: If the GUI installer fails to install Jython, try the command line installation, where $JYTHON_INSTALL_DIR is where you want Jython installed.
java -cp . jython-21 -o $JYTHON_INSTALL_DIR
Set your $JYTHON_HOME environment variable to the location where you installed jython. Copy the jythonc (jythonc.bat on Windows) script to a directory that is in your $PATH.
Mac OS X and Linux note: there are certain directories in the jython installed directory that need to be writable - if you install this in /usr/local as root, make sure the installed tree is world writable.
Get and install Python 2.2 or 2.3 - the windows python 2.2 installer is included in ROOT/toold/Python-2.2.2.exe
After you install it, make sure the directory where you installed python is in your $PATH.
Windows CYGWIN users note: make sure that this directory comes before /usr/bin so that you pick up Windows Python2 instead of CYGWIN python.
Mac OS X and most modern Linux distros come with Python 2.2 or 2.3 already loaded.
Note for linux: python-devel must be installed, this is often not the default and will require your install CDs.
Version 0.8.3 is needed and included for Mac OS X Panther/10.3 and up.
For Linux and Mac OS X unpack the distribution and use the commands
python setup.py build and python setup.py install to install
PyXML correctly.
Windows installer is included in this release
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).
Add the Cygwin bin directory to your $PATH.
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.
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}.