-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
executable file
·159 lines (144 loc) · 6.93 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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- TODO build dependant libaries from source -->
<project default="all" name="Create Runnable Jar for Project JayCorp with libraries in sub-folder">
<property name="dir.workspace" value="."/>
<property name="rsc.javac" value="/usr/bin/ecj" />
<!-- The following property defines where to install the software -->
<property name="installprefix" value="/usr/bin" />
<property name="logdirprefix" value="/var/log" />
<property name="dbdirprefix" value="/var/jc" />
<property name="dir.buildfile" value="."/>
<property name="dir.export" value="${dir.workspace}/exports"/>
<property name="dir.binjc" value="${dir.export}/bin/JayCorp" />
<property name="dir.binjdp" value="${dir.export}/bin/libjdp" />
<property name="dir.binse" value="${dir.export}/bin/Server" />
<property name="dir.jcjarfile" value="${dir.export}/JayCorp"/>
<property name="dir.sejarfile" value="${dir.export}/Server"/>
<property name="dir.installers" value="${dir.export}/Installers"/>
<path id="build.clpjc">
<fileset dir="${dir.buildfile}/JayCorp/lib">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${dir.jcjarfile}/JayCorp_lib">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="build.clpse">
<fileset dir="${dir.buildfile}/Server/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${dir.export}" />
</target>
<target name="make_build_dir">
<mkdir dir="${dir.export}" />
<mkdir dir="${dir.export}/bin" />
<mkdir dir="${dir.binjc}" />
<mkdir dir="${dir.binjdp}" />
<mkdir dir="${dir.binse}" />
<mkdir dir="${dir.jcjarfile}" />
<mkdir dir="${dir.sejarfile}" />
<mkdir dir="${dir.installers}" />
<mkdir dir="${dir.jcjarfile}/JayCorp_lib"/>
<mkdir dir="${dir.jcjarfile}/Lang"/>
</target>
<target name="all" depends="create_jc_jar,create_se_jar">
</target>
<target name="compilejdplib" depends="make_build_dir">
<javac srcdir="${dir.buildfile}/JayCorp/JDatePicker-master/src/main/java"
destdir="${dir.binjdp}"
classpathref="build.clpjc"
optimize="on"
fork="yes"
includeAntRuntime="no"
encoding="UTF-8"
includeJavaRuntime="yes" />
<jar destfile="${dir.jcjarfile}/JayCorp_lib/libjdp.jar">
<fileset dir="${dir.binjdp}"/>
</jar>
</target>
<!-- All targets for the client side -->
<target name="compile_jc" depends="make_build_dir,compilejdplib">
<echo message="Compiling with date picker support"/>
<javac srcdir="${dir.buildfile}/JayCorp/src"
destdir="${dir.binjc}"
classpathref="build.clpjc"
optimize="on"
fork="yes"
includeAntRuntime="no"
encoding="UTF-8"
includeJavaRuntime="yes" />
<copy file="${dir.buildfile}/JayCorp/src/org/technikradio/jay_corp/ui/settings.properties"
todir="${dir.binjc}/org/technikradio/jay_corp/ui"/>
<copy file="${dir.buildfile}/JayCorp/src/org/technikradio/jay_corp/ui/strings.properties"
todir="${dir.binjc}/org/technikradio/jay_corp/ui"/>
</target>
<target name="create_jc_jar" depends="compile_jc">
<jar destfile="${dir.jcjarfile}/JayCorp.jar">
<manifest>
<attribute name="Main-Class" value="org.technikradio.jay_corp.JayCorp"/>
<attribute name="Class-Path" value=". JayCorp_lib/Utils.jar JayCorp_lib/User.jar"/>
</manifest>
<fileset dir="${dir.binjc}"/>
</jar>
<copy file="${dir.buildfile}/README.md" todir="${dir.jcjarfile}" />
<copy file="${dir.buildfile}/LICENSE.md" todir="${dir.jcjarfile}" />
<copy file="${dir.buildfile}/JayCorp/lib/Utils.jar" todir="${dir.jcjarfile}/JayCorp_lib"/>
<copy file="${dir.buildfile}/JayCorp/lib/User.jar" todir="${dir.jcjarfile}/JayCorp_lib"/>
<copy file="${dir.buildfile}/buildtools/JayCorp.exe" todir="${dir.jcjarfile}"/>
<copy file="${dir.buildfile}/JayCorp/src/org/technikradio/jay_corp/ui/settings.properties" todir="${dir.jcjarfile}"/>
<copy file="${dir.buildfile}/JayCorp/src/org/technikradio/jay_corp/ui/strings.properties" tofile="${dir.jcjarfile}/Lang/de_DE.lang"/>
<copy file="${dir.buildfile}/JayCorp/extra/LANG/en_US.lang" todir="${dir.jcjarfile}/Lang" />
</target>
<!-- All targets for the server side -->
<target name="compile_se" depends="make_build_dir">
<javac srcdir="${dir.buildfile}/Server/src"
destdir="${dir.binse}"
classpathref="build.clpse"
optimize="on"
fork="yes"
includeAntRuntime="no"
encoding="UTF-8"
includeJavaRuntime="yes" />
<copy file="${dir.buildfile}/Server/src/org/technikradio/JayCorp/server/settings.properties"
todir="${dir.binse}/org/technikradio/JayCorp/server" />
</target>
<target name="create_se_jar" depends="compile_se">
<jar destfile="${dir.sejarfile}/Server.jar">
<manifest>
<attribute name="Main-Class" value="org.technikradio.JayCorp.server.Server"/>
<attribute name="Class-Path" value=". Server_lib/Utils.jar"/>
</manifest>
<fileset dir="${dir.binse}"/>
</jar>
<!-- <delete dir="${dir.sejarfile}/Server_lib"/> -->
<mkdir dir="${dir.sejarfile}/Server_lib"/>
<copy file="${dir.buildfile}/README.md" todir="${dir.sejarfile}" />
<copy file="${dir.buildfile}/LICENSE.md" todir="${dir.sejarfile}" />
<copy file="${dir.buildfile}/buildtools/start-server.bash" todir="${dir.sejarfile}" />
<copy file="${dir.buildfile}/buildtools/setup-server.sh" todir="${dir.sejarfile}" />
<chmod file="${dir.sejarfile}/start-server.bash" perm="ugo+rx" />
<chmod file="${dir.sejarfile}/setup-server.sh" perm="ugo+rx" />
<copy file="${dir.buildfile}/Server/lib/Utils.jar" todir="${dir.sejarfile}/Server_lib"/>
<copy file="${dir.buildfile}/Server/src/org/technikradio/JayCorp/server/settings.properties" todir="${dir.sejarfile}"/>
</target>
<!-- All targets related to installers, packages, tests and checksums -->
<target name="installers" depends="all">
<zip destfile="${dir.installers}/JayCorp.zip" basedir="${dir.jcjarfile}"/>
<zip destfile="${dir.installers}/Server.zip" basedir="${dir.sejarfile}"/>
</target>
<target name="install_all" depends="install_client,install_server"/>
<target name="install_client" depends="create_jc_jar">
<copy todir="${installprefix}/jclient">
<fileset dir="${dir.jcjarfile}" includes="**"/>
</copy>
</target>
<target name="install_server" depends="create_se_jar">
<copy todir="${installprefix}/jcserver">
<fileset dir="${dir.sejarfile}" includes="**"/>
</copy>
<mkdir dir="${logdirprefix}/jcserver" />
<mkdir dir="${dbdirprefix}" />
</target>
</project>