This page describes how to build and install Fossil. The whole process is designed to be very easy.
0.0 Using A Pre-compiled Binary
You can skip steps 1.0 and 2.0 below by downloading a pre-compiled binary appropriate for your platform. If you use a pre-compiled binary jump immediate to step 3.0.
1.0 Obtaining The Source Code
Fossil is self-hosting, so you can obtain a ZIP archive containing a snapshot of the latest version directly from fossil's own fossil repository. Follow these steps:
Pointer your web browser at http://www.fossil-scm.org/. Click on the "Login" menu button.
Log in as anonymous. The password is shown on screen. The reason for requiring this login is to prevent spiders from walking the entire website, downloading ZIP archives of every historical version, and thereby soaking up all our bandwidth.
Click on the Timeline or Leaves link at the top of the page.
Select a version of of fossil you want to download. Click on its link. Note that you must successfully log in as "anonymous" in step 1 above in order to see the link to the detailed version information.
Finally, click on the "Zip Archive" link. This link will build a ZIP archive of the complete source code and download it to your browser.
2.0 Compiling
Follow these steps to compile on a unix platform (Linux, *BSD, MacOS, etc):
-
Create a directory to hold the source code. Then unzip the ZIP archive you downloaded into that directory. You should be in the top-level folder of that directory
(Optional:) Edit the Makefile to set it up like you want. You probably do not need to do anything. Do not be intimidated: There are less than 10 variables in the makefile that can be changed. The whole Makefile is only a few dozen lines long and most of those lines are comments.
Type "make"
To build on windows, use an alternative makefile suitable for your particular build environment. The alternative windows makefiles are all found in the win/ subdirectory of the source tree. So, for example, if you want build using the mingw/msys compiler package for windows, then run "make -f win/Makefile.mingw" instead of just "make" in step 8 above.
3.0 Installing
-
The finished binary is named "fossil" (or "fossil.exe" on windows). Put this binary in a directory that is somewhere on your PATH environment variable. It does not matter where.
-
(Optional:) To uninstall, just delete the binary.
4.0 Additional Considerations
- If the makefiles that come with Fossil do not work for you, or for some other reason you want to know how to build Fossil manually, then refer to the Fossil Build Process document which describes in detail what the makefiles do behind the scenes.