-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
142 lines (124 loc) · 5.44 KB
/
build.xml
File metadata and controls
142 lines (124 loc) · 5.44 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<project name="NeercSoft" default="deploy" basedir=".">
<property name="src" location="src" />
<property name="bin" location="bin" />
<path id="classpath">
<fileset dir="." includes="*.jar" />
</path>
<path id="bin.path">
<pathelement location="bin/" />
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${bin}" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${bin}" classpathref="classpath" />
</target>
<target name="tests" depends="compile" description="run tests">
<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement location="bin/" />
<pathelement path="junit.jar" />
<pathelement path="smack.jar" />
<pathelement path="smackx.jar" />
</classpath>
<classpath refid="classpath"/>
<formatter type="plain" />
<formatter type="xml" />
<test name="ru.kt15.finomen.neerc.AllTests"/>
</junit>
</target>
<target name="timer_jar" depends="compile,tests" description="generate the timer distribution">
<jar jarfile="neerc-timer.jar" basedir="${bin}" includes="ru/kt15/finomen/neerc/timer/**">
<manifest>
<attribute name="Main-Class" value="ru.kt15.finomen.neerc.timer.TimerWindow"/>
<attribute name="Class-Path" value="swt.jar snakeyaml-1.11.jar neerc-core.jar pcms2-client.jar"/>
</manifest>
</jar>
</target>
<target name="core_jar" depends="compile,tests" description="generate the core distribution">
<jar jarfile="neerc-core.jar" basedir="${bin}" includes="ru/kt15/finomen/neerc/core/**" excludes="*/tests/*">
</jar>
</target>
<target name="hall_jar" depends="compile,tests" description="generate the hall core distribution">
<jar jarfile="neerc-hall.jar">
<fileset dir="${bin}" >
<include name="ru/kt15/finomen/neerc/hall/**"/>
<exclude name="ru/kt15/finomen/neerc/hall/tests/*" />
<exclude name="ru/kt15/finomen/neerc/hall/desktop/*" />
</fileset>
<manifest>
<attribute name="Class-Path" value="swt.jar snakeyaml-1.11.jar neerc-core.jar smack.jar smackx.jar"/>
</manifest>
</jar>
</target>
<target name="hall_desktop_jar" depends="compile,tests" description="generate the hall distribution">
<jar jarfile="neerc-hall-desktop.jar" basedir="${bin}" includes="ru/kt15/finomen/neerc/hall/desktop/**" excludes="*/tests/*">
<manifest>
<attribute name="Main-Class" value="ru.kt15.finomen.neerc.hall.desktop.MainWindow"/>
<attribute name="Class-Path" value="swt.jar swing2swt.jar snakeyaml-1.11.jar neerc-core.jar neerc-hall.jar smack.jar smackx.jar"/>
</manifest>
</jar>
</target>
<target name="jars" depends="core_jar,timer_jar,hall_jar,hall_desktop_jar" description="Make all jars">
</target>
<target name="deploy" depends="jars">
<mkdir dir="dist-win"/>
<mkdir dir="dist-linux_x64"/>
<mkdir dir="dist-win/locale"/>
<mkdir dir="dist-linux_x64/locale"/>
<mkdir dir="dist-win/timer"/>
<mkdir dir="dist-linux_x64/timer"/>
<copy file="neerc-hall.jar" todir="dist-win"/>
<copy file="neerc-hall-desktop.jar" todir="dist-linux_x64"/>
<copy file="neerc-hall-desktop.jar" todir="dist-win"/>
<copy file="neerc-hall.jar" todir="dist-linux_x64"/>
<copy file="neerc-timer.jar" todir="dist-win"/>
<copy file="neerc-timer.jar" todir="dist-linux_x64"/>
<copy file="neerc-core.jar" todir="dist-win"/>
<copy file="neerc-core.jar" todir="dist-linux_x64"/>
<copy file="snakeyaml-1.11.jar" todir="dist-win"/>
<copy file="snakeyaml-1.11.jar" todir="dist-linux_x64"/>
<copy file="smack.jar" todir="dist-win"/>
<copy file="smack.jar" todir="dist-linux_x64"/>
<copy file="smackx.jar" todir="dist-win"/>
<copy file="smackx.jar" todir="dist-linux_x64"/>
<copy file="settings.yaml" todir="dist-win"/>
<copy file="settings.yaml" todir="dist-linux_x64"/>
<copy file="swing2swt.jar" todir="dist-win"/>
<copy file="swing2swt.jar" todir="dist-linux_x64"/>
<copy file="swt-win.jar" tofile="dist-win/swt.jar"/>
<copy file="swt-linux-x64.jar" tofile="dist-linux_x64/swt.jar"/>
<copy file="locale/ruRU.loc" todir="dist-win/locale/"/>
<copy file="locale/ruRU.loc" todir="dist-linux_x64/locale/"/>
<copy file="locale/enGB.loc" todir="dist-win/locale/"/>
<copy file="locale/enGB.loc" todir="dist-linux_x64/locale/"/>
<copy file="timer/config.yaml" todir="dist-win/timer/"/>
<copy file="timer/config.yaml" todir="dist-linux_x64/timer/"/>
<copy file="timer/colors.yaml" todir="dist-win/timer/"/>
<copy file="timer/colors.yaml" todir="dist-linux_x64/timer/"/>
<copy todir="dist-win/resources">
<fileset dir="resources"/>
</copy>
<copy todir="dist-linux_x64/resources">
<fileset dir="resources"/>
</copy>
<zip destfile="neerc-hall-windows.zip">
<fileset dir="dist-win"/>
</zip>
<zip destfile="neerc-hall-linux_x64.zip">
<fileset dir="dist-linux_x64"/>
</zip>
</target>
<target name="clean" description="clean up">
<delete dir="${bin}" />
<delete file="neerc-timer.jar"/>
<delete file="neerc-core.jar"/>
<delete file="neerc-hall.jar"/>
<delete file="TEST-ru.kt15.finomen.neerc.AllTests.txt"/>
<delete file="TEST-ru.kt15.finomen.neerc.AllTests.xml"/>
</target>
</project>