Skip to content
letiemble edited this page Nov 21, 2012 · 7 revisions

This project contains a tool to build a Universal 32/64 bits Mono runtime for Mac OS X.

How it works

This tool builds a full Universal 32/64 bits Mono runtime in a smart way:

  • it builds a minimal 64 bits Mono runtime
  • it install a full Universal 32 bits Mono runtime
  • it merges the minimal 64 bits Mono runtime into the Universal 32 bits one
How it works

The result is a usable Universal 32/64 bits Mono runtime where all the Mono binaries supports universal architectures.

Requirements

In order to use this tool, here are the requirements:

  • A 64 bits capable machine (Core-2-Duo, Intel i5, Intel i7, etc). Note that even if the Mac OS X kernel runs as 32 bits, you can build 64 bits binaries.
  • Xcode (4.2+)
  • Command line tools for Xcode (for make and clang)
  • Auxiliary tools for Xcode (for PackageMaker)
  • An once of patience (ok let's say two)

How to use

Beware that the Makefile needs to WIPE the installed Mono runtime. This MEANS that if you have an installed Mono runtime, it will be WIPED during the build process. You have to re-install it after.

The use is pretty straight, as the purpose is to be efficient:

$ make

You can also override the default parameters:

$ make [VERSION=X.Y.Z] [RELEASE=T] [KIND=[MDK|MRE]] [BUILDER=...] [CERTIFICATE=...]
  • VERSION : This is the version of the Mono package
  • RELEASE : This is the release number for the Mono package
  • KIND : Specify either the Development Kit (MDK) or the Runtime Environment (MRE)
  • BUILDER : This is the suffix used for the naming of the resulting package
  • CERTIFICATE : The name of the certificate to use to sign the resulting package

Inside the Makefile

Here are the targets executed by the Makefile:

  1. prepare : Prepare the directories used during the process
  2. fetch-files : Fetch the Mono files (sources and package)
  3. wipe-mono : Remove any existing Mono framework
  4. build-sources : Build the Mono runtime targeting x86_64 architecture (without the MCS)
  5. copy-binaries : Extract only the x86_64 Mach-O binaries
  6. install-mono : Install the stock Mono framework
  7. merge-binaries : Merge the x86_64 Mach-O binaries with their i386 counterpart and copy the result back in place
  8. build-package : Build the universal package
  9. finish : Unmount the Mono package

What's next ?

Now you can enjoy the pleasure of Mono in both 32 and 64 bits on capable machines. Even if the 64 bits Mono runtime is officially stable, you can encounter cases where the program does not work or simply crashes. If you need to run a specific Mono application in 32 bits mode, take a look at the Architecture-Selection.

Clone this wiki locally