top bar

Difference between revisions of "Linux installation from source (Ubuntu)"

(Install ImageJ: No need to remove Ubuntu ImageJ, as configure will not autodetect ImageJ.)
(Install Build Programs and Libraries)
Line 30: Line 30:
 
{{MessageBox|1=Commandline|2=<pre>
 
{{MessageBox|1=Commandline|2=<pre>
  
sudo apt-get install subversion build-essential automake libtool \
+
sudo apt-get install subversion build-essential autoconf automake libtool \
 
                     libboost-all-dev zlib1g-dev swig
 
                     libboost-all-dev zlib1g-dev swig
 
</pre>}}
 
</pre>}}

Revision as of 16:29, 22 April 2014

Preparation

Install JDK

If you are building the Micro-Manager Java GUI, Java 1.6 or 1.7 is recommended[1]. The simplest way is to use OpenJDK:

Commandline

sudo apt-get install openjdk-6-jdk

(You can also use openjdk-7-jdk.)

Install ImageJ

Download the Linux version of ImageJ from the NIH website. From a terminal, unzip to /usr/local/, and remove the embedded JRE, as we already have one installed.

Commandline

cd ~/Downloads/
sudo unzip ij*-linux*.zip -d /usr/local/
sudo rm -rf /usr/local/ImageJ/jre
sudo chmod a+Xr /usr/local/ImageJ

Install Build Programs and Libraries

You will need a subversion client to checkout the source code, several libraries, and build tools. Install them with:

Commandline

sudo apt-get install subversion build-essential autoconf automake libtool \
                     libboost-all-dev zlib1g-dev swig

You may also need to install additional packages (for cameras and special hardware). See the full list in #Dependencies

Fetch Source Repositories

Create a directory for the the subversion repositories, such as ~/mm. Besides the source tree, additional binary dependencies are stored in the 3rdpartypublic repository. The build scripts in the source tree assume 3rdpartypublic is in the same parent folder level:

Commandline

mkdir ~/mm
cd ~/mm
svn co https://valelab.ucsf.edu/svn/micromanager2/trunk/ micro-manager1.4
svn co https://valelab.ucsf.edu/svn/3rdpartypublic/

This creates 2 new folders in the mm directory:

    ~/mm/micro-manager1.4
    ~/mm/3rdpartypublic

Add the Beanshell and SwingX to the ImageJ plugins directory:

Commandline

cd ~/mm/3rdpartypublic/classext
sudo cp bsh-2.0b4.jar swingx-0.9.5.jar /usr/local/ImageJ/plugins/

Building Micro-Manager

Create the Autotools files

configure uses the bundled version of ImageJ:

Commandline

cd ~/mm/micro-manager1.4
./mmUnixBuild.sh
./configure --with-imagej=/usr/local/ImageJ \
            --with-javaincl=/usr/lib/jvm/java-7-oracle/include/

Compile

Commandline

make

Install

Commandline

sudo make install
sudo ldconfig

Post Install

Create the startup script

Micro-Manager requires the path to /usr/local/lib/micro-manager. Create the 4 line Bash script below in /usr/local/ImageJ and save it as, say, /usr/local/bin/mmscript.

File: mmscript

#!/bin/bash
cd /usr/local/ImageJ
java -Xmx1439m -Xincgc -XX:PermSize=128m \
     -Dpython.cachedir.skip=true -Dplugins.dir=/usr/local/ImageJ \
     -Dsun.java.command=ImageJ -Djava.class.path=/usr/local/ImageJ/ij.jar \
     -Dimagej.dir=/usr/local/ImageJ -Dij.dir=/usr/local/ImageJ \
     -Dij.executable=/usr/local/ImageJ/ImageJ \
     -Djava.library.path=/usr/share/java:/usr/local/lib/micro-manager \
      ij.ImageJ -eval 'run("Micro-Manager Studio");'

Make the script executable:

Commandline

sudo chmod +x mmscript

Running Micro-Manager

Start Micro-Manager with your new script:

Commandline

./mmscript &

Appendix

Dependencies

You need the following packages:
Name Equivalent Synaptic package name
Required Dependencies:
Subversion subversion
GNU C++ build-essential
GNU Autotools automake
GNU Libtool libtool
Boost libraries libboost-all-dev
zlib compression library zlib1g-dev
Simplified Wrapper and Interface Library swig
Sun Java SDK N/A - manually fetch from Oracle website
Optional Dependencies:
Firewire Camera Library libdc1394-*-dev
Open Source Computer Vision Library libopencv-dev
Andor SDK 2/3 N/A - request from Andor website
© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact