Flora-2 has a simplified installation procedure for official pre-compiled releases and the full, more complex procedure, if you downloaded Flora-2 from the SVN repository.
The SVN option is suitable only for the developers and those users who need to frequently update their copy of Flora-2 in order to take advantage of the most up-to-date bug fixes and the new, cutting-edge features. Most other users should opt for the latest official release and take advantage of the simplified installation procedure. The simplified procedure does not depend on the availability of other software, such as the C++ compiler or make/nmake, and it does not involve separate steps like downloading an installing XSB.
Download the latest official release. For Unix-based systems (Linux, Mac, Solaris, Cygwin), the file is called flora2.run; for Windows, it is flora2.exe. Both bundles already contain a suitable version of XSB, so it does not need to be downloaded separately.
sh flora2.runThis will create the folder Flora-2 with two subdirectories: flora2 and XSB.
Note: you may notice that during the first few uses of the systems under Windows, some internal Flora-2 files might get recompiled on their own. This is harmless. The cause is a Windows misfeature whereby it often changes file timestamps during the unpacking process.
First, download and install XSB: either the latest released version or the development version from XSB's SVN repository. Make sure the sources are installed. If you are using the XSB Windows installer, you need to verify that the appropriate boxes are checked. Otherwise, the installer will install only the base system and the subsequent installation of Flora-2 will fail.
Note: XSB cannot be compiled in a directory whose path contains spaces. However, once compiled, XSB can be moved to any directory (even one containing spaces).
Check out Flora-2 from SVN into in a separate directory outside of the XSB source tree (for instance, ~/FLORA or C:\FLORA). The Flora-2 sources will be placed in a subdirectory called flora2. Follow the instructions below.
Change to the flora2 folder at the root of your Flora-2 installation and type the following commands:
./makeflora clean ./makeflora all path-to-/XSB/bin/xsb
If xsb is aliased to the XSB executable of your XSB installation or if path-for-/XSB/bin/xsb is on the system search path for executables, then the arguments all and path-for-/XSB/bin/xsb can be omitted:
./makeflora clean ./makeflora
If everything went well, you will be able to run Flora-2 using the script ./runflora.
You will need Microsoft's nmake, which can be downloaded as part of Visual C++ Express from http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products. Install Visual C++.
Use the following commands to configure Flora-2 (assuming that XSB is installed and configured, its invocation script is in the folder D:\XSB\bin\, and Flora-2 is installed in the folder D:\FLORA\flora2\):
PATH=C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN;%PATH% cd D:\FLORA\flora2 makeflora clean makeflora D:\XSB\bin\xsb.bat
Important: This assumes that Visual Studio was installed in the folder named C:\Program Files\Microsoft Visual Studio 10.0. If it is installed elsewhere, make the appropriate adjustments.
If you are using the 64-bit version of XSB, then configure Flora-2 using
makeflora D:\XSB\bin\xsb64.bat
instead of D:\XSB\bin\xsb.bat.
Note: the Windows version of makeflora takes only one parameter, while its Unix counterpart takes two.
It may be useful to set the environment
variable HOME
on your Windows system to some directory
accessible from your account.
XSB and Flora-2 will place various auxiliary files in
the subfolder .xsb in that directory.
Environment variables are usually set by opening
the System
folder, which is located inside
the Settings
folder.
If HOME
is not set, XSB will use the location
specified in the USERPROFILE system variable.
Once Flora-2 is installed, you can run it using the command D:\FLORA\flora2\runflora