Get the Avail Source
A source distribution of Avail is available for users of Windows, Mac OS X, Linux, and other Unix systems. A source distribution is obtained by cloning the official Avail project repository. The following instructions are provided using a Unix terminal. Windows users will need to make the appropriate adjustments to dereference environment variables.
A Git client is required to clone the project repository. If you do not already have one installed, then you can obtain one here. We have noticed that the Git binaries for Mac OS X are sometimes mislinked on older versions of the operating system (< 10.9.x); if you encounter this problem, then uninstall the Git client and install Xcode to obtain a properly linked build of Git.
The Avail project repository is located at:
The following branches correspond to supported Avail project releases:
You can obtain a specific release using the following command:
$BRANCH_NAME stands for one of the branch names given in the table above. For example, to obtain the
1.0.0_DEV_2014-04-28 branch, you can issue the following command:
Once you have cloned an Avail project branch, you can stay current with updates to that branch by pulling them from the official repository:
If you obtained a binary distribution of Avail, then run the installer. Afterward, skip ahead to learn about configuration.
If you obtained a source distribution of Avail, the you have more work to do before you can start experimenting with Avail. The official installation instructions are included in the
README.md file of the source distribution:
README.md is a plain text document that contains Unicode code points in the UTF-8 character encoding, so it can be read by most modern editors. As a courtesy to aging developers and system administrators, such as several of the Avail team members, it is manually line-broken to look good on an 80-column display.
If you encounter problems during installation and you discover that there is disagreement between
README.md and the following instructions, then please treat
README.md as gospel.
Before installing Avail, you will need to make sure that you have obtained and installed the prerequisite software:
Java: You will need version 1.8, or later, of the Java Development Kit (JDK). Many modern systems already have some version of the JDK, so you should check your JDK version before obtaining and installing it from Oracle (or some other vendor). You can do so like this:
And hopefully you get back something like this:
Otherwise, the latest version of the Java SE Development Kit 8 can be obtained at:
Please follow any installation directions provided by the Oracle website or included with the JDK.
Please make sure that
javacare on your
Apache Ant: This is the build software used to compile and install Avail. You will need version 1.8.2 or later. Most modern Unix systems already have some version of Ant installed, but, if you are a Windows user, then you will definitely need to download it yourself if you have not previously done so. You can check to see if Ant is installed and has the correct version like this:
And maybe get back something like this:
If you want to download a recent binary distribution of Ant, then go here:
Or you can obtain a source distribution here:
Please follow any installation directions provided by the Apache Ant website or included with the distribution of your choice.
Please make sure that
antis on your
You will need to compile Avail using the provided build script,
build.xml. To build Avail:
$PROJ is the location of your local copy of the Avail project repository. You should see output similar to this:
If your transcript includes
BUILD SUCCESSFUL near the end, then your build is ready for installation.
Once you have successfully built the Avail project, you can then install it for either user-specific or system-wide usage. The installation directory (hereinafter,
$INSTALL) is specified by an Ant property,
"path.install". You can set this property by providing the
-Dpath.install=… option to Ant.
You can install Avail into a specific installation directory like this:
If you do not specify
-Dpath.install=… explicitly, then
$INSTALL defaults to
/usr/local/avail on Mac OS X, Linux, and Unix; it defaults to
C:\Program Files\Avail on Windows. Note that these are system directories, and in order to install to such a location you may need to escalate your privileges by using a tool like
sudo or logging in with an administrative account.
Your transcript should look similar to this:
If your transcript includes
BUILD SUCCESSFUL near the end, then the installation has completed. The transcript contains information about how to configure your environment for Avail development. Please be sure to follow these instructions (reiterated in more detail below).
In order to develop Avail libraries and programs, you will need to configure your environment appropriately. On Unix, this is best accomplished by updating your shell configuration file. On Windows, you can use the Control Panel to adjust the environment variables.
The following steps should be taken to prepare your environment for Avail development:
- Set the
AVAIL_HOMEenvironment variable to
$INSTALL. (You will need to put
$INSTALLin quotation marks
(U+0022)if it contains spaces
(U+0020).) The Avail workbench,
avail-dev, uses this information to locate Avail, and will not run correctly without
- Update your
$INSTALL/bin. (Again, on Unix systems you will need to put
$INSTALLin quotation marks if it contains spaces.) This is where
avail-devis located. This enables your shell to find the command without the user needing to prefix its exact path or change the working directory.
- Set the
AVAIL_ROOTSenvironment variable to a valid module roots path so that Avail can find its modules.
A module roots path is a specification of locations that contain Avail code, in either binary or source form. A module roots path comprises several module root specifications separated by semicolons
(U+003B). (On Unix systems,
you will need to put each semicolon in apostrophes
(U+0027), in order to hide it from the shell's command parser.)
Each module root specification comprises a module root name, which is just a unique logical identifier, and a module root path. A module root name usually denotes a vendor or a project, and does not need to have any relationship to the file system. By convention, the module root name of the Avail standard library is
avail, and the official collection of examples supported by The Avail
Foundation is called
examples. The Avail Foundation advises Avail developers to follow a reverse DNS name convention, like
com.acme.super-neato-project, to prevent collision between module root names among several vendors and projects.
A module root path is actually a conjunction of a binary repository path and a source module path, respectively, separated by a comma
(U+002C). A binary repository path locates a binary file that contains the compiled forms of Avail source modules. A source module path locates a directory containing Avail source modules. The same binary repository path may be used for many source paths. If a binary repository path does not refer to an existing file, then "avail-dev" will create and populate this file as needed. A source path must always refer to an existing directory that is readable by the user running
AVAIL_ROOTS is not defined, then
avail-dev will use the following module
roots path by default:
This default is suitable for interacting with the Avail system as shipped by The Avail Foundation, but not for developing your own Avail modules. To develop your own Avail modules, your
AVAIL_ROOTS environment variable must at least include a module root specification for the Avail standard library, and it must also include module root specifications for your own Avail projects.
For more information on this topic, please read about module discovery.
If you installed a binary distribution of Avail, then you can launch the Avail workbench by double-clicking on the application's icon.
If you installed a source distribution of Avail, then you can launch the Avail workbench like this:
If you are launching the Avail workbench from a Windows command prompt, then be aware that the name of the batch script is
Once you've launched the workbench, have a look at the Avail workbench documentation, which includes a tour of the UI and features.
|Back to the top|