Build
Overview
Most users should just use the prebuilt distribution. However if you want to get your hands dirty and build from source, then follow this guide.
To build Haxall from source requires the following projects:
- Fantom language and runtime
- Project Haystack core definitions
- Xeto core Xeto libraries
- Haxall repo itself
All of these projects are available on GitHub.
Fantom
In most cases, the simplest solution is to just install the latest version of Fantom rather than building from scratch:
- Download and unzip latest version
- See Fantom Setup
- Make sure
fan
orfan.bat
is in your executable path
There are cases where the current version of the Haxall repo requires building Fantom from source. We call this a bootstrap build because Fantom is used to compile Fantom itself. See the Bootstrap chapter for details.
Project Haystack
Once Fantom is installed, you can clone and rebuild the Project Haystack pods:
- Pull the Haystack-Defs GitHub repo
- Setup an empty "fan.props" in repo root directory
- CD to your
{haystack-defs}
root directory and runfan -version
; verify your Env Path is as follows:haystack-defs (work), fantom (home)
- Run
{haystack-defs}/src/build.fan
; should build to{haystack-defs}/lib/
Xeto
You also need to clone the Xeto repo:
- Pull the Xeto GitHub repo
You do not need to do anything else with this repo.
Haxall
To build Haxall from source:
- Pull from Haxall GitHub repo
- Setup "fan.props" in repo root of Haxall with this line:
path=/path-to/haystack-defs;/path-to/xeto
- CD to your
{haxall}
root directory and runfan -version
; verify your Env Path is as follows:haxall (work), xeto, haystack-defs,fantom (home)
- Set the environment variable
FAN_BUILD_JDKHOME
to point to your JDK install - Run
{haxall}/src/build.fan
; should build to{haxall}/lib/
Note that when building from source as described here, the batch files in {haxall}/bin
cannot be used directly. Instead you can run the Haxall command line using the fan <pod>
launcher like this:
fan hx version