-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcompile.sh
executable file
·67 lines (58 loc) · 2.12 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
PATHSEP=":"
if [ "$OSTYPE" = "cygwin" ] ; then
PATHSEP=";"
fi
CP="lib/*${PATHSEP}classes"
SP=src/java/
/bin/rm -f ardor.jar
/bin/rm -f ardorservice.jar
/bin/rm -rf classes
/bin/mkdir -p classes/
/bin/rm -rf addons/classes
/bin/mkdir -p addons/classes/
echo "compiling core..."
find src/java/nxt/ -name "*.java" > sources.tmp
javac -encoding utf8 -sourcepath "${SP}" -classpath "${CP}" -d classes/ @sources.tmp || exit 1
echo "core class files compiled successfully"
echo "compiling 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 "desktop class files compiled successfully"
else
echo "if javafx is not supported, 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}${PATHSEP}addons/src" -classpath "${CP}${PATHSEP}addons/classes${PATHSEP}addons/lib/*" -d addons/classes @addons.tmp || exit 1
echo "add-ons compiled successfully"
else
echo "no add-ons to compile"
fi
rm -f addons.tmp
find test/java/ -name "*.java" > tests.tmp
if [ -s tests.tmp ]; then
echo "compiling tests..."
/bin/rm -rf test/classes
/bin/mkdir -p test/classes/
javac -encoding utf8 -sourcepath "${SP}${PATHSEP}test/java" -classpath "${CP}${PATHSEP}addons/classes${PATHSEP}testlib/*" -d test/classes @tests.tmp || exit 1
echo "tests compiled successfully"
else
echo "no tests to compile"
fi
rm -f tests.tmp
find installer/panels/src -name "*.java" > panels.tmp
if [ -s panels.tmp ]; then
echo "compiling installer panels..."
/bin/rm -rf installer/panels/classes
/bin/mkdir -p installer/panels/classes/
javac -encoding utf8 -sourcepath "installer/panels/src" -classpath "${CP}${PATHSEP}installer/lib/*" -d installer/panels/classes @panels.tmp || exit 1
echo "installer panels compiled successfully"
else
echo "no installer panels to compile"
fi
rm -f panels.tmp
echo "compilation done"