jMax home page @ SourceForge.net

Compiling jMax for Microsoft Windows

by  Jarek Myszewski, Francois Dechelle, Patrice Tisserand, Pierre-Alexandre Pages

Required tools:

To compile CVS version of jMax; you need the following tools:
-  Microsoft Visual C++ 5.0/6.0
-  CYGWIN bash with sed, flex and bison installed
-  JAVA JDK 1.3 or JDK1.4
-  Windows XP/2000/98

Additional tools:

You also need to download these two SDK’s from the MSDN site:
-  Microsoft Platform SDK (latest version)
-  Microsoft DirectX SDK (latest version)

The first one is needed to get the definitions of "ShFolder.dll", and the second one is needed to have an up-to-date version of the SDK. Note that installing the DirectX SDK is optional since Visual Studio is shipped with its own version of DirectX, but is highly recommended (this component is used by the DirectSound package)

Preparing the MS Windows system to build jmax.

JAVA:

-  Install JAVA JDK (1.4 or 1.3) on your system
-  Define environment (system or user) variable JAVA_HOME and point it to the root directory of your JAVA installation directory (for example: D:\j2sdk1.4.1_01)
-  Add path below to your system or user $PATH variable $(JAVA_HOME)\bin
-  Add path to ’jvm.dll’ to your system or user $PATH variable (for example in java sdk 1.4, add path $(JAVA_HOME)\jre\bin\client)

SDK’s:

-  In Visual Studio -> Options -> Include Directories : add ON TOP OF THE LIST the "include" directory of the Platform-SDK.
-  Add also the "include" directory of the DirectX SDK.
-  Then add in the Libraries Directories, ON TOP OF THE LIST, the "lib" directory of the Platform-SDK.
-  Finally, add the "lib" directory of the DirectX SDK.

Warning : The order of the directories found in these two lists is IMPORTANT. If you don’t put the new entries on top of the list, Visual Studio will continue to use both old versions of the SDK’s

CYGWIN configuration


-  Define environment variable (system or user) CYGWIN_HOME and point it to the root of your cygwin installation directory (D:\cygwin)
-  Make sure that flex.exe, bison.exe and sed.exe reside in your $(CYGWIN_HOME)\bin directory

Build Procedure.

On the first built after checkout (download), start a bash shell, move (cd) into the winbuild sub-directory under jMax top directory and execute command: ./winprep.sh [1]

This will generate proper version files ’JMaxVersion.java’ and ’version.c’ it will also invoke a flex and bison to generate necessary tokenizer and parser ’tokenizer.c’ ’parser.c’ and ’parser.h’

-  Open jmax/winbuld/fts.dsw using Visual C++
-  Set fts as your selected active project
-  Build fts
-  Set jmax as your selected active project
-  Built jmax
-  Set jmaxrun as your selected active project
-  Built jmaxrun

-  Once you have compiled fts and jmax, you need to compile jMax packages
-  Open jmax/packages/winbuild/packages.dsw ad do a "batch build".

You are all set
To start the jmax, use explorer to enter jmax/bin directory and click on jmax.exe


Notes:

[1] jmax will not compile if this command is not ran at least once