blob: 884478e9f497d0e17b8f8ce3e5beb17c6564817c (
plain)
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
9 févr. 08 15:00:15
project: Xlogo
description: Logo Programming Interpreter
Le Coq Loïc
====================================================================== -->
<project name="XLogo4Schools" default="deploy">
<description>
XLogo4Schools: Logo Interpreter and Programming Environment
</description>
<!-- Build Properties -->
<!-- Property signJar =============
Does the Jar has to be signed ?
================================-->
<property name="signJar" value="true" />
<!-- Property platform:
================================================
* "all": Builds a crossPlatform Jar
* "linux": Builds a Linux specific Jar
* "windows": Builds a Windows specific Jar
* "solaris": Builds a Solaris specific Jar
Note: The built file is always valid for Mac
===============================================-->
<property name="platform" value="all" />
<!-- Build source tarball -->
<property name="buildSrc" value="true"/>
<!-- Version for this Build -->
<property name="version" value="0.9.06beta-2015-02-27"/>
<echo message="Using Java version ${ant.java.version}."/>
<!-- =================================
default target: deploy
================================= -->
<target name="deploy" depends="create.jar">
<condition property="sign.jar">
<equals arg1="true" arg2="${signJar}"/>
</condition>
<antcall target="sign.xlogo4schools">
</antcall>
<condition property="build.source.tarball">
<equals arg1="true" arg2="${buildSrc}" />
</condition>
<antcall target="create.src.tarball">
</antcall>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: depends
- - - - - - - - - - - - - - - - - -->
<!-- Creates the source tarball -->
<target name="create.src.tarball" if="build.source.tarball">
<mkdir dir="deploy/XLogo4Schools-${version}"/>
<copy todir="deploy/XLogo4Schools-${version}">
<fileset dir="." >
<include name="src/**"/>
<include name="windows/**"/>
<include name="linux/**"/>
<include name="solaris/**"/>
<include name="jh.jar"/>
<include name="j3dcore.jar"/>
<include name="vecmath.jar"/>
<include name="j3dutils.jar"/>
<include name="jl1.0.1.jar"/>
<include name="log4j-api-2.1.jar"/>
<include name="log4j-core-2.1.jar"/>
<include name="org.json-20131017.jar"/>
<include name="manifest_xlogo"/>
<include name="manifest_start"/>
<include name="build.xml"/>
<include name="README"/>
</fileset>
</copy>
<tar destfile="deploy/XLogo4Schools-${version}-source.tar.bz2" compression="bzip2">
<fileset dir="deploy/">
<include name="XLogo4Schools-${version}/**"/>
</fileset>
</tar>
<delete dir="deploy/XLogo4Schools-${version}"/>
</target>
<!-- Sign the XLogo (Java Web Start) -->
<target name="sign.xlogo4schools" if="sign.jar">
<input
message="Password"
addproperty="pwd"/>
<signjar keystore=".keystore" storepass="${pwd}" alias="xlogo4schools">
<fileset dir="deploy">
<include name="XLogo4Schools.jar"/>
</fileset>
</signjar>
</target>
<target name="create.jar" depends="compile">
<!-- Create tmp-xlogo.jar -->
<jar destfile="deploy/tmp_xlogo.jar"
manifest="manifest_xlogo">
<fileset dir="deploy/">
<include name="net/**"/>
<include name="xlogo/**"/>
<include name="*.properties"/>
<include name="*.xml"/>
</fileset>
</jar>
<!-- Delete Used files -->
<delete includeemptydirs="true">
<fileset dir="deploy/">
<include name="net/**"/>
<include name="xlogo/**"/>
<include name="*.properties"/>
<include name="*.xml"/>
</fileset>
</delete>
<!-- Create xlogo.jar -->
<jar destfile="deploy/XLogo4Schools.jar"
manifest="manifest_start">
<fileset dir="deploy/">
<include name="**"/>
</fileset>
</jar>
<!-- Delete Used files -->
<delete includeemptydirs="true">
<fileset dir="deploy/">
<exclude name="XLogo4Schools.jar"/>
<include name="**"/>
</fileset>
</delete>
</target>
<!-- Compile all Files -->
<target name="compile" depends="copy.static.files">
<!-- <echo> ${ant.java.version}</echo> -->
<javac
source="1.6" encoding="utf8"
target="1.6"
srcdir="src" destdir="deploy/"
includeantruntime="false">
<classpath>
<pathelement location="vecmath.jar"/>
<pathelement location="j3dcore.jar"/>
<pathelement location="j3dutils.jar"/>
<pathelement location="jh.jar"/>
<pathelement location="jl1.0.1.jar"/>
<pathelement location="log4j-api-2.1.jar"/>
<pathelement location="log4j-core-2.1.jar"/>
<pathelement location="org.json-20131017.jar"/>
</classpath>
</javac>
</target>
<!-- Copy all non binaries files (images, properties files...
into the folder "deploy" -->
<target name="copy.static.files" depends="create.deploy">
<copy todir="deploy/">
<fileset dir=".">
<include name="vecmath.jar"/>
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="jl1.0.1.jar"/>
<include name="jh.jar"/>
<include name="log4j-api-2.1.jar"/>
<include name="log4j-core-2.1.jar"/>
<include name="org.json-20131017.jar"/>
</fileset>
<fileset dir="src/">
<include name="**.properties"/>
<include name="**/*.png"/>
<include name="**/*.html"/>
<include name="**/*.xml"/>
<include name="**/genericPrimitive"/>
</fileset>
</copy>
<!-- Copy Specific OS libraries -->
<condition property="platform.solaris">
<or>
<equals arg1="${platform}" arg2="all"/>
<equals arg1="${platform}" arg2="solaris"/>
</or>
</condition>
<antcall target="copy.solaris">
</antcall>
<condition property="platform.linux">
<or>
<equals arg1="${platform}" arg2="all"/>
<equals arg1="${platform}" arg2="linux"/>
</or>
</condition>
<antcall target="copy.linux">
</antcall>
<condition property="platform.windows">
<or>
<equals arg1="${platform}" arg2="all"/>
<equals arg1="${platform}" arg2="windows"/>
</or>
</condition>
<antcall target="copy.windows">
</antcall>
</target>
<!-- Copy Solaris specific JAVA3D driver into "deploy" -->
<target name="copy.solaris" if="platform.solaris">
<copy todir="deploy/">
<fileset dir=".">
<include name="solaris/**"/>
</fileset>
</copy>
</target>
<!-- Copy Linux specific JAVA3D driver into "deploy" -->
<target name="copy.linux" if="platform.linux">
<copy todir="deploy/">
<fileset dir=".">
<include name="linux/**"/>
</fileset>
</copy>
</target>
<!-- Copy Windows specific JAVA3D driver into "deploy" -->
<target name="copy.windows" if="platform.windows">
<copy todir="deploy/">
<fileset dir=".">
<include name="windows/**"/>
</fileset>
</copy>
</target>
<!-- Create the folder "deploy", delete if exists -->
<target name="create.deploy">
<condition property="delete.deploy">
<available file="deploy" type="dir"/>
</condition>
<antcall target="clean-deploy">
</antcall>
<mkdir dir="deploy"/>
</target>
<!-- Delete the directory "deploy" if exists -->
<target name="clean-deploy" if="delete.deploy">
<delete includeemptydirs="true">
<fileset dir=".">
<include name="deploy/**"/>
</fileset>
</delete>
</target>
</project>
|