~gryle-devel/gryle/trunk-deleted

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
<?xml version="1.0" encoding="UTF-8"?>

<!--
 Gryle MP3 player
 Copyright (C) 2007  Chris Lamb, Richard Warburton, Daniel Watkins.
  
 Homepage: https://launchpad.net/gryle

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License along
 with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
	
<project name="gryle" basedir="." default="run">
	<description>
		Builds the Gryle MP3 player.
	</description>

	<property name="distprefix"  value="gryle-0.1"/>
    <property name="src"         location="src"/>
	<property name="bin"         location="bin"/>
	<property name="dist"        location="dist"/>
	<property name="lib"         location="lib"/>
	<property name="javadoc"     location="javadoc"/>
	<property name="plugins"     location="plugins"/>
	<property name="classes"     location="uk/org/wuglug/gryle"/>
	
	<property name="mainclass"   value="uk.org.wuglug.gryle.Main"/>
	<property name="debug"       value="true"/>
	<property name="debuglevel"  value="source,lines,vars"/>
	<property name="source"      value="1.5"/>
	<property name="target"      value="1.5"/>
	
	<!-- Clean -->
    <target name="clean">
		<delete dir="${bin}"/>
		<delete dir="${javadoc}"/>
		<delete dir="${dist}"/>
	</target>

    <!-- Build -->
    <target name="build" depends="plugins,mainbuild" description="Build All"/>

	<!-- Builds the Gryle plugin -->
    <target name="mainbuild" depends="" description="Builds the main Gryle program">
		<mkdir dir="${bin}"/>
        <javac debug="${debug}" debuglevel="${debuglevel}" destdir="${bin}" source="${source}" target="${target}">
			<src path="${src}"/>
			<classpath>
				<fileset dir="${lib}">
					<include name="*.jar"/>
				</fileset>
			</classpath>
        </javac>    	
    </target>

	<!-- Build plugins -->
	<target name="plugins" depends="mainbuild" description="Builds Gryle plugins">
		<mkdir dir="${bin}/plugins"/>
		<javac debug="${debug}" debuglevel="${debuglevel}"
           destdir="${bin}/plugins" source="${source}" target="${target}">
			<src path="${plugins}"/>
			<classpath path="${bin}"/>
		</javac>
	</target>
		
	<!-- Run -->
	<target name="run" depends="jars" description="Run Gryle">
		<java classname="${mainclass}" fork="true">
			<classpath>
    			<pathelement location="${dist}/gryle.jar"/>
				<fileset dir="${lib}">
					<include name="*.jar"/>
				</fileset>
			</classpath>
		</java>
	</target>

	<!-- Javadoc -->
	<target name="javadoc" description="Generate documentation">
		<mkdir dir="${javadoc}"/>
		<javadoc destdir="${javadoc">
			<packageset dir="${src}" includes="${classes}"/>
		</javadoc>
	</target>

	<!-- Jars -->
	<target name="jars" depends="build, plugins" description="Creates JAR files">
		<mkdir dir="${dist}"/>
		<jar destfile="${dist}/gryle.jar" basedir="${bin}">
			<manifest>
				<attribute name="Main-Class" value="${mainclass}"/>
			</manifest>
		</jar>
	</target>

	<!-- Dist -->
	<target name="dist" depends="clean, jars" description="Generate distribution tarballs">
        <tar destfile="${dist}/gryle.tar">
            <tarfileset dir="." prefix="${distprefix}">
                <include name="COPYING"/>
				<include name="TODO"/>
			</tarfileset>
			<tarfileset dir="contrib" prefix="${distprefix}">
				<include name="gryle.bat"/>
				<include name="gryle"/>
			</tarfileset>
		    <tarfileset dir="${dist}" prefix="${distprefix}">
	            <include name="*.jar"/>
	        </tarfileset>
		</tar>
		<gzip src="${dist}/gryle.tar" destfile="${dist}/${distprefix}.tar.gz"/>
		<delete file="${dist}/gryle.tar"/>
		<delete dir="${bin}"/>
	</target>
	
</project>