top bar

Difference between revisions of "How To Build Micro Manager From Source On Ubuntu 13.10"

 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Note|This page has been updated to reflect the build system changes of r13120 and r13223, but the updated script has not been tested. Ask on the mailing list if you run into issues.}}
 +
 
Here is a small script I use to build MM on Linux to be able to test new features and develop plugins with DemoAdaptaters. I can provide help to adapt build system to your Linux. Contact me on the MM mailing list: https://micro-manager.org/wiki/Micro-Manager_Community.
 
Here is a small script I use to build MM on Linux to be able to test new features and develop plugins with DemoAdaptaters. I can provide help to adapt build system to your Linux. Contact me on the MM mailing list: https://micro-manager.org/wiki/Micro-Manager_Community.
  
Line 4: Line 6:
  
 
# Instal dependencies
 
# Instal dependencies
Here you have debian packages you can install with sudo apt-get install
+
# Here you have debian packages you can install with sudo apt-get install
Find equivalent packages for others distributions:
+
# Find equivalent packages for others distributions:
subversion build-essential automake libtool \
+
#
libboost1.54-all-dev zlib1g-dev swig \
+
# subversion build-essential \
openjdk-7-jdk python-all-dev
+
# autoconf automake libtool pkg-config \
 +
# libboost1.54-all-dev zlib1g-dev swig \
 +
# openjdk-7-jdk ant python-dev python-numpy-dev
  
 
mkdir mm/
 
mkdir mm/
Line 17: Line 21:
  
 
# Get ImageJ (use it even if you already have another copy of ImageJ or Fiji)
 
# Get ImageJ (use it even if you already have another copy of ImageJ or Fiji)
wget http://rsb.info.nih.gov/ij/download/linux/ij147-linux64.zip
+
wget http://imagej.nih.gov/ij/download/zips/ij148.zip
unzip ij147-linux64.zip
+
unzip ij148.zip
  
 
# Retrieve MM source code (can be long)
 
# Retrieve MM source code (can be long)
svn co https://valelab.ucsf.edu/svn/micromanager2/trunk/](https://valelab.ucsf.edu/svn/micromanager2/trunk/ micro-manager1.4
+
svn co https://valelab.ucsf.edu/svn/micromanager2/trunk micro-manager
svn co https://valelab.ucsf.edu/svn/3rdpartypublic/](https://valelab.ucsf.edu/svn/3rdpartypublic/
+
svn co https://valelab.ucsf.edu/svn/3rdpartypublic
  
 
# Build MM
 
# Build MM
 
cd micro-manager/
 
cd micro-manager/
  
# Need to be run two time
+
./autogen.sh
./mmUnixBuild.sh ; ./mmUnixBuild.sh
+
  
./configure --prefix=$MM_DIR/ImageJ --with-imagej=$MM_DIR/ImageJ --enable-python
+
./configure --prefix=$MM_DIR/ImageJ --enable-imagej-plugin=$MM_DIR/ImageJ --with-python
 +
 
 +
# Download build dependencies
 +
make fetchdeps  # Required since SVN r14001-r14016
  
 
# Build binaries (can take a while)
 
# Build binaries (can take a while)
 
make
 
make
  
# Install MM libs
+
# Install MM as ImageJ plugin
 
make install
 
make install
  
# Post install stuff
+
# Run MM
cp bindist/any-platform/MMConfig_demo.cfg $MM_DIR/ImageJ
+
# $MM_DIR/mmimagej
echo 'macro "AutoRun" {
+
  run("Micro-Manager Studio");
+
}' >> $MM_DIR/ImageJ/macros/StartupMacros.txt
+
 
+
# Write start MM script
+
cd $MM_DIR/ImageJ
+
 
+
# Create mmscript.sh
+
echo '#!/bin/sh
+
 
+
IJ_PATH=$(pwd)
+
IJ_LIB=$IJ_PATH/lib/micro-manager
+
TOOLS_JAR_PATH=$(find /usr -name tools.jar)
+
 
+
export LD_LIBRARY_PATH=.:$IJ_LIB:$LD_LIBRARY_PATH
+
export CLASSPATH=$IJ_PATH/plugins/Micro-Manager
+
 
+
java -mx4000m \
+
    -Djava.library.path=$IJ_LIB \
+
    -Dplugins.dir=$IJ_PATH \
+
    -cp ij.jar:$TOOLS_JAR_PATH \
+
    ij.ImageJ
+
' > mmscript.sh
+
 
+
chmod +x mmscript.sh
+
 
+
# Run MM from ImageJ folder
+
# ./mmscript.sh
+
 
</pre>}}
 
</pre>}}

Latest revision as of 10:01, 1 August 2014

Note
This page has been updated to reflect the build system changes of r13120 and r13223, but the updated script has not been tested. Ask on the mailing list if you run into issues.

Here is a small script I use to build MM on Linux to be able to test new features and develop plugins with DemoAdaptaters. I can provide help to adapt build system to your Linux. Contact me on the MM mailing list: https://micro-manager.org/wiki/Micro-Manager_Community.

Command Line

# Instal dependencies
# Here you have debian packages you can install with sudo apt-get install
# Find equivalent packages for others distributions:
#
# subversion build-essential \
# autoconf automake libtool pkg-config \
# libboost1.54-all-dev zlib1g-dev swig \
# openjdk-7-jdk ant python-dev python-numpy-dev

mkdir mm/
cd mm/

# Save directory path
MM_DIR=$(pwd)

# Get ImageJ (use it even if you already have another copy of ImageJ or Fiji)
wget http://imagej.nih.gov/ij/download/zips/ij148.zip
unzip ij148.zip

# Retrieve MM source code (can be long)
svn co https://valelab.ucsf.edu/svn/micromanager2/trunk micro-manager
svn co https://valelab.ucsf.edu/svn/3rdpartypublic

# Build MM
cd micro-manager/

./autogen.sh

./configure --prefix=$MM_DIR/ImageJ --enable-imagej-plugin=$MM_DIR/ImageJ --with-python

# Download build dependencies
make fetchdeps   # Required since SVN r14001-r14016

# Build binaries (can take a while)
make

# Install MM as ImageJ plugin
make install

# Run MM
# $MM_DIR/mmimagej
© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact