-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.xml
152 lines (121 loc) · 4.99 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?xml version="1.0"?>
<project name="schemes" default="all" basedir=".">
<property name="target" value="all" description="default subproject target" />
<property file='path.properties' />
<property name="build-dir" value='${path.build-dir}/${path.base-dir}' description="place where all is builded" />
<property name="base-pack-dir" value='${path.build-dir}/${path.base-pack}' description="folder with packed base" />
<property name="base-unpack-dir" value='${path.build-dir}/${path.base-unpack}' description="folder with unpacked base" />
<property name="base-allpack-dir" value='${path.build-dir}/${path.base-allpack}' description="folder with full packed base" />
<!-- build -->
<target name='hrd'>
<ant antfile="build.xml" dir='hrd' target="${target}" />
</target>
<target name='hrc'>
<ant antfile="build.xml" dir='hrc' target="${target}" />
</target>
<!-- /build -->
<!-- default targets for build -->
<target name='all' depends="hrc, hrd">
<copy file='catalog/catalog.base.xml' tofile='${build-dir}/catalog.xml' overwrite='true' />
</target>
<target name="clean">
<antcall target='hrc'>
<param name='target' value='clean' />
</antcall>
<antcall target='hrd'>
<param name='target' value='clean' />
</antcall>
<delete file='${build-dir}/catalog.xml' />
</target>
<target name='base'>
<antcall target="all" />
</target>
<!-- /default targets for build -->
<!-- core targets for packaging -->
<target name="hrc.zip" depends='hrc'>
<mkdir dir='${target-dir}/hrc/auto/types' />
<zip destfile='${target-dir}/hrc/common.zip'>
<fileset dir='${build-dir}/hrc' includes='**/*' excludes='proto*.hrc, *.ent.hrc, auto, auto/**/*' />
</zip>
<copy todir='${target-dir}/hrc/' overwrite='true'>
<fileset dir='${build-dir}/hrc/' includes='proto*.hrc, *.ent.hrc' />
</copy>
<copy todir='${target-dir}/hrc/' overwrite='true'>
<fileset dir='${build-dir}/hrc/' includes='auto/**/*' />
</copy>
<replace dir='${target-dir}/hrc/' includes='*.hrc' token='link="' value='link="jar:common.zip!' />
</target>
<!-- /core targets for packaging -->
<!-- make ditrib -->
<target name="base.packed" depends='base, base.packed.clean'>
<mkdir dir='${base-pack-dir}' />
<antcall target='hrc.zip'>
<param name='target-dir' value='${base-pack-dir}' />
</antcall>
<copy todir='${base-pack-dir}/hrd/' overwrite='true'>
<fileset dir='${build-dir}/hrd/' excludes='reg.addons/**' />
</copy>
<copy file='catalog/catalog.base.xml' tofile='${base-pack-dir}/catalog.xml' />
<copy file='CHANGELOG.md' todir='${base-pack-dir}' />
</target>
<target name="base.packed.clean">
<delete dir="${base-pack-dir}" />
</target>
<target name="base.unpacked" depends='base, base.unpacked.clean'>
<mkdir dir='${base-unpack-dir}' />
<copy todir='${base-unpack-dir}/hrc/' overwrite='true'>
<fileset dir='${build-dir}/hrc/' includes='**/*' />
</copy>
<copy todir='${base-unpack-dir}/hrd/' overwrite='true'>
<fileset dir='${build-dir}/hrd/' excludes='reg.addons/**' />
</copy>
<copy file='catalog/catalog.base.xml' tofile='${base-unpack-dir}/catalog.xml' />
<copy file='CHANGELOG.md' todir='${base-unpack-dir}' />
</target>
<target name="base.unpacked.clean">
<delete dir="${base-unpack-dir}" />
</target>
<target name="base.allpacked" depends='base, base.allpacked.clean'>
<mkdir dir='${base-allpack-dir}' />
<copy file='catalog/catalog.allpacked.xml' tofile='${base-allpack-dir}/catalog.xml' />
<copy todir='${base-allpack-dir}' overwrite='true'>
<fileset dir='${build-dir}/hrc/' includes='auto/**/*' />
</copy>
<zip destfile='${base-allpack-dir}/common.zip'>
<fileset dir='${build-dir}' includes='hrc/**, hrd/**' excludes='hrd/reg.addons/**, hrd/css/**' />
</zip>
<copy file='CHANGELOG.md' todir='${base-allpack-dir}' />
</target>
<target name="base.allpacked.clean">
<delete dir="${base-allpack-dir}" />
</target>
<!-- /make ditrib -->
<target name="base.distr" description='Build archive for distribute'>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd" />
</tstamp>
<property name="postfix" value="${TODAY}" />
<property name='hrcupdate-zip' value='${path.build-dir}/colorer-base.${type}.${postfix}.zip' />
<zip destfile='${hrcupdate-zip}'>
<fileset dir='${target-dir}' />
</zip>
</target>
<target name="base.distr-packed" depends="base.packed" description='Build packed distrib'>
<antcall target='base.distr'>
<param name='target-dir' value='${base-pack-dir}' />
<param name='type' value='packed' />
</antcall>
</target>
<target name="base.distr-unpacked" depends="base.unpacked" description='Build unpacked distrib'>
<antcall target='base.distr'>
<param name='target-dir' value='${base-unpack-dir}' />
<param name='type' value='unpacked' />
</antcall>
</target>
<target name="base.distr-allpacked" depends="base.allpacked" description='Build allpacked distrib'>
<antcall target='base.distr'>
<param name='target-dir' value='${base-allpack-dir}' />
<param name='type' value='allpacked' />
</antcall>
</target>
</project>