-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
97 lines (88 loc) · 4.1 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="GUI">
<description>
Builds and packs complete distribution package of GUI for SIMRES.
J. Saroun, 2019
- Copies the distribution files to ./dist, including the Java3D package for
actual platform (Windows or Linux, 64 or 32 bits).
- Edit `build.parameters` to define paths to platform-dependent Java3D distributions.
- To deploy this GUI with SIMRES, copy the contents of ./dist in ./GUI
of the SIMRES distribution.
- Define dest=[some path] to change the distribution directory (default is ./dist)
</description>
<property environment="env"/>
<property name="JSTools.location" value="./JSTools"/>
<property name="simresCON.location" value="./simresCON"/>
<property name="simresGUI.location" value="./simresGUI"/>
<property name="dest" value="./dist"/>
<property file="./build.properties"/>
<import file="build.os.xml"/>
<tstamp>
<format property="BUILD_DATE" pattern="yyyy-MM-dd HH:mm:ss" locale="en,UK" />
</tstamp>
<target name="init">
<mkdir dir="${dest}"/>
<mkdir dir="${dest}/j3d-jre"/>
</target>
<!-- Note: it is enough to call build.gui. The other projects are built as dependences. -->
<target name="clean" description="clean all projects">
<ant antfile="build.gui.xml" inheritAll="false" target="cleanall"/>
</target>
<target name="compile" description="compile all projects" >
<ant antfile="build.gui.xml" inheritAll="false" target="build"/>
</target>
<target name="build-jar" depends="init, compile" description="compile + create jar files in ./dist" >
<buildnumber />
<!-- constructs the classpath for simresGUI -->
<manifestclasspath property="gui.classpath" jarfile="simresGUI.jar">
<classpath>
<fileset dir="${dest}" includes="**/*.jar"/>
</classpath>
</manifestclasspath>
<jar destfile="${dest}/simresCON.jar" manifest="${simresCON.location}/MANIFEST.MF">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Specification-Title" value="SIMRES Console UI"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="${vendor}"/>
<attribute name="Implementation-Title" value="cz.restrax.sim"/>
<attribute name="Implementation-Version" value="${version}.${build.number}, ${BUILD_DATE}"/>
<attribute name="Implementation-Vendor" value="${vendor}"/>
</manifest>
<fileset dir="${JSTools.location}/bin/" />
<fileset dir="${simresCON.location}/bin/" />
</jar>
<jar destfile="${dest}/simresGUI.jar" manifest="${simresGUI.location}/MANIFEST.MF">
<manifest>
<!-- <attribute name="Main-Class" value="cz.restrax.gui.SimresGUI"/>
<attribute name="Class-Path" value="${gui.classpath}"/> -->
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Specification-Title" value="SIMRES GUI"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="${vendor}"/>
<attribute name="Implementation-Title" value="cz.restrax.gui"/>
<attribute name="Implementation-Version" value="${version}.${build.number}, ${BUILD_DATE}"/>
<attribute name="Implementation-Vendor" value="${vendor}"/>
</manifest>
<fileset dir="${simresGUI.location}/bin/" />
</jar>
</target>
<target name="pack-j3d" depends="init,osinfo" description="copy Java3D for this platform to the distribution" >
<copy includeemptydirs="false" todir="${dest}/j3d-jre">
<fileset dir="${j3d}/" />
</copy>
</target>
<target name="cleandist" depends="init" description="erase distribution directory, ./dist" >
<delete >
<fileset dir="${dest}/j3d-jre/" />
<fileset dir="${dest}">
<include name="*.jar"/>
<exclude name="j3d-jre"/>
</fileset>
</delete>
</target>
<target name="build" depends="init, clean,compile,cleandist,build-jar,pack-j3d"
description="clean and re-build complete GUI distribution" >
<echo message="GUI distribution created in ${dest}" />
</target>
</project>