This repository has been archived by the owner on Aug 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
release.xml
457 lines (399 loc) · 29.9 KB
/
release.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
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
<project name="weka-release" default="release_base_zip_no_junit" basedir=".">
<!--
===========================================================================
Ant build file for creating weka release distributions. Make sure that
last-release.props contains the date of the last release of this branch
of Weka (so that the changelog is correct).
Use ./weka/build.xml for tasks related to compiling weka and making the
core weka.jar executable jar file.
Type ant -projecthelp for targets and descriptions.
$Revision$
===========================================================================
-->
<!-- set global properties for this build -->
<property name="temp" value="temp"/>
<property name="weka" value="weka"/>
<property name="wekadocs" value="wekadocs"/>
<property name="wekaexamples" value="wekaexamples"/>
<property name="dist" value="dist"/>
<property name="os" value="osx"/>
<property name="makensis" value="makensis"/>
<property name="jvm-vendor" value="azul-zulu"/>
<property name="osx_jre_oracle" value="true"/>
<property environment="env" />
<!-- load the last release date -->
<property file="last-release.props"/>
<!-- define the latex task -->
<taskdef name="latex" classname="de.dokutransdata.antlatex.LaTeX"/>
<!-- Define the bundleapp task. Java Application Bundler (http://java.net/projects/appbundler) makes Mac OS application
bundles for Java 1.8 or higher. This requires Oracle Java 1.8 or
higher at build time too - uncomment this taskdef if building a Mac app for Java >=1.8. The modified appbundler from https://github.com/teras/appbundler is requird for
handling Java 1.9 and higher -->
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask"/>
<target name="init_all" depends="requirements_instructions">
<!-- Create the time stamp and various dirs -->
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm"/>
</tstamp>
<!-- Remove packages that have no test classes -->
<delete dir="packages/internal/WekaExcel"/>
<delete dir="packages/internal/WekaODF"/>
<!-- Something in the lib dir of scatterPlot3D makes the GOE barf when running the tests -->
<delete dir="packages/external/scatterPlot3D"/>
<mkdir dir="${temp}/weka-${release}"/>
<mkdir dir="${temp}/weka-${release}/changelogs"/>
<mkdir dir="${temp}/weka-${release}/data"/>
<mkdir dir="${temp}/weka-${release}/doc"/>
<mkdir dir="${dist}"/>
</target>
<target name="requirements_instructions">
<echo message="NOTE: THIS BUILD FILE IS FOR CREATING WEKA RELEASE DISTRIBUTIONS. USE THE build.xml IN ./weka FOR TASKS RELATED TO COMPILING WEKA."/>
<echo message="This build file should be run from a clean checkout (and not from a working copy). Furthermore, there should be no packages installed." />
<echo message="In order to make a complete set of release artifacts for Weka, this build script requires the following"/>
<echo message="1) Additional jars to be installed in Apache Ant's lib directory:"/>
<echo message="nsvnkit.jar"/>
<echo message="svnkit-cli.jar"/>
<echo message="ant_latex.jar (http://www.dokutransdata.de/ant_latex/)"/>
<!-- <echo message="jarbundler.jar (Mac app for Apple Java 1.6)"/> -->
<echo message="xercesImpl.jar"/>
<!-- <echo message="appbundler (Mac app for Oracle Java 1.8 or higher. https://github.com/teras/appbundler)"/> -->
<echo message=""/>
<echo message="2) To create windows installers the makensis utility from NSIS is needed. Under Linux (Ubuntu), this can be installed by typing sudo apt-get install nsis. For instructions on how to build this for Mac OS X run the nsis_osx_howto target"/>
<echo message="3) Building Mac application bundles now uses the jpackage tool that is included in later version of the JDK. The Mac application for x64 Macs must be built on an x64 Mac, and the arm version on an arm Mac (see project help for the associated targets)"/>
<!-- <echo message="3) Building Mac application bundles depends on the target JRE. For JRE 1.6, jarbundler is used. For Oracle JRE >= 1.8, jarbundler does not work and appbundler must be used. Appbundler *requires* Java >= 1.8, so the build script must run under >= 1.8 in this case."/>
<echo message="Under Mac OS X, hdiutil is used to create a compressed dmg file. Under Linux, genisoimage (already installed in Ubuntu) is used to first create a dmg and then libdmg (http://shanemcc.co.uk/libdmg/) is used to produce a compressed dmg file from the uncompressed one"/>
<echo message="LaTeX is required for building Weka's documentation. Additionally the wrapfig.sty style is needed if not already insalled"/> -->
</target>
<target name="nsis_osx_howto">
<echo message="The following is no longer relevant as the NSIS executable is available via macports and homebrew these days."/>
<echo message="To build makensis for OS X:"/>
<echo message="1) Download and install scons: http://www.scons.org/"/>
<echo message="2) Download pre-compiled (Windows) NSIS v2.46 (zip archive) from sourceforge and unzip somewhere"/>
<echo message="3) Check out NSIS 2.46 tag from subversion: https://nsis.svn.sourceforge.net/svnroot/nsis/NSIS/tags/v246"/>
<echo message="4) Execute the following from the root directory of the NSIS 2.46 checked out from subversion: scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=[path to pre-compiled nsis 2.46] install-compiler"/>
<echo message="5) OS X executable version of makensis will be placed in the pre-compiled nsis 2.46 root directory"/>
</target>
<target name="set_version">
<echo message="Setting version in weka/core/version.txt to ${release}"/>
<ant antfile="build.xml" dir="${weka}" target="set_version" inheritall="false">
<property name="release" value="${release}"/>
</ant>
</target>
<target name="run_tests_all" depends="clean, init_all">
<echo message="Running unit tests..."/>
<ant antfile="build.xml" dir="${weka}" target="run_tests_all" inheritall="false"/>
</target>
<target name="weka-exe" depends="init_all, set_version">
<echo message="Building weka.jar executable jar file..."/>
<ant antfile="build.xml" dir="${weka}" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="${weka}" target="exejar" inheritall="false"/>
</target>
<target name="remote-engine" depends="weka-exe">
<echo message="Building remote engine jar..."/>
<ant antfile="build.xml" dir="${weka}" target="remotejar" inheritall="false"/>
</target>
<target name="weka-examples" depends="weka-exe">
<echo message="Building weka examples..."/>
<ant antfile="build.xml" dir="${wekaexamples}" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="${wekaexamples}" inheritall="false">
<property name="java.class.path" value="../${weka}/build/classes"/>
</ant>
</target>
<target name="weka-src" depends="init_all">
<echo message="Building weka.jar src jar file..."/>
<ant antfile="build.xml" dir="${weka}" target="srcjar" inheritall="false"/>
</target>
<target name="javadocs" depends="weka-exe" description="Create the javadocs">
<echo message="Generating java docs for weka..."/>
<ant antfile="build.xml" dir="${weka}" target="docs" inheritall="false"/>
</target>
<!-- changelog will need -DstartDate property -->
<target name="changelog" depends="init_all" description="Create a changelog for Weka development-3-7. Creates a changelog with changes from the date in last-release-props to today">
<echo message="Creating a changelog for {${lastReleaseDate}}:{${TODAY}}"/>
<ant antfile="build.xml" dir="${weka}" target="changelog" inheritall="false">
<property name="date_range" value="{${lastReleaseDate}}:{${TODAY}}"/>
<property name="release" value="${release}"/>
<property name="weka_branch" value="branches/stable-3-8"/>
</ant>
</target>
<target name="packages_changelog" depends="init_all" description="Create a changelog for Weka development-3-7. Creates a changelog with changes from the date in last-release-props to today">
<echo message="Creating packages changelog for {${lastReleaseDate}}:{${TODAY}}"/>
<ant antfile="build.xml" dir="${weka}" target="packages_changelog" inheritall="false">
<property name="date_range" value="{${lastReleaseDate}}:{${TODAY}}"/>
<property name="release" value="${release}"/>
<property name="weka_branch" value="branches/stable-3-8"/>
</ant>
</target>
<target name="manual" depends="init_all" description="Make the WekaManual.">
<latex
verbose="on"
clean="on"
pdftex="off"
workingDir="${wekadocs}/manual"
>
<fileset dir="${wekadocs}/manual">
<include name="manual.tex" />
</fileset>
</latex>
<echo message="Running dvips..."/>
<exec executable="dvips" dir="${wekadocs}/manual">
<arg value="-oWekaManual.ps"/>
<arg value="manual.dvi"/>
</exec>
<echo message="Running ps2pdf..."/>
<exec executable="ps2pdf" dir="${wekadocs}/manual">
<arg value="WekaManual.ps"/>
</exec>
</target>
<target name="copy-files" depends="javadocs, remote-engine, weka-src, changelog, packages_changelog, manual">
<copy todir="${temp}/weka-${release}">
<fileset dir="${weka}/dist">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${temp}/weka-${release}/changelogs">
<fileset dir="${wekadocs}/changelogs">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${temp}/weka-${release}/doc">
<fileset dir="${weka}/doc"/>
</copy>
<copy todir="${temp}/weka-${release}/data">
<fileset dir="${wekadocs}/data"/>
</copy>
<copy todir="${temp}/weka-${release}/">
<fileset dir="${wekadocs}">
<include name="documentation.*"/>
<include name="README" />
<include name="COPYING" />
<include name="weka.*" />
</fileset>
</copy>
<copy todir="${temp}/weka-${release}/">
<fileset dir="${wekadocs}/manual">
<include name="WekaManual.pdf"/>
</fileset>
</copy>
<!-- copy the generated pdf up one directory - this copy is under subversion control and needs to be committed -->
<copy file="${wekadocs}/manual/WekaManual.pdf" toFile="${wekadocs}/WekaManual.pdf"/>
<copy file="${wekadocs}/WekaManual.pdf" toFile="${dist}/WekaManual-${release}.pdf"/>
<!-- copy changelogs to README files for uploading to SourceForge release directories -->
<copy file="${wekadocs}/changelogs/CHANGELOG-${release}" toFile="${dist}/README-${release}.txt"/>
<copy file="${wekadocs}/changelogs/CHANGELOG_PACKAGES-${release}" toFile="${dist}/README-PACKAGES-${release}.txt"/>
<zip destfile="${temp}/weka-${release}/wekaexamples.zip"
basedir="${wekaexamples}"/>
</target>
<target name="clean" description="Removes the dist directory">
<delete dir="${dist}"/>
<delete dir="${temp}"/>
</target>
<target name="dmg_osx">
<!-- Make a .dmg disk image under Mac OSX -->
<exec executable="/usr/bin/hdiutil" os="Mac OS X">
<arg value="create"/>
<arg value="-srcfolder"/>
<arg value="${temp}"/>
<arg value="-volname"/>
<arg value="weka-${release}"/>
<arg value="-ov"/>
<arg value="${dist}/weka-${release}-${jvm_target}-osx.dmg"/>
<arg value="-fs"/>
<arg value="HFS+"/>
</exec>
<delete dir="${temp}/weka-${release}-${jvm_target}.app"/>
</target>
<target name="dmg_linux">
<!-- Make a .dmg disk image under Linux -->
<exec executable="genisoimage" os="Linux">
<arg value="-D"/>
<arg value="-V"/>
<arg value="Weka-${release}"/>
<arg value="-no-pad"/>
<arg value="-r"/>
<arg value="-apple"/>
<arg value="-o"/>
<arg value="${dist}/weka-${release}-temp.dmg"/>
<arg value="${temp}"/>
</exec>
<exec executable="dmg" os="Linux">
<arg value="dmg"/>
<arg value="${dist}/weka-${release}-temp.dmg"/>
<arg value="${dist}/weka-${release}-${jvm_target}-osx.dmg"/>
</exec>
<delete file="${dist}/weka-${release}-temp.dmg"/>
<delete dir="${temp}/weka-${release}-${jvm_target}.app"/>
</target>
<target name="osx_jpackage_x64" depends="installer_init" description="Make an OS X application(s). Run with -Drelease=<number of release (eg. 3-4-1)>, -Dversion=<number of version (eg. 3.4.1)>, the name of the JVM vendor (e.g. -Djvm-vendor=azul-zulu) and the path to an OSX x64 JDK (NOT JRE!!) (e.g. -Djdk-osx-x64=path-to-azul-jdk-install/zulu-x.jdk). This target must be run after one of the release_base_* targets.">
<copy file="${weka}/src/main/java/weka/gui/weka_icon_new.icns" toFile="${temp}/weka_icon_new.icns"/>
<!-- include the weka.sh file in the app -->
<copy file="${weka}/src/main/scripts/weka.sh" tofile="${temp}/weka-${release}/weka.sh"/>
<chmod file="${temp}/weka-${release}/weka.sh" perm="ugo+rx"/>
<!-- Make the app -->
<exec executable="jpackage">
<arg value="--verbose"/>
<arg value="--description"/>
<arg value="Waikato Environment For Knowledge Analysis"/>
<arg value="--vendor"/>
<arg value="University of Waikato"/>
<arg value="--app-version"/>
<arg value="${version}"/>
<arg value="--copyright"/>
<arg value="Copyright (C) 1999-2021 University of Waikato, Hamilton, New Zealand"/>
<arg value="-i"/>
<arg value="${temp}/weka-${release}"/>
<arg value="-d"/>
<arg value="${temp}"/>
<arg value="-n"/>
<arg value="weka-${version}"/>
<arg value="--icon"/>
<arg value="${temp}/weka_icon_new.icns"/>
<arg value="--main-class"/>
<arg value="weka.gui.GUIChooser"/>
<arg value="--main-jar"/>
<arg value="weka.jar"/>
<arg value="--runtime-image"/>
<arg value="${jdk-osx-x64}"/>
<arg value="--java-options"/>
<arg value="--add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.annotation=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.module=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.net.spi=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.channels=ALL-UNNAMED --add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security.interfaces=ALL-UNNAMED --add-opens=java.base/java.security.spec=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.text.spi=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.time.chrono=ALL-UNNAMED --add-opens=java.base/java.time.format=ALL-UNNAMED --add-opens=java.base/java.time.temporal=ALL-UNNAMED --add-opens=java.base/java.time.zone=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.function=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.spi=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/java.applet=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt.im=ALL-UNNAMED --add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED --add-opens=java.logging/java.util.logging=ALL-UNNAMED --add-opens=java.management/java.lang.management=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.rmi/java.rmi=ALL-UNNAMED --add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED --add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED --add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED --add-opens=java.rmi/java.rmi.server=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.border=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.tk.quantum=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED"/>
</exec>
<!-- Irritatingly, jpackage adds the specified version number on to the app name when making the dmg -->
<move file="${temp}/weka-${version}-${version}.dmg" tofile="${dist}/weka-${release}-${jvm-vendor}-osx.dmg"/>
<delete dir="${temp}"/>
</target>
<target name="osx_jpackage_aarch64" depends="installer_init" description="Make an OS X application(s). Run with -Drelease=<number of release (eg. 3-4-1)>, -Dversion=<number of release (eg. 3.4.1)>, the name of the JVM vendor (e.g. -Djvm-vendor=azul-zulu), and the path to an OSX aarch64 JDK (NOT JRE!!) (e.g. -Djdk-osx-aarch64=path-to-azul-jdk-aarch64-install/zulu-x.jdk). This target must be run after one of the release_base_* targets.">
<copy file="${weka}/src/main/java/weka/gui/weka_icon_new.icns" toFile="${temp}/weka_icon_new.icns"/>
<!-- include the weka.sh file in the app -->
<copy file="${weka}/src/main/scripts/weka.sh" tofile="${temp}/weka-${release}/weka.sh"/>
<chmod file="${temp}/weka-${release}/weka.sh" perm="ugo+rx"/>
<!-- Make the app -->
<exec executable="jpackage">
<arg value="--verbose"/>
<arg value="--description"/>
<arg value="Waikato Environment For Knowledge Analysis"/>
<arg value="--vendor"/>
<arg value="University of Waikato"/>
<arg value="--app-version"/>
<arg value="${version}"/>
<arg value="--copyright"/>
<arg value="Copyright (C) 1999-2021 University of Waikato, Hamilton, New Zealand"/>
<arg value="-i"/>
<arg value="${temp}/weka-${release}"/>
<arg value="-d"/>
<arg value="${temp}"/>
<arg value="-n"/>
<arg value="weka-${version}"/>
<arg value="--icon"/>
<arg value="${temp}/weka_icon_new.icns"/>
<arg value="--main-class"/>
<arg value="weka.gui.GUIChooser"/>
<arg value="--main-jar"/>
<arg value="weka.jar"/>
<arg value="--runtime-image"/>
<arg value="${jdk-osx-aarch64}"/>
<arg value="--java-options"/>
<arg value="--add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.annotation=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.module=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.net.spi=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.channels=ALL-UNNAMED --add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security.interfaces=ALL-UNNAMED --add-opens=java.base/java.security.spec=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.text.spi=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.time.chrono=ALL-UNNAMED --add-opens=java.base/java.time.format=ALL-UNNAMED --add-opens=java.base/java.time.temporal=ALL-UNNAMED --add-opens=java.base/java.time.zone=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.function=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.spi=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/java.applet=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt.im=ALL-UNNAMED --add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED --add-opens=java.logging/java.util.logging=ALL-UNNAMED --add-opens=java.management/java.lang.management=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.rmi/java.rmi=ALL-UNNAMED --add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED --add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED --add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED --add-opens=java.rmi/java.rmi.server=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.border=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.tk.quantum=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED"/>
</exec>
<!-- Irritatingly, jpackage adds the specified version number on to the app name when making the dmg -->
<move file="${temp}/weka-${version}-${version}.dmg" tofile="${dist}/weka-${release}-${jvm-vendor}-arm-osx.dmg"/>
<delete dir="${temp}"/>
</target>
<target name="installer_init">
<unzip src="${dist}/weka-${release}.zip" dest="${temp}"/>
</target>
<target name="release_base_zip_no_junit" depends="copy-files" description="Make a distribution of Weka. Run with -Drelease=number (e.g. 3-7-10)">
<echo message="Making weka-${release}.zip ..."/>
<zip destfile="${dist}/weka-${release}.zip" basedir="${temp}">
<include name="**/*"/>
</zip>
<echo message="Cleaning up..."/>
<delete dir="${temp}"/>
<ant antfile="build.xml" dir="${weka}" target="clean" inheritall="false"/>
</target>
<target name="release_base_zip" depends="run_tests_all, copy-files" description="Run unit tests ans make a distribution of Weka. Run with -Drelease=number (e.g. 3-7-10)">
<echo message="Making weka-${release}.zip ..."/>
<zip destfile="${dist}/weka-${release}.zip" basedir="${temp}">
<include name="**/*"/>
</zip>
<echo message="Cleaning up..."/>
<delete dir="${temp}"/>
<ant antfile="build.xml" dir="${weka}" target="clean" inheritall="false"/>
</target>
<target name="linux_archive" depends="installer_init">
<delete dir="${temp}/weka-${release}/jre"/>
<delete dir="${temp}/nsis"/>
<mkdir dir="${temp}/weka-${release}/jre"/>
<untar src="${jre-linux}" dest="${temp}/weka-${release}/jre" compression="gzip"/>
<chmod dir="${temp}/weka-${release}/jre" perm="ugo+rx" includes="**/bin/*"/>
<copy file="${weka}/src/main/scripts/weka.sh" tofile="${temp}/weka-${release}/weka.sh"/>
<chmod file="${temp}/weka-${release}/weka.sh" perm="ugo+rx"/>
<echo message="Making weka-${release}-${jvm-vendor}-linux.zip ..."/>
<script language="groovy">
jre = new java.io.File(project.getProperty('jre-linux'));
jreName = jre.getName();
jreName = jreName.replace(".tar.gz", "");
project.setProperty('jre-linux-name', jreName);
</script>
<zip destfile="${dist}/weka-${release}-${jvm-vendor}-linux.zip" basedir="${temp}">
<include name="**/*"/>
<!-- excludes are needed here so that these two don't get included twice in the zip file -->
<exclude name="weka-${release}/weka.sh"/>
<exclude name="weka-${release}/jre/${jre-linux-name}/bin/java"/>
<zipfileset dir="${temp}/weka-${release}" includes="weka.sh" fullpath="weka-${release}/weka.sh" filemode="755"/>
<zipfileset dir="${temp}/weka-${release}/jre/${jre-linux-name}/bin" includes="java" fullpath="weka-${release}/jre/${jre-linux-name}/bin/java" filemode="755"/>
</zip>
</target>
<target name="win_installers" depends="installer_init">
<delete dir="${temp}/nsis"/>
<mkdir dir="${temp}/nsis"/>
<copy todir="${temp}/nsis">
<fileset dir="installer/nsis/">
<include name="**/*"/>
</fileset>
</copy>
<javac srcdir="${temp}/nsis"
fork="yes"
destdir="${temp}/nsis"
includeantruntime="false"
source="1.8" target="1.8">
<include name="GenerateSetup.java"/>
</javac>
<javac srcdir="${temp}/nsis/templates"
fork="yes"
destdir="${temp}/nsis/templates"
includeantruntime="false"
source="1.8" target="1.8">
<include name="RunWeka.java"/>
</javac>
<delete dir="${temp}/weka-${release}/jre"/>
<mkdir dir="${temp}/weka-${release}/jre"/>
<unzip src="${jre}" dest="${temp}/weka-${release}/jre"/>
<!-- jre installer - 64 bit -->
<echo message="Creating nsis script for 64 bit installer"/>
<java dir="${temp}/nsis" classname="GenerateSetup" fork="true">
<arg line="-version ${version} -input-dir ../weka-${release} -output-dir ./output -dir Weka-${release} -link-prefix 'Weka ${version}' -x64 true"/>
<classpath>
<pathelement location="${temp}/nsis"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
<!-- <echo message="Compiling nsis script for 32 bit installer to executable"/>
<exec executable="${makensis}">
<arg value="temp/nsis/output/weka-${release}.nsi"/>
</exec> -->
<echo message="Compiling nsis script for 64 bit installer to executable"/>
<exec executable="${makensis}">
<arg value="temp/nsis/output/weka-${release}-x64.nsi"/>
</exec>
<!-- rename installer file -->
<move file="${temp}/nsis/output/weka-${release}-x64.exe" tofile="${dist}/weka-${release}-${jvm-vendor}-windows.exe"/>
</target>
<target name="installers_no_junit" depends="clean, release_base_zip_no_junit, win_installers, linux_archive" description="Make a release and create windows and linux installers without running unit tests. Run with -Drelease=X-Y-Z -Dversion=X.Y.Z -Djre=<path to JRE zip to unpack in Weka windows install directory> -Djre-linux=<path to a linux JRE tgz to include in the linux archive -Djvm-vendor=JVM vendor (e.g. -Djvm-vendor=azul-zulu) -Dmakensis=<absolute path to the makensis executable> (only needed if makensis is not in the PATH). Note that one of the osx_jpackage targets (depending on Mac architecture) should be run after this.">
<echo message="Cleaning up..."/>
<delete dir="${temp}"/>
</target>
<target name="installers" depends="clean, release_base_zip, win_installers, linux_archive" description="Make a release and create windows and linux installers. Run with -Drelease=X-Y-Z -Dversion=X.Y.Z -Djre=<path to JRE zip to unpack in Weka windows install directory> -Dlinux-jre=<path to a linux JRE tgz to include in the linux archive -Djvm-vendor=JVM vendor (e.g. -Djvm-vendor=azul-zulu) -Dmakensis=<absolute path to the makensis executable> (only needed if makensis is not in the PATH). Note that one of the osx_jpackage targets (depending on Mac architecture) should be run after this.">
<echo message="Cleaning up..."/>
<delete dir="${temp}"/>
</target>
</project>