This repository has been archived by the owner on Jul 10, 2019. It is now read-only.
forked from ChesleyTan/java-vision-gui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
88 lines (76 loc) · 2.99 KB
/
build.xml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<project name="stuy-vision-2016" default="compile-and-run-tegra" basedir=".">
<!--
Before running for the first time, run the following (but
use two dashes):
$ sudo update-alternatives -config java
$ sudo update-alternatives -config javac
and choose Java 8
jfxrt.jar file came from <JRE_HOME>/lib/ext/jfxrt.jar on a
Windows machine
-->
<property name="srcdir" value="src" />
<property name="bindir" value="bin" />
<property name="opencv_home" value="lib/opencv-3.0.0" />
<property name="opencv_lib" value="${opencv_home}/build/lib" />
<property name="opencv" value="${opencv_home}/build/bin/opencv-300.jar" />
<property name="javafx" value="/usr/lib/jvm/jfxrt.jar" />
<property name="junit" value="lib/junit.jar" />
<property name="jssc" value="lib/jssc-2.8.0.jar" />
<property name="camera" value="0" /> <!-- -Dcamera=X corresponds to /dev/videoX -->
<path id="jars">
<pathelement path="${opencv}" />
<pathelement path="${javafx}" />
<pathelement path="${junit}" />
<pathelement path="${bindir}" />
<pathelement path="${jssc}" />
</path>
<target name="compile-and-run-tegra" depends="compile, run-tegra" />
<target name="compile-and-run-gui" depends="compile, run-gui" />
<target name="run-tegra" depends="configure-camera">
<java classname="modules.StuyVisionModule"
classpathref="jars"
dir="${bindir}"
failonerror="true"
fork="true">
<!-- fork="true" ensures ant looks at working directory. Without
this, System.loadLibrary cannot find opencv in java.library.path -->
<sysproperty key="java.library.path" path="${opencv_lib}" />
</java>
</target>
<target name="run-gui" depends="configure-camera">
<java classname="gui.Main"
classpathref="jars"
dir="${bindir}"
failonerror="true"
fork="true">
<!-- fork="true" ensures ant looks at working directory. Without
this, System.loadLibrary cannot find opencv in java.library.path -->
<sysproperty key="java.library.path" path="${opencv_lib}" />
</java>
</target>
<target name="configure-camera">
<exec executable="/bin/bash">
<arg value="setup-camera.sh" />
<arg value="-d ${camera}" />
</exec>
</target>
<target name="compile" depends="init">
<javac srcdir="${srcdir}"
destdir="bin"
source="1.8"
target="1.8"
verbose="true"
classpathref="jars"
includeantruntime="false" />
<copy todir="${bindir}">
<fileset dir="${srcdir}">
<include name="**/*.fxml" />
<include name="**/*.css" />
</fileset>
</copy>
</target>
<target name="init">
<delete dir="bin" />
<mkdir dir="bin" />
</target>
</project>