This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
133 lines (92 loc) · 4.39 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
<project name="vbrowser" default="dist-install" basedir=".">
<description>
Project : VBrowser
Component : root build file
See build.prop for custom properties.
</description>
<!-- Toplevel build is *here* -->
<property name="project.root" location="." />
<property environment="env" />
<!-- custom properties, read before project.prop -->
<property file="build.prop" />
<!-- toplevel build properties -->
<property file="${project.root}/project.prop" />
<import file="modules.xml" />
<!-- Target: init -->
<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${project.dist}" />
<mkdir dir="${project.dist.lib}" />
<mkdir dir="${project.dist.etc}" />
<mkdir dir="${project.dist.bin}" />
<mkdir dir="${project.dist.doc}" />
<!-- project defaults -->
<property name="project.sourcedir" value="${project.root}" />
<tstamp>
<format property="project.tstamp" pattern="yyyy-MM-dd HH:mm:ss" locale="en" />
</tstamp>
<tstamp>
<format property="project.time.number" pattern="yyyyMMddHHmmss" locale="en" />
</tstamp>
<echo message="=============================================================="/>
<echo message="=== VBrowser: ${project.version} "/>
<echo message="=============================================================="/>
<echo message=" project root = ${project.root}"/>
<echo message=" project dist = ${project.dist}"/>
<echo message=" project sourceroot = ${project.sourcedir}"/>
<echo message=" --- auxlibs --- "/>
<echo message=" platinum.install = ${platinum.install}"/>
</target>
<target name="dist-install" depends="init,modules-dist-install,root-dist-install" />
<target name="modules-dist-install" depends="init">
<antcall target="doModules">
<param name="target" value="dist-install" />
</antcall>
</target>
<target name="root-dist-install" depends="init">
<filterset id="vbrowser-tokens">
<!-- nifty: ant filterset (keyword subtitution) while copying files ! -->
<filter token="VBROWSER_VERSION" value="${project.version}" />
<filter token="VBROWSER_DATE" value="${project.tstamp}" />
</filterset>
<!-- Copy files to root of distribution -->
<copy todir="${project.dist}" verbose="true">
<fileset file="NOTICE.txt" />
<fileset file="README.txt" />
<fileset file="ReleaseNotes.txt" />
<filterset refid="vbrowser-tokens" />
</copy>
</target>
<target name="test" depends="clean,modules-test" />
<target name="modules-test" depends="init">
<antcall target="doModules-test">
<param name="target" value="test" />
</antcall>
</target>
<target name="clean" depends="modules-clean" description="Clean All">
<delete dir="${project.dist}" />
</target>
<target name="modules-clean" depends="init">
<antcall target="doModules">
<param name="target" value="clean" />
</antcall>
</target>
<target name="dist-zip" depends="dist-install">
<mkdir dir="packs" />
<!-- zippit -->
<property name="distro.prefix" value="vbrowser" />
<property name="distro.zip.prefix" value="vbrowser" />
<!-- derived -->
<property name="distro.zip.root" value="${distro.prefix}-${project.version}" />
<property name="distro.zip.filename" value="${distro.zip.prefix}-${project.version}" />
<zip destfile="packs/${distro.zip.filename}.zip">
<!-- Add all excluding shell scripts and other executables -->
<zipfileset dir="${project.dist}" filemode="644" prefix="${distro.zip.filename}" excludes="bin/**,*.sh" />
<!-- Now add 'bin' shell scrips with x permissions ! -->
<zipfileset dir="${project.dist}/bin" filemode="755" prefix="${distro.zip.root}/bin" />
<!-- Now add root shell scrips with x permissions ! -->
<zipfileset dir="${project.dist}/" filemode="755" prefix="${distro.zip.root}" includes="*.sh">
</zipfileset>
</zip>
</target>
</project>