Gentoo Archives: gentoo-commits

From: "Patrice Clement (monsieurp)" <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-tv/tvbrowser/files: tvbrowser-9999-build.xml
Date: Sun, 31 May 2015 00:56:32
Message-Id: 20150531005625.9F79EA14@oystercatcher.gentoo.org
1 monsieurp 15/05/31 00:56:25
2
3 Added: tvbrowser-9999-build.xml
4 Log:
5 Introduce live Subversion ebuild to the tree. Fix bug 300658.
6
7 Signed-off-by: Patrice Clement <monsieurp@g.o>
8 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 93491BB8)
9
10 Revision Changes Path
11 1.1 media-tv/tvbrowser/files/tvbrowser-9999-build.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/tvbrowser/files/tvbrowser-9999-build.xml?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/tvbrowser/files/tvbrowser-9999-build.xml?rev=1.1&content-type=text/plain
15
16 Index: tvbrowser-9999-build.xml
17 ===================================================================
18 <?xml version="1.0"?>
19 <!--
20 | Ant build script for the TV-Browser project.
21 |
22 | TV-Browser
23 | Copyright (C) 04-2003 Martin Oberhauser (martin@×××××××××.org)
24 |
25 | This program is free software; you can redistribute it and/or
26 | modify it under the terms of the GNU General Public License
27 | as published by the Free Software Foundation; either version 2
28 | of the License, or (at your option) any later version.
29 |
30 | This program is distributed in the hope that it will be useful,
31 | but WITHOUT ANY WARRANTY; without even the implied warranty of
32 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 | GNU General Public License for more details.
34 |
35 | You should have received a copy of the GNU General Public License
36 | along with this program; if not, write to the Free Software
37 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 |
39 | CVS information:
40 | $RCSfile: tvbrowser-9999-build.xml,v $
41 | $Source: /var/cvsroot/gentoo-x86/media-tv/tvbrowser/files/tvbrowser-9999-build.xml,v $
42 | $Date: 2015/05/31 00:56:25 $
43 | $Author: monsieurp $
44 | $Revision: 1.1 $
45 |
46 | Author: Til Schneider, www.murfman.de
47 +-->
48 <project name="TV-Browser" default="targets" basedir=".">
49
50
51 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
52 |
53 | The properties and paths
54 |
55 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
56
57 <property environment="env"/>
58 <property file="build.properties"/>
59 <property name="programname" value="TV-Browser"/>
60 <property name="programname.file" value="tvbrowser"/>
61 <property name="classes.dir" value="classes"/>
62 <property name="lib.dir" value="lib"/>
63 <property name="txt.dir" value="txt"/>
64 <property name="src.dir" value="src"/>
65 <property name="test.src.dir" value="test/src"/>
66 <property name="test.classes.dir" value="test/classes"/>
67 <property name="doc.dir" value="doc"/>
68 <property name="doc.header" value="${programname} ${tvbrowser.version} API"/>
69 <property name="doc.title" value="API documentation for ${programname} ${tvbrowser.version}"/>
70 <property name="doc.bottom" value="${programname} ${tvbrowser.version}, Copyright (C) 2004-2008 TV-Browser Team (dev@×××××××××.org)"/>
71
72 <property name="unpacked.dir" value="unpacked"/>
73
74 <property name="runtime.dir" value="runtime"/>
75 <property name="tvbrowser-default.runtime.dir" value="${runtime.dir}/tvbrowser_default"/>
76
77 <property name="tvbrowser-win.runtime.dir" value="${runtime.dir}/tvbrowser_win"/>
78 <property name="tvbrowser-linux.runtime.dir" value="${runtime.dir}/tvbrowser_linux"/>
79 <property name="tvbrowser-transportable.runtime.dir" value="${runtime.dir}/tvbrowser_transportable"/>
80 <property name="tvbrowser-nightly.runtime.dir" value="${runtime.dir}/tvbrowser_nightly"/>
81 <property name="tvbrowser-mac.runtime.dir" value="${runtime.dir}/tvbrowser_mac"/>
82 <property name="tvbrowser-macjava.runtime.dir" value="${runtime.dir}/tvbrowser_macjava"/>
83 <property name="themepacks.dir" value="themepacks"/>
84 <property name="personas.dir" value="personas"/>
85
86 <property name="deployment.dir" value="deployment" />
87 <property name="win.dir" value="${deployment.dir}/win"/>
88 <property name="linux.dir" value="${deployment.dir}/linux"/>
89 <property name="osx.dir" value="${deployment.dir}/macosx"/>
90 <property name="x11.dir" value="${deployment.dir}/x11"/>
91 <property name="installer.dir" value="${win.dir}/installer"/>
92 <property name="package-lists.dir" value="${txt.dir}/package-lists"/>
93 <property name="public.dir" value="public"/>
94 <property name="newsplugin.url" value="http://www.tvbrowser.org/data/uploads/1372016422809_543/NewsPlugin.jar"/>
95
96 <path id="sourcepath">
97 <pathelement location="${src.dir}"/>
98 </path>
99
100 <path id="classpath">
101 <pathelement location="${classes.dir}"/>
102 <fileset dir="${lib.dir}">
103 <include name="*.jar"/>
104 <exclude name="ant.jar"/>
105 </fileset>
106 </path>
107
108 <path id="docpath">
109 <path refid="sourcepath"/>
110 </path>
111
112 <path id="ant-deb.classpath">
113 <fileset dir="${deployment.dir}/linux/ant-deb-task" includes="*.jar"/>
114 </path>
115
116 <path id="ant-rpm.classpath">
117 <fileset dir="${deployment.dir}/linux/redline-rpm" includes="*.jar"/>
118 </path>
119
120 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
121 |
122 | Display all targets
123 |
124 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
125
126 <target name="targets" description="lists all the available public targets">
127 <echo message="usage: build [target]"/>
128 <echo message=""/>
129 <echo message="main targets:"/>
130 <echo message="============="/>
131 <echo message=" targets Shows this list of targets."/>
132 <echo message=" download-libs Downloads all necessary libraries from the Internet."/>
133 <echo message=" dump-info Dumps some information (VM-Version...)."/>
134 <echo message=" public-default Creates platform-independent binaries"/>
135 <echo message=" public-mac Creates binaries for the Mac OS X (requires Mac OS X)"/>
136 <echo message=" public-macjava Creates binaries for the Mac OS X with Java from Oracle (requires Mac OS X)"/>
137 <echo message=" public-linux Creates binaries for Linux platforms"/>
138 <echo message=" public-ubuntu Creates binaries for Ubuntu platforms"/>
139 <echo message=" public-fedora Creates binaries for Fedora platforms"/>
140 <echo message=" public-transportable Creates platform-independent binaries for transportable version of TV-Browser (requires Windows)"/>
141 <echo message=" public-nightly Creates platform-independent binaries for nightly transportable version of TV-Browser (without platform dependent starters)"/>
142 <echo message=" public-src Creates a .zip file containing the full source code of TV-Browser"/>
143 <echo message=" public-doc Generates the JavaDoc documentation."/>
144 <echo message=" release-packages Generates all packages needed for a TV-Browser release (without Mac version, works only under Windows)."/>
145 <echo message=""/>
146 <echo message="further targets:"/>
147 <echo message="================"/>
148 <echo message=" clean Deletes all class files, runtime directories and temporary files."/>
149 <echo message=" clean-runtime Deletes the runtime directory."/>
150 <echo message=" make-default Compiles the platform independent source code."/>
151 <echo message=" make-transportable Compiles the platform independent source code for transportable version."/>
152 <echo message=" make-linux Compiles the source code for linux platforms."/>
153 <echo message=" make-win Compiles the source code for windows platforms."/>
154 <echo message=" make-mac Compiles the source code for Mac OS X."/>
155 <echo message=" make-macjava Compiles the source code for Mac OS X with Java from Oracle."/>
156 <echo message=" runtime-default Creates the platform independent runtime directory" />
157 <echo message=" runtime-transportable Creates the platform independent runtime directory for transportable version" />
158 <echo message=" runtime-linux Creates a runtime directory for linux platforms" />
159 <echo message=" runtime-mac Creates a runtime directory for Mac OS X" />
160 <echo message=" runtime-macjava Creates a runtime directory for Mac OS X with Java from Oracle" />
161 <echo message=" runtime-win Creates a runtime directory for MS Windows" />
162 <echo message=" test Runs the JUnit tests."/>
163 </target>
164
165
166 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
167 |
168 | Clean tasks: remove files
169 |
170 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
171
172
173 <!-- Deletes the runtime director -->
174 <target name="clean">
175 <delete dir="${classes.dir}"/>
176 <delete dir="${unpacked.dir}"/>
177 <delete dir="${test.classes.dir}"/>
178 </target>
179
180
181 <!-- Deletes the classes and the runtime directory. -->
182 <target name="clean-default" depends="clean">
183 <delete dir="${tvbrowser-default.runtime.dir}"/>
184 </target>
185
186 <!-- Deletes the classes and the runtime directory. -->
187 <target name="clean-transportable" depends="clean">
188 <delete dir="${tvbrowser-transportable.runtime.dir}"/>
189 </target>
190
191 <!-- Deletes the classes and the runtime directory. -->
192 <target name="clean-win" depends="clean">
193 <delete dir="${tvbrowser-win.runtime.dir}"/>
194 </target>
195
196 <!-- Deletes the classes and the runtime directory. -->
197 <target name="clean-linux" depends="clean">
198 <delete dir="${tvbrowser-linux.runtime.dir}"/>
199 </target>
200
201 <!-- Deletes the classes and the runtime directory. -->
202 <target name="clean-mac" depends="clean">
203 <delete dir="${tvbrowser-mac.runtime.dir}"/>
204 </target>
205
206 <!-- Deletes the classes and the runtime directory. -->
207 <target name="clean-macjava" depends="clean">
208 <delete dir="${tvbrowser-macjava.runtime.dir}"/>
209 </target>
210
211 <target name="clean-all" depends="clean-mac, clean-macjava, clean-linux, clean-win, clean-default">
212 <delete dir="${public.dir}"/>
213 </target>
214
215
216
217 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
218 |
219 | Make tasks: compile the source code
220 |
221 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
222 <target name="copy-resources">
223 <copy todir="${classes.dir}">
224 <fileset dir="${src.dir}" includes="**/*.gif"/>
225 <fileset dir="${src.dir}" includes="**/*.jpg"/>
226 <fileset dir="${src.dir}" includes="**/*.png"/>
227 <fileset dir="${src.dir}" includes="**/*.dtd"/>
228 <fileset dir="${src.dir}" includes="**/*.properties"/>
229 <fileset dir="${src.dir}" includes="**/*.theme"/>
230 <fileset dir="${src.dir}" includes="**/*.csv"/>
231 </copy>
232 </target>
233
234 <!-- Compiles the platform independent source code -->
235 <target name="make-default" depends="copy-resources">
236 <echo message="Compiling the source code ... "/>
237 <mkdir dir="${classes.dir}"/>
238 <javac destdir="${classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.6" source="1.6">
239 <src>
240 <path refid="sourcepath"/>
241 </src>
242 <classpath>
243 <path refid="classpath"/>
244 </classpath>
245 </javac>
246
247
248 </target>
249
250
251 <!-- Compiles the source code for windows platforms -->
252 <target name="make-win" depends="make-default">
253
254 </target>
255
256
257 <!-- Compiles the source code for linux platforms -->
258 <target name="make-linux" depends="make-default">
259
260 </target>
261
262 <!-- Compiles the source code for transportable version of TV-Browser -->
263 <target name="make-transportable" depends="make-default">
264
265 </target>
266
267 <!-- Compiles the source code for mac platforms -->
268 <target name="make-mac" depends="copy-resources">
269 <echo message="Compiling the source code ..."/>
270 <mkdir dir="${classes.dir}"/>
271 <javac destdir="${classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.5" source="1.5">
272 <src>
273 <path refid="sourcepath"/>
274 </src>
275 <classpath>
276 <path refid="classpath"/>
277 <path location="/System/Library/Java"/>
278 </classpath>
279 </javac>
280
281 </target>
282
283 <!-- Compiles the source code for mac platforms with Java from Oracle -->
284 <target name="make-macjava" depends="copy-resources">
285 <echo message="Compiling the source code ..."/>
286 <mkdir dir="${classes.dir}"/>
287 <javac destdir="${classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.6" source="1.6">
288 <src>
289 <path refid="sourcepath"/>
290 </src>
291 <classpath>
292 <path refid="classpath"/>
293 <path location="/Library/Java/JavaVirtualMachines"/>
294 </classpath>
295 </javac>
296
297 </target>
298
299 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
300 |
301 | Runtime tasks: create runtime folders for the specified platform
302 |
303 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
304
305 <target name="mkdirs">
306 <!-- Make the TV-Browser runtime -->
307 <delete dir="${tvbrowser-default.runtime.dir}"/>
308 <mkdir dir="${tvbrowser-default.runtime.dir}"/>
309 <mkdir dir="${tvbrowser-default.runtime.dir}/plugins"/>
310 </target>
311
312 <!-- Creates the platform independent runtime folder -->
313 <target name="runtime" depends="clean-default, make-default, mkdirs">
314 <echo message="Creating the jars ..."/>
315
316 <!-- Pack the tvbrowser.jar -->
317 <jar jarfile="${tvbrowser-default.runtime.dir}/tvbrowser.jar"
318 compress="true"
319 index="true">
320 <manifest>
321 <attribute name="Main-Class" value="tvbrowser.TVBrowser"/>
322 <attribute name="SplashScreen-Image" value="splash.png"/>
323 </manifest>
324 <fileset dir="${classes.dir}" includes="tvbrowser/**"/>
325 <fileset dir="${classes.dir}" includes="devplugin/**"/>
326 <fileset dir="${classes.dir}" includes="tvdataservice/**"/>
327 <fileset dir="${classes.dir}" includes="util/**"/>
328 <fileset dir="${classes.dir}" includes="com/**"/>
329 <fileset dir="${classes.dir}/imgs" includes="splash.png"/>
330 </jar>
331
332 <!-- Copy the other stuff -->
333 <echo message="Copying the images and all the other stuff ..."/>
334 <mkdir dir="${tvbrowser-default.runtime.dir}/imgs"/>
335 <copy todir="${tvbrowser-default.runtime.dir}/imgs">
336 <fileset dir="${classes.dir}/imgs" excludes="splash.png"/>
337 </copy>
338
339 <copy todir="${tvbrowser-default.runtime.dir}/imgs">
340 <fileset dir="./images/additional">
341 <include name="*.ico"/>
342 </fileset>
343 </copy>
344
345 <mkdir dir="${tvbrowser-default.runtime.dir}/personas"/>
346 <copy todir="${tvbrowser-default.runtime.dir}/personas">
347 <fileset dir="./personas"/>
348 </copy>
349 <copy todir="${tvbrowser-default.runtime.dir}">
350 <fileset dir="${txt.dir}" includes="LICENSE.txt"/>
351 <fileset dir="${txt.dir}" includes="COPYRIGHT.txt"/>
352 <fileset dir="${deployment.dir}/common" includes="**" />
353 <!-- <fileset dir="${txt.dir}" includes="website.url"/> -->
354 <!-- <fileset dir="${txt.dir}" includes="default.properties"/> -->
355 <!-- <fileset dir="${txt.dir}" includes="osx.properties"/> -->
356 <!-- <fileset dir="${txt.dir}" includes="windows.properties"/> -->
357 <!-- <fileset dir="${txt.dir}" includes="tvbrowser.sh"/> -->
358 </copy>
359
360 <!-- Themepacks -->
361 <mkdir dir="${tvbrowser-default.runtime.dir}/themepacks"/>
362 <copy todir="${tvbrowser-default.runtime.dir}/themepacks">
363 <fileset dir="themepacks"/>
364 </copy>
365
366 <!-- Icon-Themes -->
367 <mkdir dir="${tvbrowser-default.runtime.dir}/icons"/>
368
369 <!-- Info-Icon-Themes -->
370 <mkdir dir="${tvbrowser-default.runtime.dir}/infothemes"/>
371
372 <zip destfile="${tvbrowser-default.runtime.dir}/infothemes/tvb_default.zip">
373 <zipfileset dir="images/infothemes/tvb_default"></zipfileset>
374 </zip>
375 <zip destfile="${tvbrowser-default.runtime.dir}/infothemes/tvb_colored.zip">
376 <zipfileset dir="images/infothemes/tvb_colored"></zipfileset>
377 </zip>
378
379 <zip destfile="${tvbrowser-default.runtime.dir}/icons/Tango.zip">
380 <zipfileset dir="images/themes/tango"></zipfileset>
381 </zip>
382 <zip destfile="${tvbrowser-default.runtime.dir}/icons/CrystalClear.zip">
383 <zipfileset dir="images/themes/CrystalClear"></zipfileset>
384 </zip>
385 </target>
386
387 <!-- Creates the default runtime folder (platform independent) -->
388 <target name="runtime-default" depends="clean-default, make-default, runtime">
389 </target>
390
391
392 <!-- Creates the runtime folder for the transportable version -->
393 <target name="runtime-transportable" depends="clean-transportable, make-transportable, runtime">
394 <echo message="deployment dir is ${deployment.dir}, win is ${win.dir}" />
395 <mkdir dir="${tvbrowser-transportable.runtime.dir}"/>
396 <mkdir dir="${tvbrowser-transportable.runtime.dir}/settings"/>
397 <copy todir="${tvbrowser-transportable.runtime.dir}/settings">
398 <fileset dir="${deployment.dir}" includes="packer.txt"/>
399 </copy>
400 <copy todir="${tvbrowser-transportable.runtime.dir}">
401 <fileset dir="${tvbrowser-default.runtime.dir}"/>
402 <fileset dir="${win.dir}/jRegistryKey" includes="jRegistryKey.dll" />
403 </copy>
404 </target>
405
406 <!-- Creates the runtime folder for the windows platform -->
407 <target name="runtime-win" depends="clean-win, make-win, runtime">
408 <echo message="deployment dir is ${deployment.dir}, win is ${win.dir}" />
409 <mkdir dir="${tvbrowser-win.runtime.dir}"/>
410 <copy todir="${tvbrowser-win.runtime.dir}">
411 <fileset dir="${tvbrowser-default.runtime.dir}"/>
412 <fileset dir="${win.dir}/jRegistryKey" includes="jRegistryKey.dll" />
413 <fileset dir="${deployment.dir}" includes="windows.properties"/>
414 <fileset dir="${win.dir}" includes="tvbrowser_noDD.txt"/>
415 </copy>
416
417 </target>
418
419
420 <!-- Creates the runtime folder for the Mac platform -->
421 <target name="runtime-mac" depends="clean-mac, make-mac, runtime">
422
423 <delete dir="${tvbrowser-mac.runtime.dir}"/>
424 <mkdir dir="${tvbrowser-mac.runtime.dir}"/>
425
426 <jarbundler dir="${tvbrowser-mac.runtime.dir}"
427 verbose="false"
428 name="TV-Browser"
429 icon="./images/additional/tvbrowser.icns"
430 mainclass="tvbrowser.TVBrowser"
431 extraclasspath="/System/Library/Java"
432 jvmversion="1.6+"
433 vmoptions="-Dpropertiesfile=osx.properties -Xmx256m"
434 bundleid="org.tvbrowser"
435 smalltabs="true"
436 antialiasedgraphics="true"
437 antialiasedtext="true"
438 liveresize="true"
439 growboxintrudes="false"
440 screenmenu="true"
441 developmentregion="Global"
442 version="${tvbrowser.version}"
443 workingdirectory="$APP_PACKAGE/Contents/Resources"
444 jars="${tvbrowser-default.runtime.dir}/tvbrowser.jar">
445 <resourcefileset dir="${tvbrowser-default.runtime.dir}">
446 <exclude name="tvbrowser.jar"/>
447 </resourcefileset>
448 </jarbundler>
449
450 <copy todir="${tvbrowser-mac.runtime.dir}/TV-Browser.app/Contents/Resources">
451 <fileset dir="${deployment.dir}" includes="osx.properties"/>
452 </copy>
453
454 </target>
455
456 <!-- Creates the runtime folder for the Mac platform with Java from Oracle->
457 <target name="runtime-macjava" depends="clean-macjava, make-macjava, runtime, test"-->
458 <target name="runtime-macjava" depends="clean-macjava, make-macjava, runtime">
459
460 <!-- Creates an .app file for Mac OS X with appbundler for Java SE 7+ from infinitekind -->
461 <taskdef name="appbundler"
462 classpath="deployment/macosx7/appbundler-1.0ea.jar"
463 classname="com.oracle.appbundler.AppBundlerTask" />
464
465 <!--runtime dir="${env.JAVA_HOME}"/-->
466
467 <delete dir="${tvbrowser-macjava.runtime.dir}"/>
468 <mkdir dir="${tvbrowser-macjava.runtime.dir}"/>
469
470 <appbundler
471 outputdirectory="${tvbrowser-macjava.runtime.dir}"
472 name="TV-Browser"
473 icon="images/additional/tvbrowser.icns"
474 displayname="TV-Browser"
475 identifier="tvbrowser.TVBrowser"
476 shortversion="${tvbrowser.version}"
477 applicationCategory="public.app-category.entertainment"
478 workingDirectory="$APP_ROOT/Contents/Resources"
479 mainclassname="tvbrowser.TVBrowser"
480 highResolutionCapable="false">
481 <classpath dir="${tvbrowser-default.runtime.dir}">
482 <include name="*.jar"/>
483 </classpath>
484 <!-- OSX specific options, optional -->
485 <option value="-Dpropertiesfile=osx.properties"/>
486 <option value="-Dapple.laf.useScreenMenuBar=true"/>
487 <option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
488 <!--option value="-Dcom.apple.macos.useScreenMenuBar=true"/-->
489 <option value="-Dcom.apple.mrj.application.apple.menu.about.name=${bundle.name}"/>
490 <option value="-Dcom.apple.smallTabs=true"/>
491 <option value="-Xmx1024M"/>
492 </appbundler>
493
494 <copy todir="${tvbrowser-macjava.runtime.dir}/TV-Browser.app/Contents/Resources">
495 <fileset dir="${tvbrowser-default.runtime.dir}" excludes="tvbrowser.jar"/>
496 </copy>
497 <copy todir="${tvbrowser-macjava.runtime.dir}/TV-Browser.app/Contents/Resources">
498 <fileset dir="${deployment.dir}" includes="osx.properties"/>
499 </copy>
500
501 </target>
502
503
504 <!-- Creates the desktop entry file for Linux platforms -->
505 <target name="tvbrowser-desktop-entry">
506 <desktopEntry
507 toFile="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop"
508 name="TV-Browser"
509 icon="imgs/tvbrowser128.png"
510 exec="tvbrowser.sh"
511 tryExec="tvbrowser.sh"
512 categories="Video;AudioVideo;TV"
513 type="Application"
514 >
515 <name lang="de" value="${programname}"/>
516 <genericName value="Digital TV Guide"/>
517 <genericName lang="de" value="Digitale TV-Zeitschrift"/>
518 <comment value="Themeable and easy to use TV Guide - written in Java"/>
519 <comment lang="de" value="Anpassbare und einfach zu benutzende TV-Zeitschrift - geschrieben in Java"/>
520 </desktopEntry>
521 <echo file="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop" append="true">StartupWMClass=tvbrowser-TVBrowser</echo>
522 </target>
523
524 <!-- Creates the desktop entry file for Ubuntu platform -->
525 <target name="tvbrowser-desktop-entry-deb">
526 <desktopEntry
527 toFile="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop"
528 name="${programname}"
529 icon="/usr/share/tvbrowser/imgs/tvbrowser128.png"
530 exec="tvbrowser"
531 categories="Video;AudioVideo;TV"
532 type="Application"
533 comment="Easy to use TV Guide - written in Java"
534 >
535 <name lang="de" value="${programname}"/>
536 <genericName value="Digital TV Guide"/>
537 <genericName lang="de" value="Digitale TV-Zeitschrift"/>
538 <comment value="Themeable and easy to use TV Guide - written in Java"/>
539 <comment lang="de" value="Anpassbare und einfach zu benutzende TV-Zeitschrift - geschrieben in Java"/>
540 </desktopEntry>
541 <echo file="${tvbrowser-linux.runtime.dir}/tvbrowser.desktop" append="true">StartupWMClass=tvbrowser-TVBrowser</echo>
542 </target>
543
544 <!-- Creates the runtime folder for linux platforms -->
545 <target name="runtime-linux" depends="clean-linux, make-linux, runtime">
546 <delete dir="${tvbrowser-linux.runtime.dir}"/>
547 <mkdir dir="${tvbrowser-linux.runtime.dir}"/>
548 <copy todir="${tvbrowser-linux.runtime.dir}">
549 <fileset dir="${tvbrowser-default.runtime.dir}"/>
550 <fileset dir="${deployment.dir}" includes="linux.properties"/>
551 <fileset dir="${linux.dir}" includes="tvbrowser.sh"/>
552 <!-- <fileset dir="${linux.dir}" includes="tvbrowser.desktop"/>-->
553 </copy>
554 <chmod perm="u+x" file="${tvbrowser-linux.runtime.dir}/tvbrowser.sh"/>
555 </target>
556
557 <target name="release-packages" depends="public-linux, public-ubuntu, public-fedora, public-default, public-doc, public-src"/>
558
559 <!-- Creates the release binaries (.zip) for the platform independent TV-Browser version -->
560 <target name="public-default" depends="runtime-default" description="creates platform-independent binaries">
561 <mkdir dir="${public.dir}"/>
562
563 <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_bin.zip">
564 <zipfileset prefix="tvbrowser-${tvbrowser.version}"
565 dir="${tvbrowser-default.runtime.dir}"/>
566 </zip>
567 </target>
568
569 <target name="clean-public">
570 <delete>
571 <fileset dir="${public.dir}" includes="**/*"/>
572 </delete>
573 </target>
574
575 <target name="public-nightly" depends="clean-public,runtime-transportable" description="Creates platform-independent binaries for nightly transportable version of TV-Browser (without platform dependent starters)">
576 <mkdir dir="${public.dir}"/>
577
578 <tstamp>
579 <format property="TODAY" pattern="yyyy-MM-dd"/>
580 </tstamp>
581
582 <echo file="${tvbrowser-transportable.runtime.dir}/NIGHTLY_VALUES" append="false">${TODAY}-nightly</echo>
583
584 <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_${TODAY}_nightly_bin_transportable.zip">
585 <zipfileset prefix="tvbrowser-nightly-transportable" dir="${tvbrowser-transportable.runtime.dir}"/>
586 </zip>
587
588 </target>
589
590 <target name="public-ubuntu" depends="runtime-linux, tvbrowser-desktop-entry-deb" description="Creates binaries for Ubuntu platforms">
591 <mkdir dir="${public.dir}"/>
592
593 <deb
594 todir="${public.dir}"
595 package="tvbrowser"
596 section="utils"
597 depends="sun-java6-jre | openjdk-6-jre | sun-java7-jre | openjdk-7-jre | openjdk-8-jre | default-jre | java6-runtime | java7-runtime | java8-runtime "
598 recommends="openjdk-6-jre">
599
600 <version upstream="${tvbrowser.version}"/>
601 <maintainer name="TV-Browser team" email="dev@×××××××××.org"/>
602
603 <!-- do not indent the description, otherwise the indent will be visible in the package manager and other tools -->
604 <description synopsis="Digital TV Guide">Themeable and easy to use TV Guide - written in Java.</description>
605
606 <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="usr/share/tvbrowser">
607 <include name="imgs/**"/>
608 <include name="plugins/**"/>
609 <include name="themepacks/**"/>
610 <include name="infothemes/**"/>
611 <exclude name="tvbrowser.sh"/>
612 <exclude name="tvbrowser.desktop"/>
613 <include name="*"/>
614 </tarfileset>
615
616 <tarfileset dir="${tvbrowser-linux.runtime.dir}/personas" prefix="usr/share/tvbrowser/personas" />
617
618 <tarfileset dir="${tvbrowser-linux.runtime.dir}/icons" prefix="usr/share/tvbrowser/icons">
619 <include name="*"/>
620 </tarfileset>
621 <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="usr/share/tvbrowser" filemode="755" includes="**/tvbrowser.sh" />
622 <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="usr/share/applications" includes="**/tvbrowser.desktop"/>
623 <tarfileset dir="${deployment.dir}/linux"
624 prefix="usr/bin"
625 filemode="755" includes="**/tvbrowser" />
626 </deb>
627 </target>
628
629 <target name="public-fedora" depends="runtime-linux, tvbrowser-desktop-entry-deb" description="Creates binaries for RedHat platforms">
630 <mkdir dir="${public.dir}"/>
631
632 <rrpm
633 destination="${public.dir}"
634 name="tvbrowser"
635 version="${tvbrowser.version}"
636 group="Java">
637
638 <zipfileset dir="${tvbrowser-linux.runtime.dir}" prefix="/usr/share/tvbrowser">
639 <include name="imgs/**"/>
640 <include name="plugins/**"/>
641 <include name="themepacks/**"/>
642 <include name="infothemes/**"/>
643 <exclude name="tvbrowser.sh"/>
644 <exclude name="tvbrowser.desktop"/>
645 <include name="*"/>
646 </zipfileset>
647
648 <zipfileset dir="${tvbrowser-linux.runtime.dir}/personas" prefix="/usr/share/tvbrowser/personas" />
649
650 <zipfileset dir="${tvbrowser-linux.runtime.dir}/icons" prefix="/usr/share/tvbrowser/icons">
651 <include name="*"/>
652 </zipfileset>
653 <zipfileset dir="${tvbrowser-linux.runtime.dir}" prefix="/usr/share/tvbrowser" filemode="755" includes="**/tvbrowser.sh" />
654 <zipfileset dir="${tvbrowser-linux.runtime.dir}" prefix="/usr/share/applications" includes="**/tvbrowser.desktop"/>
655 <zipfileset dir="${deployment.dir}/linux"
656 prefix="/usr/bin"
657 filemode="755" includes="**/tvbrowser" />
658 <depends name="java" version="1.6"/>
659 </rrpm>
660 </target>
661
662 <!-- Creates the release binaries (.tar.gz) for linux platforms -->
663 <target name="public-linux" depends="runtime-linux, tvbrowser-desktop-entry" description="Creates binaries for Linux platforms">
664 <mkdir dir="${public.dir}"/>
665
666 <tar tarfile="${public.dir}/tvbrowser_${tvbrowser.version}_bin.tar.gz" compression="gzip">
667 <tarfileset dir="${tvbrowser-linux.runtime.dir}" prefix="tvbrowser-${tvbrowser.version}" excludes="**/tvbrowser.sh"/>
668 <tarfileset dir="${tvbrowser-linux.runtime.dir}"
669 prefix="tvbrowser-${tvbrowser.version}"
670 mode="755" includes="**/tvbrowser.sh" />
671 </tar>
672
673 </target>
674
675 <!--
676 | Does the JUnit s.
677 |
678 | If this target does not work, copy the file "junit.jar" from the directory "lib"
679 | in your ANT_HOME/lib directory. (ANT_HOME/lib is on my machine "/usr/share/ant/lib")
680 +-->
681 <target name="test" depends="make-default">
682 <echo>${ant.version}. JUnit4 tests will only work with Ant>=1.7</echo>
683 <mkdir dir="${test.classes.dir}"/>
684 <javac destdir="${test.classes.dir}" debug="${debug}" deprecation="true" encoding="UTF-8" target="1.5" source="1.5">
685 <src>
686 <path path="${test.src.dir}"/>
687 </src>
688 <classpath>
689 <path refid="classpath"/>
690 </classpath>
691 </javac>
692
693 <copy todir="${test.classes.dir}">
694 <fileset dir="${test.src.dir}" includes="**/*.gif"/>
695 <fileset dir="${test.src.dir}" includes="**/*.jpg"/>
696 <fileset dir="${test.src.dir}" includes="**/*.png"/>
697 <fileset dir="${test.src.dir}" includes="**/*.dtd"/>
698 <fileset dir="${test.src.dir}" includes="**/*.properties"/>
699 <fileset dir="${test.src.dir}" includes="**/*.theme"/>
700 <fileset dir="${test.src.dir}" includes="**/*.txt"/>
701 </copy>
702
703
704 <junit haltonfailure="yes" fork="no" >
705 <classpath>
706 <path refid="classpath"/>
707 <path path="${test.classes.dir}"/>
708 </classpath>
709
710 <formatter type="brief" usefile="false"/>
711
712 <batchtest>
713 <fileset dir="${test.src.dir}">
714 <include name="**/*Test.java"/>
715 </fileset>
716 </batchtest>
717 </junit>
718 </target>
719
720
721 <!--
722 | Generates the JavaDoc documentation.
723 +-->
724 <target name="public-doc" description="Generates the JavaDoc documentation">
725 <echo message="Generating JavaDoc documentation ..." />
726 <delete dir="${doc.dir}"/>
727 <mkdir dir="${doc.dir}"/>
728 <javadoc packagenames="*"
729 sourcepathref="docpath"
730 classpathref="classpath"
731 destdir="${doc.dir}"
732 doctitle="${doc.title}"
733 windowtitle="${doc.title}"
734 additionalparam="-breakiterator"
735 header="${doc.header}"
736 bottom="${doc.bottom}"
737 access="package"
738 failonerror="false"
739 encoding="UTF-8"
740 charset="UTF-8"
741 docencoding="UTF-8">
742 <link offline="true"
743 href="${java-api-location}"
744 packagelistLoc="${package-lists.dir}/jdk/"/>
745 </javadoc>
746
747
748 <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_doc.zip">
749 <zipfileset prefix="tvbrowser_v${tvbrowser.version}/doc"
750 dir="${doc.dir}"/>
751 </zip>
752
753 </target>
754
755 <!--
756 | Dump some information.
757 +-->
758 <target name="dump-info">
759 <echo message="JAVA_HOME=${env.JAVA_HOME}" />
760 <echo message="java.vm.info=${java.vm.info}" />
761 <echo message="java.vm.name=${java.vm.name}" />
762 <echo message="java.vm.vendor=${java.vm.vendor}" />
763 <echo message="java.vm.version=${java.vm.version}" />
764 <echo message="os.arch=${os.arch}" />
765 <echo message="os.name=${os.name}" />
766 <echo message="os.version=${os.version}" />
767 <echo message="file.encoding=${file.encoding}" />
768 <echo message="user.language=${user.language}" />
769 </target>
770
771
772
773
774 <target name="public-src" description="Creates a .zip file containing the full source code of TV-Browser">
775 <mkdir dir="${public.dir}"/>
776 <zip destfile="${public.dir}/tvbrowser_${tvbrowser.version}_src.zip">
777 <zipfileset prefix="tvbrowser-${tvbrowser.version}"
778 dir=".">
779
780 <exclude name="${classes.dir}/**" />
781 <exclude name="${public.dir}/**" />
782 <exclude name="${runtime.dir}/**" />
783 <exclude name="${unpacked.dir}/**" />
784
785 </zipfileset>
786 </zip>
787 </target>
788
789
790 <!-- - - - - - - - - - - - - - - - - -
791 internal target: download-zipped-lib
792 - - - - - - - - - - - - - - - - - -->
793 <target name="download-zipped-lib">
794
795 <macrodef name="propertycopy">
796 <attribute name="name"/>
797 <attribute name="from"/>
798 <sequential>
799 <property name="@{name}" value="${@{from}}"/>
800 </sequential>
801 </macrodef>
802
803 <propertycopy name="lib.url" from="lib.${lib}.url"/>
804 <propertycopy name="lib.name" from="lib.${lib}.name"/>
805 <propertycopy name="lib.version" from="lib.${lib}.version"/>
806
807 <get dest="${lib.dir}/download.zip" src="${lib.url}"/>
808 <unzip src="${lib.dir}/download.zip" dest="${lib.dir}/download">
809 <patternset>
810 <include name="**/${lib.name}*.jar"/>
811 </patternset>
812 <flattenmapper/>
813 </unzip>
814 <copy todir="${lib.dir}" verbose="true" overwrite="true">
815 <fileset dir="${lib.dir}/download">
816 <include name="${lib.name}.jar"/>
817 <include name="${lib.name}-?.?.jar"/>
818 <include name="${lib.name}-?.?.?.jar"/>
819 <include name="${lib.name}-?.?.??.jar"/>
820 <include name="${lib.name}-r*.jar"/>
821 </fileset>
822 <mapper>
823 <mergemapper to="${lib.name}-${lib.version}.jar"/>
824 </mapper>
825 </copy>
826 <delete dir="${lib.dir}/download"/>
827 </target>
828
829 <!-- - - - - - - - - - - - - - - - - -
830 internal target: download-tarred-lib
831 - - - - - - - - - - - - - - - - - -->
832 <target name="download-tarred-lib">
833 <macrodef name="propertycopy">
834 <attribute name="name"/>
835 <attribute name="from"/>
836 <sequential>
837 <property name="@{name}" value="${@{from}}"/>
838 </sequential>
839 </macrodef>
840
841 <propertycopy name="lib.url" from="lib.${lib}.url"/>
842 <propertycopy name="lib.name" from="lib.${lib}.name"/>
843 <propertycopy name="lib.version" from="lib.${lib}.version"/>
844
845 <get dest="${lib.dir}/download.tar.gz" src="${lib.url}"/>
846 <gunzip src="${lib.dir}/download.tar.gz"/>
847 <untar src="${lib.dir}/download.tar" dest="${lib.dir}/download">
848 <patternset>
849 <include name="**/${lib.name}*.jar"/>
850 </patternset>
851 <flattenmapper/>
852 </untar>
853 <copy todir="${lib.dir}" verbose="true" overwrite="true">
854 <fileset dir="${lib.dir}/download">
855 <include name="${lib.name}.jar"/>
856 <include name="${lib.name}-?.?.jar"/>
857 <include name="${lib.name}-?.?.?.jar"/>
858 <include name="${lib.name}-?.?.??.jar"/>
859 </fileset>
860 <mapper>
861 <mergemapper to="${lib.name}-${lib.version}.jar"/>
862 </mapper>
863 </copy>
864 <delete dir="${lib.dir}/download"/>
865 </target>
866
867 <!-- - - - - - - - - - - - - - - - - -
868 internal target: download-lib
869 - - - - - - - - - - - - - - - - - -->
870 <target name="download-lib">
871 <macrodef name="propertycopy">
872 <attribute name="name"/>
873 <attribute name="from"/>
874 <sequential>
875 <property name="@{name}" value="${@{from}}"/>
876 </sequential>
877 </macrodef>
878
879 <propertycopy name="lib.url" from="lib.${lib}.url"/>
880 <propertycopy name="lib.name" from="lib.${lib}.name"/>
881 <propertycopy name="lib.version" from="lib.${lib}.version"/>
882
883 <get dest="${lib.dir}/${lib.name}-${lib.version}.jar" src="${lib.url}"/>
884 </target>
885
886 <target name="download-libs" description="downloads all necessary library files">
887 <mkdir dir="${lib.dir}"/>
888
889 <!-- bsh -->
890 <antcall target="download-lib">
891 <param name="lib" value="bsh"/>
892 </antcall>
893
894 <!-- commons codec -->
895 <antcall target="download-zipped-lib">
896 <param name="lib" value="commons.codec"/>
897 </antcall>
898
899 <!-- commons lang -->
900 <antcall target="download-zipped-lib">
901 <param name="lib" value="commons.lang"/>
902 </antcall>
903
904 <!-- commons net -->
905 <antcall target="download-zipped-lib">
906 <param name="lib" value="commons.net"/>
907 </antcall>
908
909 <!-- htmlparser -->
910 <antcall target="download-zipped-lib">
911 <param name="lib" value="htmlparser"/>
912 </antcall>
913
914 <!-- jgoodies common -->
915 <antcall target="download-zipped-lib">
916 <param name="lib" value="jgoodies-common"/>
917 </antcall>
918
919 <!-- jgoodies forms -->
920 <antcall target="download-zipped-lib">
921 <param name="lib" value="jgoodies-forms"/>
922 </antcall>
923
924 <!-- jgoodies looks -->
925 <antcall target="download-zipped-lib">
926 <param name="lib" value="jgoodies-looks"/>
927 </antcall>
928
929 <!-- jRegistryKey -->
930 <antcall target="download-zipped-lib">
931 <param name="lib" value="jregistrykey"/>
932 </antcall>
933
934 <!-- l2prod common tasks -->
935 <antcall target="download-zipped-lib">
936 <param name="lib" value="tasks"/>
937 </antcall>
938
939 <!-- opencsv -->
940 <antcall target="download-tarred-lib">
941 <param name="lib" value="opencsv"/>
942 </antcall>
943
944 <!-- skinlf -->
945 <antcall target="download-zipped-lib">
946 <param name="lib" value="skinlf"/>
947 </antcall>
948
949 <!-- stax -->
950 <antcall target="download-lib">
951 <param name="lib" value="stax"/>
952 </antcall>
953 <antcall target="download-lib">
954 <param name="lib" value="stax.api"/>
955 </antcall>
956
957 <!-- substance -->
958 <antcall target="download-lib">
959 <param name="lib" value="substance"/>
960 </antcall>
961
962 <!-- texhyphj -->
963 <antcall target="download-zipped-lib">
964 <param name="lib" value="texhyphj"/>
965 </antcall>
966
967 <!-- trident -->
968 <antcall target="download-lib">
969 <param name="lib" value="trident"/>
970 </antcall>
971
972 <delete dir="${lib.dir}">
973 <patternset>
974 <include name="*.zip"/>
975 <include name="*.tar.gz"/>
976 <include name="*.tar"/>
977 </patternset>
978 </delete>
979 </target>
980 <target name="public-tvdatakit"></target>
981
982 </project>