-
Notifications
You must be signed in to change notification settings - Fork 4
/
compile.sh
executable file
·40 lines (34 loc) · 1.23 KB
/
compile.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
#!/bin/sh
CP="lib/*:classes"
SP=src/java/
APPLICATION="Motive"
/bin/rm -f ${APPLICATION}.jar
/bin/rm -f ${APPLICATION}service.jar
/bin/rm -rf classes
/bin/mkdir -p classes/
/bin/rm -rf addons/classes
/bin/mkdir -p addons/classes/
echo "compiling nxt core..."
find src/java/nxt/ -name "*.java" > sources.tmp
javac -encoding utf8 -sourcepath "${SP}" -classpath "${CP}" -d classes/ @sources.tmp || exit 1
echo "nxt core class files compiled successfully"
echo "compiling nxt desktop..."
find src/java/nxtdesktop/ -name "*.java" > sources.tmp
javac -encoding utf8 -sourcepath "${SP}" -classpath "${CP}" -d classes/ @sources.tmp
if [ $? -eq 0 ]; then
echo "nxt desktop class files compiled successfully"
else
echo "if javafx is not supported, nxt desktop compile errors are safe to ignore, but desktop wallet will not be available"
fi
rm -f sources.tmp
find addons/src/ -name "*.java" > addons.tmp
if [ -s addons.tmp ]; then
echo "compiling add-ons..."
javac -encoding utf8 -sourcepath "${SP}:addons/src" -classpath "${CP}:addons/classes:addons/lib/*" -d addons/classes @addons.tmp || exit 1
echo "add-ons compiled successfully"
rm -f addons.tmp
else
echo "no add-ons to compile"
rm -f addons.tmp
fi
echo "compilation done"