forked from imagej/ImageJA
-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile-js-dev.sh
55 lines (44 loc) · 2.38 KB
/
compile-js-dev.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
47
48
49
50
51
52
53
54
55
# This script compiles imagej into image.js
# It requires CHEERPJ_DIR and IJ_DIR
set -e
IJ_JAR="ij-1.53m.jar"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mvn clean
mvn install:install-file -Dfile=${CHEERPJ_DIR}/cheerpj-dom.jar -DgroupId=com.learningtech -DartifactId=cheerpj-dom -Dversion=1.0 -Dpackaging=jar
mvn package
cp target/${IJ_JAR} ${IJ_DIR}/
cd ${IJ_DIR}
${CHEERPJ_DIR}/cheerpjfy.py -j 4 ${IJ_JAR}
cp ${CHEERPJ_DIR}/cheerpj-dom.jar ${IJ_DIR}/cheerpj-dom-1.0.jar
${CHEERPJ_DIR}/cheerpjfy.py -j 4 ${IJ_DIR}/cheerpj-dom-1.0.jar
# download and compile MorphoLibJ
curl https://github.com/ijpb/MorphoLibJ/releases/download/v1.4.2.1/MorphoLibJ_-1.4.2.1.jar -LO
mv MorphoLibJ_-1.4.2.1.jar plugins/MorphoLibJ_-1.4.2.1.jar
${CHEERPJ_DIR}/cheerpjfy.py -j 4 --deps=${IJ_JAR} plugins/MorphoLibJ_-1.4.2.1.jar
# extract plugins.config
jar xf plugins/MorphoLibJ_-1.4.2.1.jar plugins.config
mv plugins.config plugins/MorphoLibJ_-1.4.2.1.jar.config
# download and compile Thunder_STORM
curl https://github.com/zitmen/thunderstorm/releases/download/v1.3/Thunder_STORM.jar -LO
mv Thunder_STORM.jar plugins/Thunder_STORM.jar
${CHEERPJ_DIR}/cheerpjfy.py -j 4 --deps=${IJ_JAR} plugins/Thunder_STORM.jar
# extract plugins.config
jar xf plugins/Thunder_STORM.jar plugins.config
mv plugins.config plugins/Thunder_STORM.jar.config
# download and compile deepimagej.js
curl https://github.com/deepimagej/deepimagej.js/releases/download/v2.0.1/DeepImageJ_JS_-2.0.1-SNAPSHOT.jar -LO
mv DeepImageJ_JS_-2.0.1-SNAPSHOT.jar plugins/DeepImageJ_JS_-2.0.1-SNAPSHOT.jar
${CHEERPJ_DIR}/cheerpjfy.py -j 4 --deps=${IJ_JAR} plugins/DeepImageJ_JS_-2.0.1-SNAPSHOT.jar
# extract plugins.config
jar xf plugins/DeepImageJ_JS_-2.0.1-SNAPSHOT.jar plugins.config
mv plugins.config plugins/DeepImageJ_JS_-2.0.1-SNAPSHOT.jar.config
# compile action bar
curl https://sites.imagej.net/Mutterer/plugins/action_bar.jar-20210614214121 -LO
mv action_bar.jar-20210614214121 plugins/action_bar20210614214121.jar
${CHEERPJ_DIR}/cheerpjfy.py -j 4 --deps=${IJ_JAR} --pack-jar=plugins/action_bar20210614214121-packed.jar plugins/action_bar20210614214121.jar
# extract plugins.config
jar xf plugins/action_bar20210614214121.jar plugins.config
mv plugins.config plugins/action_bar20210614214121.jar.config
rm plugins/action_bar20210614214121.jar
mv plugins/action_bar20210614214121-packed.jar plugins/action_bar20210614214121.jar
# python ${DIR}/build-plugins.py