-
Notifications
You must be signed in to change notification settings - Fork 38
/
build_src.xml
87 lines (76 loc) · 3.33 KB
/
build_src.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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="dist" name="Create Jar for HELYX-OS">
<property name="component.name" value="HELYX-OS" />
<property name="component.vendor" value="Engys" />
<property name="component.mail" value="info@engys.com" />
<property name="component.site" value="http://engys.github.io/HELYX-OS/" />
<property name="component.copyright" value="Copyright © ENGYS Ltd 2016. All rights reserved." />
<property name="component.launcher" value="eu.engys.launcher.Launcher" />
<property name="component.version" value="2.4.0" />
<property name="jar.name" value="${component.name}.jar" />
<property name="src.dir" value="src" />
<property name="build.dir" value="build" />
<property name="lib.dir" value="lib" />
<path id="build.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="${build.dir}" />
</target>
<target name="compile" depends="init">
<javac debug="true" destdir="${build.dir}" target="1.7" source="1.7" verbose="false" srcdir="${src.dir}" includeantruntime="false" includejavaruntime="yes">
<include name="eu/engys/**/*.java" />
<classpath refid="build.path" />
</javac>
<copy todir="${build.dir}">
<fileset dir="${src.dir}" includes="**/resources/**/*, **/*.png, **/*.jpeg, **/*.jpg, **/*.gif, **/*.properties" />
</copy>
<touch file="${build.dir}/eu/engys/resources/version.properties" />
<propertyfile file="${build.dir}/eu/engys/resources/version.properties">
<entry key="name" value="${component.name}" />
<entry key="vendor" value="${component.vendor}" />
<entry key="version" value="${component.version}" />
<entry key="mail" value="${component.mail}" />
<entry key="site" value="${component.site}" />
<entry key="copyright" value="${component.copyright}" />
<entry key="build" type="date" value="now" pattern="yyyy-MM-dd" />
</propertyfile>
</target>
<target name="dist" depends="compile" description="">
<pathconvert property="main.class.path" pathsep=" ">
<path refid="build.path" />
<mapper>
<chainedmapper>
<flattenmapper />
</chainedmapper>
</mapper>
</pathconvert>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd" />
</tstamp>
<!-- create the jar -->
<jar jarfile="${lib.dir}/${jar.name}" basedir="${build.dir}">
<!-- define MANIFEST.MF -->
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="${component.launcher}" />
<attribute name="Specification-Title" value="${component.name}" />
<attribute name="Specification-Version" value="${component.version}" />
<attribute name="Specification-Vendor" value="${component.vendor}" />
<attribute name="Implementation-Title" value="${component.name}" />
<attribute name="Implementation-Version" value="${component.version} ${TODAY}" />
<attribute name="Implementation-Vendor" value="${component.vendor}" />
<attribute name="Class-Path" value="${main.class.path}" />
<attribute name="SplashScreen-Image" value="${component.name}.png" />
</manifest>
</jar>
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete quiet="true">
<fileset dir="${src.dir}" includes="**/*.class" />
</delete>
</target>
</project>