Compiling Fortis
From Fortis
Contents |
Introduction
Fortis has a multiplatform build system that uses GNU Makefiles to manage its build process. The following instructions assume a Microsoft Windows XP system, using Microsoft Visual C++. Care has been taken to ensure that UNIX/gcc can also complete a cross to Win32 build.
System Requirements
- Microsoft Windows XP
- Microsoft Visual C++
- Microsoft Junction utility (extract it to the C: drive)
- Cygwin (when you run setup.exe, search for and install the following packages)
- Make
- Bash
- Subversion
- Binutils
- Bison
- Flex
- Perl
- Supporting Libraries (you should not need to download these if you are copying them from an existing environment)
- Microsoft Platform SDK (PSDK)
- bzip2 source (installation instructions)
- zlib source (installation instructions)
- iconv
- lemon
- libarchive
- libxml2
- zlib
Installation Steps
- Start Cygwin and start a Windows command prompt.
- Create a directory within the cygwin environment named /develop.
$ mkdir /develop
- Use the Windows command line to run junction.exe, which came with the Microsoft Junction Utility. Make a junction point from C:\develop to the location of the new /develop directory. Assuming your cygwin is rooted at c:\cygwin:
> junction c:\\develop c:\\cygwin\\develop
- Copy the Fortis supporting libraries from a suer that's already set up to C:\develop\contrib (If you are not copying the libraries, see the instructions for Creating Libraries below.)
- Use Cygwin to make your checkout directory.
$ mkdir /develop/multiling
- Use Subversion to check out a copy of the fortis source for your desired revision (in this case, "apoto-novo"):
$ cd /develop/multiling; svn co http://svn.multiling.com/svn/fortis/fortis/branches/[INSERT_REVISION_NAME_HERE] [INSERT_REVISION_NAME_HERE]
For example,$ cd /develop/multiling; svn co -r HEAD http://svn.multiling.com/svn/fortis/fortis/branches/wiwaxia wiwaxia
- Create a platform.mk file for the install you just created at C:\develop\multiling\[INSERT_REVISION_NAME_HERE]. You can base this off of platform.mk-coral, in the same directory, which is a plain text file. The paths and version numbers will not be exactly the same.
- Build the source.
$ cd /develop/multiling/[INSERT_REVISION_NAME_HERE]; make debug; make debug/all
If you get an error saying, "Failed to load and parse the manifest. The system cannot find the file specified." it means you have run into a linking problem. The new Visual Studio 2010 linker is buggy. Run this command several times, and you will notice that it gets further and further after each failure. Run it until it finishes without an error. - Now link the compiled code.
$ make debug/link -s
- If this is the first time you're compiling Fortis, run this:
$ make debug/install
- If this is NOT the first time you're compling Fortis, run this:
$ make debug/inst
- Copy the three .dll files in C:\develop\contrib to C:\develop\multiling\[INSERT_REVISION_NAME_HERE]\fortis-debug\bin
- Now you can run the application from C:\develop\multiling\[INSERT_REVISION_NAME_HERE]\fortis-debug\bin\fortis.exe
Creating Libraries From Scratch
If you are not copying the libraries, you will need to do the following:
- Create a contrib directory, and install our supporting libraries:
$ mkdir /develop/contrib; cd /develop/contrib; mkdir psdk bzip2 curl icu
- Install the supporting libraries into their respective directories. It is OK to use different directory names, for example including the library version numbers. It is best if each supporting library is arranged to contain the following subdirectories: include lib src. A full Fortis configuration will require compiling each of the contrib libraries twice. Once with the -MD flag (for a release build) and once with the -MDd flag (for a debugging build). It is ok to enable optimizations on both builds, but the -M?? flag is necessary because it controls C library compatibility. Place the .lib files in the same location, but name the debugging ones with a final "d" character. For instance, z.lib and zd.lib.
Some documentation for installing these libraries can be found at http://starfish/wiki/index.php/Production#Reference