Personal tools

NativeWindows7SubversionBuildInstructions

From OpenLaszlo

Contents

Build Instructions on Native Windows 7 (no cygwin)

Building on Windows without cygwin is possible. I used the steps in SubversionBuildInstructions as a starting point.

My system is a 64-bit Windows 7 machine. %USERPROFILE% points to my "home directory". In my case this points to c:\Users\philip. If you see references in the build instructions for ~/.ant/lib, you can generally substitute %USERPROFILE%\.ant\lib.

When I was finished installing OpenLaszlo (my base directory was c:\clients\laszlo), the directory hierarchy looks like,

Image:Win7_dir.png

(BTW, The red exclaimation point on vendor is because I have TortoiseSVN ([1]) installed on my machine. This integrates SVN into Windows Explorer.)


Install Java

I am running a 64-bit version of Windows 7 so I installed the 64-bit version of the Java sdk. Use the 32-bit version if you are running on a 32-bit version of Windows.

  • I downloaded JDK 6 Update 23 from java.sun.com [2].
  • During installation I changed the default installation directory. The installer wants to use c:\Program Files but I followed the directions from the main build page and I picked, C:\Java\jdk1.6.0_23.

Install Tomcat

  • Install Tomcat binary. In installed 5.5 (5.5.29) using this link:

[3]

  • Install to C:\Tomcat5
  • When asked to specify an admin account, set username = admin, password = laszlo


Get OpenLaszlo Sources

Make sure a subversion is in your path. I used the svn that was installed here, and added this to my path.

c:/Program Files (x86)/CollabNet/Subversion Server/

(Note: The directory is Program Files (x86) because it is a 32-bit application running on my 64-bit machine. If you install on a 32-bit OS, this will be installed in Program Files


 mkdir c:\clients\laszlo
 mkdir c:\clients\laszlo\lib
 mkdir c:\clients\laszlo\svn
 cd c:\clients\laszlo\svn
 svn co http://svn.openlaszlo.org/openlaszlo/trunk openlaszlo/trunk
 svn co http://svn.openlaszlo.org/vendor vendor
 svn co http://svn.openlaszlo.org/tools/trunk tools/trunk


Install ant

I followed the build instructions (remmber my root of my installation is c:\clients\laszlo)

  • Unzip ant 1.7.1 from c:/clients/laszlo/svn/vendor/apache-ant-1.7.1-bin.zip to c:/clients/laszlo/lib/apache-ant-1.7.1/.
  • Copy ant aupport files to %USERPROFILE%\.ant\lib (I had to create the .ant directory from a command prompt because Windows Explorer would not let me create a directory of this name). The files are in c:\clients\laszlo\svn\vendor.
ant-contrib.jar
catalina-ant.jar
jing.jar
js.jar


Install javacc

Unzip JavaCC 5 from c:\clients\laszlo\svn\vendor\javacc-5.0.zip to c:\clients\laszlo\lib\javacc-5.0\

setup.bat script

To make it easier to manage, I created a setup.bat file in the root of my Laszlo installation. This makes it easy for me to configure everything. I put this file in my %LPS_HOME% directory.


set LZ_ROOT=C:\clients\laszlo
set LPS_HOME=%LZ_ROOT%\svn\openlaszlo\trunk
set JAVA_HOME=C:\Java\jdk1.6.0_23
set TOMCAT_HOME=C:\Tomcat5\bin
set CATALINA_HOME=%TOMCAT_HOME%
set ANT_HOME=%LZ_ROOT%\lib\apache-ant-1.7.1
set JAVACC_HOME=%LZ_ROOT%\lib\javacc-5.0
set LZ_TOOLS_ROOT=%LZ_ROOT%\svn\tools\trunk\
set LZ_VENDOR_ROOT=%LZ_ROOT%\svn\vendor\
set PATH=%PATH%;C:\java\jdk1.6.0_23\bin;C:\Tomcat5\bin;C:\clients\laszlo\lib\apache-ant-1.7.1\bin;C:\Program Files (x86)\CollabNet\Subversion Server;C:\clients\laszlo\lib\javacc-5.0\bin

Building

I build using either a command prompt or using a shell inside of emacs. Both work equally well although I prefer using emacs.

cd C:\clients\laszlo\svn\openlaszlo\trunk
setup  (executes setup.bat to setup environment)
ant clean build
ant webapp.deploy

Note: I had to configure Tomcat slightly. Right click on the Tomcat icon and select Configure... On the Startup and Shutdown tabs select Mode=Java rather than Mode=jvm. Without this change I got some strange errors. THis might be a configuration issue with my machine so I don't know if anyone else will see an error.


Using fdb

When I tried to run an application in the fdb debugger

fdb "http://localhost:8080/trunk/examples/extensions/html.lzx?lzr=swf10&debug=true"

I received an error message (just calling fdb generates the same error):

Error loading: C:\java\jdk1.6.0_20\jre\bin\server\jvm.dll

I found a solution by modifying the properties on /WEB-INF/bin/fdb.exe. On the Compatibility tab, click, "Run this program in compatibility mode for Windows XP (Service Pack 3)". Now when I run fdb, it works as advertised. I suppose this change must be made to other executables in this directory.