Edit page History How do I edit this website?

Build on MacOS X

This page is up to date for SVN r13224.

Getting the required tools

It is recommended that you use OS X 10.7 or later to build Micro-Manager, although earlier versions may work without too much trouble.

Get Xcode from Apple’s App Store. Although we will only be using the command-line compilers and tools, make sure to start Xcode once and allow it to install the Command Line Tools.

A number of command-line tools are required to build Micro-Manager. The easiest way to obtain them is to use Homebrew:

 brew install autoconf automake libtool pkg-config swig subversion ant

Getting dependencies

Boost C++ Libraries are required to build Micro-Manager. It is easiest to install it using Homebrew:

 brew install boost

To build the Micro-Manager application, you also need the Java Development Kit. JDK 7 from Oracle is easiest to set up but is 64-bit only. (Micro-Manager Java source code is written in Java 6. You can also use Apple JDK 6 (“Java for OS X”), but you will need to pass some complicated flags to ./configure.) You will also need a copy of ImageJ 1.48 (it is best to use a clean copy, at least the first time you are building Micro-Manager). Extract this to any desired location.

If you want to build the Python wrapper (MMCorePy), you will need Python 2.7 or 3.x and NumPy. These can be installed from binary distributions or using Homebrew (Python 2 is also preinstalled in OS X).

Getting Micro-Manager source code

Check out Micro-Manager Source Code using Subversion. Place the main source tree (from micromanager2) and the 3rdpartypublic directory in the same parent directory.

Configuring and building

See doc/how-to-build.md for generic build instructions.

The most common way to build and install Micro-Manager is to run the following, in the root of the micromanager source tree:

 ./autogen.sh
 ./configure --enable-imagej-plugin=/path/to/ImageJ
 make fetchdeps   # Required since SVN r14001-r14016
 make
 make install

The last step will print instructions for how to run the installed Micro-Manager.

To get help with ./configure options, type

 ./configure --help

If you use Java 6 (“Java for OS X” from Apple), use the following for the ./configure line:

./configure --enable-imagej-plugin=/path/to/ImageJ \ JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home \ JNI_CPPFLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers \ JAVACFLAGS="-Xlint:all,-serial -source 1.6 -target 1.6"

Device adapter dependencies

Some device adapters require extra dependencies. Most of these can be installed using Homebrew.

# To build USBManager
brew install libusb-compat

# To build HIDManager
brew install hidapi

brew install libdc1394

# To build GPhoto2
brew install libgphoto2 freeimage

# To build OpenCVgrabber
brew install opencv

See also: output of

./DeviceAdapters/configure --help

or

./configure --help=recursive

Any vendor frameworks (mostly camera SDKs) will be automatically detected if installed in the default location.