Compiling the F# plugin for MonoDevelop
The F# plugin is open-source and is distributed under the Apache 2.0 license. The source code is available on GitHub as a repository maaged by the F# open-source organization. You can read mor about the organization and its purpose in this blog post.
Before compiling F# plugin, you need to (obviously) install F#. To run the F# plugin, you need to install F# such that the F# plugin can locate the installation. The easiest option is to follow the installation guide in the CrossPlatform F# section of this web site. Briefly, you need to install F# and add most of the F# assemblies (FSharp.Core and FSharp.Compiler*) to the Global Assembly Cache. Then you either need fsharpc script created by F# packages or you need to set FSHARP_COMPILER_BIN environment variable, so that plugin can locate the F# installation. For more details, go to the F# plugin prerequisites page.
Compilation on Windows
On Windows, you can use Visual Studio. Open and build the FSharp.MonoDevelop.sln solution in the FSharp.MonoDevelop subdirectory. This is tested using Visual Studio 2008. You may have to correct some references depending on your installation. Using MonoDevelop (with F# plugin) should also work (but it is not largely tested).
Compilation on Linux/Mac
On Linux/Mac, you can use make. To generate Makefile, you can use ./configure.sh commnd that tries to locate paths of all required components (and asks you if it cannot find them automatically).
The usual command line steps to geneate Makefile and use it are following:
# Generate Makefile using the confiure script
./configure.sh
# Compile C# GUI project and F# Language binding (all)
make
# Copy/remove the compiled `dll` files to/from the MonoDevelop
# Addins directory (so that you can easily test the plugin)
make install
make uninstall
# Build a package for the MonoDevelop online plugin repository
make package
Configure script
When you run the ./configure.sh script it prints the following information. You can specify various command line options that affect the generated Makefile:
MonoDevelop Makefile configuration script
-----------------------------------------
This will generate Makefile with correct paths for you. You may need to
provide path for some components if they cannot be found automatically.
If you're using default path but it wasn't find automatically, please
report it, so that it can be added. Contact: Tomas Petricek (tomas@tomasp.net)
Usage: ./configure.sh [-e:<mono>] [-f:<fsc>] [-c:<gmcs>] [-n]
-n If specified, the the 'mono' executable is not used
(Use this on Windows or when 'exe' files can be executed)
-e <mono> Specify 'mono' executable with parameters
Default value: mono
-f <fsc> Path/name of the F# compiler executable or script
('mono' is NOT automatically added to the front)
Default value: fsharpc
-c <gmcs> Path/name of the C# compiler executable or script
('mono' is NOT automatically added to the front)
Default value: gmcs