top bar

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

(Steps)
(General remarks (Ubuntu))
Line 1: Line 1:
 
== General remarks (Ubuntu)==
 
== General remarks (Ubuntu)==
  
We assume installation of ImageJ in "/usr/local/ImageJ". In addition to ImageJ and Micro-Manager, you need the following programmes:
+
We assume installation of ImageJ in "/usr/local/ImageJ". If you have installed ImageJ using apt, replace this location with "/usr/share/imagej" wherever it appears below.  In addition to ImageJ and Micro-Manager, you need the following programmes:
  
 
* svn for obtaining the repository
 
* svn for obtaining the repository

Revision as of 09:39, 27 May 2010

General remarks (Ubuntu)

We assume installation of ImageJ in "/usr/local/ImageJ". If you have installed ImageJ using apt, replace this location with "/usr/share/imagej" wherever it appears below. In addition to ImageJ and Micro-Manager, you need the following programmes:

  • svn for obtaining the repository
  • sun-java6-sdk or better/equivalent
  • autoconf
  • automake
  • swig
  • boost
  • g++
  • libtool
  • libboost 1.2 or newer

In addition, note that:

  • File versions might have changed, check before using the names given in the instructions.
  • Some operations have to be performed as "superuser" ("sudo …").
  • Permissions of the new ImageJ directory might have to be set properly.

General remarks (Gentoo)

The ImagaJ ebuild can be downloaded from http://bugs.gentoo.org/112275. Digest and install the ebuild (see http://linuxreviews.org/gentoo/ebuilds/).

Steps

1. Installing ImageJ

Get the Linux version of ImageJ from http://rsb.info.nih.gov/ij/download.html, move it to "/usr/local" and unpack it as described in http://rsb.info.nih.gov/ij/docs/install/linux.html. You will have a directory "/usr/local/ImageJ" with everything needed to run ImageJ (you can start ImageJ from the terminal: "cd /usr/local/ImageJ", followed by "./run").

2. Get Micro-Manager from the repository

Make a directory somewhere (e.g. "~/src"), move to it ("cd ~/src") and get Micro-Manager with the command "svn checkout https://valelab.ucsf.edu/svn/micromanager2/branches/micromanager1.3". This will download all the necessary files from the repository into "~/src/micromanager1.3/".

3. Beanshell and swingx

Move to the new directory ("cd micromanager1.3") and copy beanshell and swingx from "~/src/micromanager1.3/classext" to the "plugins" directory of your ImageJ installation: "sudo cp classext/bsh-2.0b4.jar /usr/local/ImageJ/plugins" and "sudo cp classext/swingx-0.9.5.jar /usr/local/ImageJ/plugins".

4. Create a new micro-manager directory in /usr/lib

"sudo mkdir /usr/lib/micro-manager"

5. mmUnixBuild.sh

From within "~/src/micromanager1.3", type "./mmUnixBuild.sh".

6. Run configure

"./configure --with-imagej=/usr/local/ImageJ". You have to add the option (--with-imagej), because the default assumes a different localisation of ImageJ.

7. Run make

"sudo make"

8. Install as superuser

"sudo make install"

9. Run ldconfig

"sudo ldconfig"

10. The starting script

Starting ImageJ with the scripts provided in the ImageJ directory (run, script, see 1 above) will start ImageJ, but Micro-Manager, although now in the plugins directory, will not work properly because the path to /usr/lib/micro-manager is missing. Write your own script containing the 4 lines given below ("mmscript"), save and move it to /usr/local/ImageJ. Make it executable with "sudo chmod +x mmscript".

11. Running Micro-Manager

cd to "/usr/local/ImageJ" and start ImageJ with your new script ("./mmscript &"). In the plugins menu of ImageJ, start Micro-Manager –> Micro-Manager Studio.

mmscript:

#!/bin/bash
cd /usr/local/ImageJ
export LD_LIBRARY_PATH=.:/usr/local/lib:/usr/lib/micro-manager:/usr/local/ImageJ
java -mx1200m -Djava.library.path=/usr/lib/micro-manager:/usr/local/ImageJ -Dplugins.dir=/usr/local/ImageJ -cp /usr/local/ImageJ/ij.jar:usr/local/jdk1.5.0_04/lib/tools.jar ij.ImageJ

script for Gentoo

Edit '/usr/bin/imagej' according to this:

#!/bin/bash

export LD_LIBRARY_PATH=.:/usr/lib/micro-manager
IJ_LIB=/usr/share/imagej/lib

if !([ "${IJ_HOME}" ]) ; then
	IJ_HOME=${HOME}
fi
if [ -d ${IJ_HOME}/plugins ] ; then
	IJ_PLG=${IJ_HOME}
else
	IJ_PLG=/usr/share/imagej/lib
fi
if !([ "$IJ_MEM" ]) ; then
	IJ_MEM=128
fi
if !([ "$IJ_CP" ]) ; then
	IJ_CP=$(java-config -p imagej):$(java-config -O)/lib/tools.jar
else
	IJ_CP=$(java-config -p imagej):$(java-config -O)/lib/tools.jar:${IJ_CP}
fi
$(java-config --java) \
	-Xmx${IJ_MEM}m -Dswing.aatext=true \
	-Dawt.useSystemAAFontSettings=on\
	-cp ${IJ_CP} \
	-Duser.home=${IJ_HOME} \
	-Dplugins.dir=${IJ_PLG} \
	-Djava.library.path=/usr/lib/micro-manager \
	ij.ImageJ "$@"

You could run the Micro-Manager in one go by issuing:

 imagej -run "Micro-Manager Studio"
© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact