build.xml
changeset 0 e0dbaef72362
child 2 f4add19ab159
new file mode 100644
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<project name="Schach" basedir="." default="jar">
+	<property name="project" value="Schach" />
+	<property name="package.name" value="org.homelinux.largo" />
+	<property name="package.dir" value="org/homelinux/largo" />
+	<property name="jar.file" value="bin/games.jar" />
+	<property name="classpath.dir" value="/usr/local/lib/classes" />
+	<property name="www.dir" value="/var/www/localhost/htdocs/classes" />
+	<property name="docs.dir" value="docs/" />
+	<property name="debug" value="simu" />
+
+	<property name="distributable.exts"
+		value="**/*.class,**/*.gif,**/*.html,**/*.jar,**/*.jnlp,**/*.jpg,**/*.png" />
+	<path id="Schach.classpath">
+		<pathelement location="." />
+	</path>
+
+	<!-- Targets -->
+	<target name="clean">
+		<echo
+			message="deleting all class- and jar-files  in ${package.dir} tree" />
+		<delete>
+			<fileset dir="${package.dir}" includes="**/*.class" />			
+		</delete>
+
+		<delete file="${jar.file}" />
+	</target>
+
+	<target name="docs"
+	    depends="compile,docs-init"
+    	description="Generate JavaDocs.">
+
+    <javadoc destdir="${docs.dir}"
+        author="true"
+        version="true"
+        use="true"
+        windowtitle="${ant.project.name}"
+        sourcepathref="Schach.classpath"
+        packagenames="org.*"
+        verbose="false">
+        <doctitle><![CDATA[<h1>${ant.project.name}</h1>]]></doctitle>
+        <bottom>
+            <![CDATA[<i>Developed by Largo Enterprises in 2008</i>]]>
+        </bottom>
+    </javadoc>
+
+	</target>
+		<target name="docs-init">
+		    <mkdir dir="${docs.dir}"/>
+		</target>
+
+	<target name="docs-clean">
+    	<delete dir="${docs.dir}"/>
+	</target>
+
+	<target name="compile">
+		<echo message="compiling ${package.dir} tree." />
+		<javac source="1.5" target="1.5" srcdir="${package.dir}"
+			sourcepath="${basedir}" debug="on">
+			<classpath refid="Schach.classpath" />
+		</javac>
+	</target>
+
+	<target name="jar" depends="compile">
+		<property environment="env" />
+		<jar destfile="${jar.file}" basedir="${basedir}"
+			includes="org/ images/" 
+			manifest="schach.manifest" />
+	</target>
+
+	<target name="post" depends="jar">
+		<signjar jar="${jar.file}" alias="largo" storepass="${env.jsp}" />
+		<copy file="${jar.file}" todir="${www.dir}"/>
+	</target>
+
+	<target name="debug" depends="compile">
+		<java classname="org.homelinux.largo.schach.Schach"
+			failonerror="true" fork="yes">
+			<classpath refid="Schach.classpath" />
+			<arg line="${debug}" />
+		</java>
+	</target>
+
+	<target name="checkers" depends="compile">
+		<java classname="org.homelinux.largo.checkers.Checkers"
+			failonerror="true" fork="yes">
+			<classpath refid="Schach.classpath" />
+			<arg line="${debug}" />
+		</java>
+	</target>
+</project>