There are basically three ways to compile your boo code:
- through the booc utility;
- through the booc task (one of the nant tasks);
- through the Boo.Lang.Compiler API;
Command line arguments
- -v, -vv and -vvv - Compiles using verbose mode
- -r:<reference_name> - adds a reference, where <reference_name> is the library's name. For example:
- -o:<file_name_to_generate>: Forces the generated file to be the specified by <file_name_to_generate>. So,
will create an .exe file named SpongeBob.exe instead of MyProgram.exe
- -t:<type_name_to_generate> - Forces the generation of <type_name_to_generate>. Options may be library - to create a .dll file -, exe and winexe to create executables.
- -p:<pipeline> - adds the step <pipeline> to the compile process
- -c:<culture> - CultureInfo to use
- -srcdir:<source_files> - specify where to find the source files.
- -resource:<file.resources> - specify a resource file
Look here for details.
Running & Compiling boo programs that use Mono or GTK# on Windows
Here are instructions for running and compiling boo scripts that use Mono-only assemblies (such as Mono.GetOptions.dll or gtk-sharp.dll) on a Windows machine. I'm assuming you are already familiar with using the Windows command prompt (the open command here XP powertoy is helpful).
- Download the Windows installer for Mono that includes GTK# and XSP and run it.
- You might want to add mono to your Path environment variable. Right click My Computer, go to properties, advanced, environment variables. Edit Path by appending a semicolon (; ) followed by "C:\Program Files\Mono-1.0.4\bin" (no quotes).
- You can test two scripts in the examples directory to see if it is working:
- Then run the applications to test them. They should run cross-platform.
- If you want the gtk-sharp or mono.getoptions dlls for redistributing your app (although see the previous update note: now you can't run a mono app in .NET), you will find the dlls you need in C:\Program Files\Mono-1.0.2\lib\mono and C:\Program Files\Mono-1.0.2\lib\mono\1.0.
- You can now develop completely cross-platform applications even if you don't have access to a Linux machine.
Distributing Your Boo App or Library, Merging Boo.Lang.dll
Pretty much any application or dll library you compile in boo will depend on the Boo.Lang.dll. You need to include that dll with your application or library when distributing it.
You can use a tool called ILMerge to combine the Boo.Lang.dll into your exe or dll. See Merge Boo.Lang.dll into your exe or dll.