-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathant-package.xml
More file actions
310 lines (280 loc) · 15 KB
/
Copy pathant-package.xml
File metadata and controls
310 lines (280 loc) · 15 KB
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
<project name="Tiny Media Manager">
<!-- build directories -->
<property name="build.dir" value="target/ant"/>
<property name="lib.dir" value="${build.dir}/lib"/>
<property name="dist.dir" value="target/dist"/>
<!-- set as property to override in jenkins -->
<property name="getdown" value="getdown.txt"/>
<path id="classpath.default">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="setNightly" if="nightly">
<property name="rev" value="nightly"/>
</target>
<target name="setPreRelease" if="prerelease">
<property name="rev" value="prerelease"/>
</target>
<target name="package-app" description="builds the packages" depends="setNightly, setPreRelease">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<!-- set SVN revision here - is not set anymore since nightly/prerel -->
<!-- Only works, if rev is not set to nightly/prerel - so should be fine for release build -->
<echo message="Rev: ${rev}"/>
<property name="rev" value="${tmmRevision}"/>
<echo message="Rev: ${rev}"/>
<!-- buildinfo -->
<propertyfile file="${build.dir}/version" comment="This file is automatically generated - DO NOT EDIT">
<entry key="version" value="${tmmVersion}"/>
<entry key="human.version" value="${tmmVersion}"/>
<entry key="build" value="${rev}"/>
<entry key="date" value="${tmmTimestamp}"/>
</propertyfile>
<echo message="====================================================="/>
<echo message="default files, to include in DIST and GD"/>
<echo message="====================================================="/>
<copy file="changelog.txt" todir="${build.dir}"/>
<copy file="AppBundler/${getdown}" tofile="${build.dir}/getdown.txt"/>
<copy file="AppBundler/launcher.yml" todir="${build.dir}"/>
<copy file="AppBundler/restart.jar" todir="${build.dir}"/>
<copy file="LICENSE" todir="${build.dir}"/>
<copy file="AppBundler/splashscreen.png" todir="${build.dir}"/>
<copy file="AppBundler/splashscreen@150pct.png" todir="${build.dir}"/>
<copy file="AppBundler/splashscreen@200pct.png" todir="${build.dir}"/>
<copy file="AppBundler/splashscreen@250pct.png" todir="${build.dir}"/>
<copy file="AppBundler/splashscreen@300pct.png" todir="${build.dir}"/>
<copy file="AppBundler/env.txt" todir="${build.dir}"/>
<copy file="AppBundler/tmm.png" todir="${build.dir}"/>
<copy file="target/${tmmName}-${tmmVersion}.jar" tofile="${build.dir}/tmm.jar"/>
<copy todir="${build.dir}/native">
<fileset dir="native">
<exclude name="native/addons/**"/>
</fileset>
</copy>
<!-- zip templates -->
<tar compression="bzip2" destfile="${build.dir}/templates/templates.tar.bz2"
basedir="templates">
</tar>
<copy todir="${build.dir}/lib">
<fileset dir="target/dependency"/>
</copy>
<!-- JRE -->
<copy todir="${build.dir}/jre">
<fileset dir="target/jre"/>
</copy>
<!-- addons -->
<copy todir="${build.dir}/native/windows/addons">
<fileset dir="target/addons">
<include name="*windows_*"/>
</fileset>
</copy>
<copy todir="${build.dir}/native/macos/addons">
<fileset dir="target/addons">
<include name="*macos_*"/>
</fileset>
</copy>
<copy todir="${build.dir}/native/linux/addons">
<fileset dir="target/addons">
<include name="*linux_x64*"/>
</fileset>
</copy>
<copy todir="${build.dir}/native/arm/addons">
<fileset dir="target/addons">
<include name="*linux_arm*"/>
</fileset>
</copy>
<!-- ===================================================== -->
<!-- replace classpath -->
<!-- ===================================================== -->
<pathconvert property="gd.code" refid="classpath.default" pathsep="">
<mapper>
<chainedmapper>
<flattenmapper/>
<!-- remove absolute path -->
<!-- add GD + lib/ prefix + newline ;) -->
<globmapper from="*" to="code = lib/*${line.separator}"/>
</chainedmapper>
</mapper>
</pathconvert>
<!--echo message="${gd.code}" /-->
<replace file="${build.dir}/getdown.txt" token="%CODELIBS%" value="${gd.code}"/>
<!-- ===================================================== -->
<!-- custom task definitions -->
<!-- ===================================================== -->
<taskdef name="digest" classname="com.threerings.getdown.tools.DigesterTask">
<classpath>
<!-- ANT module currently does NOT yet include core -->
<pathelement location="AppBundler/libs/getdown-ant.jar"/>
<pathelement location="AppBundler/libs/getdown-core.jar"/>
</classpath>
</taskdef>
<!-- ===================================================== -->
<!-- macOS x64 distributable -->
<!-- ===================================================== -->
<echo message="====================================================="/>
<echo message="prepare build for MacOS X"/>
<echo message="====================================================="/>
<copy todir="${dist.dir}/mac/tinyMediaManager.app/Contents">
<fileset dir="AppBundler/dist-mac"/>
</copy>
<copy file="target/launcher/macos/tinyMediaManager"
tofile="${dist.dir}/mac/tinyMediaManager.app/Contents/MacOS/tinyMediaManager"/>
<replace file="${dist.dir}/mac/tinyMediaManager.app/Contents/Info.plist" token="%VERSION%"
value="${tmmVersion}"/>
<replace file="${dist.dir}/mac/tinyMediaManager.app/Contents/Info.plist" token="%SVNREV%"
value="${tmmRevision}"/>
<chmod file="${dist.dir}/mac/tinyMediaManager.app/Contents/MacOS/tinyMediaManager" perm="ugo+rx"/>
<copy todir="${dist.dir}/mac/tinyMediaManager.app/Contents/Resources/Java/">
<fileset dir="${build.dir}">
<include name="**/*"/>
<exclude name="native/windows*/**"/>
<exclude name="native/linux*/**"/>
<exclude name="native/arm*/**"/>
<exclude name="jre/jre-windows*"/>
<exclude name="jre/jre-linux*"/>
<exclude name="jre/jre-*arm*"/>
</fileset>
</copy>
<!-- ===================================================== -->
<!-- Windows x64 distributable -->
<!-- ===================================================== -->
<echo message="====================================================="/>
<echo message="prepare build for Windows"/>
<echo message="====================================================="/>
<copy file="target/launcher/windows/tinyMediaManager.exe"
tofile="${dist.dir}/win/tinyMediaManager.exe"/>
<copy file="target/launcher/windows/tinyMediaManagerCMD.exe"
tofile="${dist.dir}/win/tinyMediaManagerCMD.exe"/>
<copy todir="${dist.dir}/win">
<fileset dir="${build.dir}">
<include name="**/*"/>
<exclude name="native/mac*/**"/>
<exclude name="native/linux*/**"/>
<exclude name="native/arm*/**"/>
<exclude name="jre/jre-macos*"/>
<exclude name="jre/jre-linux*"/>
<exclude name="jre/jre-*arm*"/>
</fileset>
</copy>
<!-- ===================================================== -->
<!-- Linux x64 distributable -->
<!-- ===================================================== -->
<echo message="====================================================="/>
<echo message="prepare build for Linux"/>
<echo message="====================================================="/>
<copy file="target/launcher/linux/tinyMediaManager"
tofile="${dist.dir}/linux/tinyMediaManager"/>
<chmod file="${dist.dir}/linux/tinyMediaManager" perm="ugo+rx"/>
<copy todir="${dist.dir}/linux">
<fileset dir="${build.dir}">
<include name="**/*"/>
<exclude name="native/mac*/**"/>
<exclude name="native/windows*/**"/>
<exclude name="native/arm*/**"/>
<exclude name="jre/jre-macos*"/>
<exclude name="jre/jre-windows*"/>
<exclude name="jre/jre-*arm*"/>
</fileset>
</copy>
<!-- ===================================================== -->
<!-- Linux arm32 (raspberry, ...) distributable -->
<!-- ===================================================== -->
<copy file="target/launcher/arm/tinyMediaManager"
tofile="${dist.dir}/arm/tinyMediaManager-arm"/>
<chmod file="${dist.dir}/arm/tinyMediaManager-arm" perm="ugo+rx"/>
<copy todir="${dist.dir}/arm">
<fileset dir="${build.dir}">
<include name="**/*"/>
<exclude name="native/mac*/**"/>
<exclude name="native/windows*/**"/>
<exclude name="native/linux*/**"/>
<exclude name="jre/jre-macos*"/>
<exclude name="jre/jre-windows*"/>
<exclude name="jre/jre-linux_x64*"/>
</fileset>
</copy>
<!-- ===================================================== -->
<!-- finalize getdown files -->
<!-- ===================================================== -->
<echo message="====================================================="/>
<echo message="default files, NOT to include in DIST, but in GD"/>
<echo message="====================================================="/>
<copy file="${dist.dir}/win/tinyMediaManager.exe" todir="${build.dir}"/>
<copy file="${dist.dir}/win/tinyMediaManagerCMD.exe" todir="${build.dir}"/>
<copy file="${dist.dir}/linux/tinyMediaManager" todir="${build.dir}"/>
<copy file="${dist.dir}/arm/tinyMediaManager-arm" todir="${build.dir}"/>
<copy file="AppBundler/dist-linux/tinyMediaManager.sh" todir="${build.dir}"/>
<copy file="${dist.dir}/mac/tinyMediaManager.app/Contents/MacOS/tinyMediaManager"
todir="${build.dir}/macOS/MacOS"/>
<copy file="${dist.dir}/mac/tinyMediaManager.app/Contents/MacOS/JavaApplicationStub"
todir="${build.dir}/macOS/MacOS"/>
<copy file="${dist.dir}/mac/tinyMediaManager.app/Contents/Info.plist" todir="${build.dir}/macOS/"/>
<copy file="${dist.dir}/mac/tinyMediaManager.app/Contents/Resources/tmm.icns"
todir="${build.dir}/macOS/Resources/"/>
<echo message="====================================================="/>
<echo message="finally create checksums"/>
<echo message="====================================================="/>
<digest appdir="${build.dir}"/>
<!-- ===================================================== -->
<!-- package macOS -->
<!-- ===================================================== -->
<echo message="====================================================="/>
<echo message="package for macOS x86_64"/>
<echo message="====================================================="/>
<copy file="${build.dir}/digest.txt" todir="${dist.dir}/mac/tinyMediaManager.app/Contents/Resources/Java/"/>
<copy file="${build.dir}/digest2.txt" todir="${dist.dir}/mac/tinyMediaManager.app/Contents/Resources/Java/"/>
<zip destfile="${dist.dir}/tmm_${tmmVersion}_macos-x86_64.zip" level="9">
<zipfileset dir="${dist.dir}/mac" excludes="**/tinyMediaManager"/>
<zipfileset filemode="755" dir="${dist.dir}/mac"
includes="**/tinyMediaManager"/>
</zip>
<!-- ===================================================== -->
<!-- package Windows -->
<!-- ===================================================== -->
<echo message="====================================================="/>
<echo message="package for Windows amd64"/>
<echo message="====================================================="/>
<copy file="${build.dir}/digest.txt" todir="${dist.dir}/win"/>
<copy file="${build.dir}/digest2.txt" todir="${dist.dir}/win"/>
<zip destfile="${dist.dir}/tmm_${tmmVersion}_windows-amd64.zip" level="9">
<zipfileset filemode="755" dir="${dist.dir}/win"/>
</zip>
<!-- ===================================================== -->
<!-- package Linux x64 -->
<!-- ===================================================== -->
<echo message="====================================================="/>
<echo message="package for Linux amd64"/>
<echo message="====================================================="/>
<copy file="${build.dir}/digest.txt" todir="${dist.dir}/linux"/>
<copy file="${build.dir}/digest2.txt" todir="${dist.dir}/linux"/>
<tar compression="gzip" destfile="${dist.dir}/tmm_${tmmVersion}_linux-amd64.tar.gz">
<tarfileset prefix="tinyMediaManager/" dir="${dist.dir}/linux" excludes="tinyMediaManager"/>
<tarfileset prefix="tinyMediaManager/" filemode="755" dir="${dist.dir}/linux" includes="tinyMediaManager"/>
</tar>
<!-- ===================================================== -->
<!-- package ARM 32 -->
<!-- ===================================================== -->
<echo message="====================================================="/>
<echo message="package for Linux arm32"/>
<echo message="====================================================="/>
<copy file="${build.dir}/digest.txt" todir="${dist.dir}/arm"/>
<copy file="${build.dir}/digest2.txt" todir="${dist.dir}/arm"/>
<tar compression="gzip" destfile="${dist.dir}/tmm_${tmmVersion}_linux-arm.tar.gz">
<tarfileset prefix="tinyMediaManager/" dir="${dist.dir}/arm" excludes="tinyMediaManager-arm"/>
<tarfileset prefix="tinyMediaManager/" filemode="755" dir="${dist.dir}/arm"
includes="tinyMediaManager-arm"/>
</tar>
<!-- done, move build dir -->
<delete dir="build"/>
<move file="${build.dir}" tofile="build"/>
<!-- cleanup dist -->
<delete dir="dist"/>
<delete dir="${dist.dir}/win"/>
<delete dir="${dist.dir}/mac"/>
<delete dir="${dist.dir}/linux"/>
<delete dir="${dist.dir}/arm"/>
<move file="${dist.dir}" tofile="dist"/>
</target>
</project>