-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-mm.sh
executable file
·46 lines (33 loc) · 1.16 KB
/
build-mm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env sh
set -e
# Script used to build MM from source
# Dependencies (ubuntu / debian)
# sudo apt-get install subversion build-essential autoconf automake libtool pkg-config libboost1.54-all-dev zlib1g-dev swig openjdk-7-jdk ant python-dev python-numpy-dev
CURR_DIR=$(pwd)
if [ ! -f "ij150.zip" ]; then
echo "Please download ij150.zip with wget wsr.imagej.net/distros/cross-platform/ij150.zip"
exit 1
fi
rm -fr ImageJ/
if [ ! -d "ImageJ" ]; then
unzip ij*.zip
fi
if [ ! -f "ImageJ/MMConfig_demo.cfg" ]; then
wget https://raw.githubusercontent.com/micro-manager/micro-manager/master/bindist/any-platform/MMConfig_demo.cfg -O ImageJ/MMConfig_demo.cfg
fi
if [ ! -d "micro-manager" ]; then
git clone https://github.com/micro-manager/micro-manager.git
fi
cd micro-manager/
GIT_HASH=$(git rev-parse --short HEAD)
# Build MM
./autogen.sh
CC=gcc CXX=g++ ./configure --enable-imagej-plugin=$CURR_DIR/ImageJ --with-ij-jar=$CURR_DIR/ImageJ/ij.jar JAVA_HOME=/usr/lib/jvm/default-java/
make fetchdeps
make
make install
cd ../
# Generate zip bundle
mkdir -p bundles/
BUNDLE_NAME="$(date +"%Y.%m.%d.%H.%M").MicroManager-$GIT_HASH.zip"
zip -r bundles/$BUNDLE_NAME ImageJ/