How to build the BlueJ/Greenfoot launcher (and installer)
---------------------------------------------------------

The launcher is built using the MinGW (Minimalist GNU for Windows) environment:

http://www.mingw.org/

See MINGW.TXT for information on required packages and setup.

If you want to build the Windows installer, you will also need InnoSetup:

http://jrsoftware.org/isinfo.php

(Version 5.2.3 should be fine).


Step 1.
-------

Edit the Makefile and select either a BlueJ or Greenfoot build. For example:

  # For BlueJ
  #APPNAME=\"BlueJ\"
  #GREENFOOTDEF=

  # For Greenfoot
  APPNAME=\"Greenfoot\"
  GREENFOOTDEF=-DGREENFOOT
  
... will build the Greenfoot launcher. If you want the BlueJ launcher, you should
comment out the Greenfoot settings for APPNAME and GREENFOOTDEF, and uncomment the
BlueJ settings.


Step 2.
-------

Edit the bjlaunch.rc file and correct the version numbers. This needs to be done
in two places. Make sure to change the information (protected by #ifdef) for the
correct product, either BlueJ or Greenfoot.

Example settings to look for:

  FILEVERSION 1,5,1,0
  PRODUCTVERSION 1,5,1,0

            VALUE "FileVersion", "1.5.1"
            VALUE "InternalName", "greenfoot"
            VALUE "OriginalFilename", "greenfoot.exe"
            VALUE "ProductName", "Greenfoot"
            VALUE "ProductVersion", "1.5.1"

*** Also *** edit the appropriate manifest file - either bjmanifest.xml or
gfmanifest.xml - and update the version there. It should be a four digit
version, eg "3.0.4.0" for version 3.0.4, the last digit can be used as a
build ID or just left at 0.

Step 3.
-------

Start your bash shell in the MSYS environment (i.e. run mintty).
Change directory into the /package/winlaunch subdirector of the BlueJ project.
Then:

Run "make" (or "mingw32-make").

The generated launcher is called "bjlaunch.exe" (for BlueJ) or
"gflaunch.exe" (for Greenfoot).


Step 4.
-------

You can now build the Windows installer.

For BlueJ:

First, run the "ready-to-run" ant task in the build.xml file in the root
of the BlueJ source distribution. The "build.properties" file (in the same location)
will need to be edited first (specify the BlueJ build location and JDK location, etc).

Then run the "windows-dist" ant task in the same build file.

The installer will be generated in the package/winsetup subdirectory.

For Greenfoot:
See the build instructions included with Greenfoot.
