Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 156 → Rev 157

/programy/Java/AVRcamVIEW/build.win32.xml
0,0 → 1,132
<project basedir="." default="jar">
 
<echo message="*********************************************"/>
<echo message="** ${ant.version} "/>
<echo message="** Ant Java Version: ${ant.java.version} "/>
<echo message="** Java VM Version: ${java.vm.version} "/>
<echo message="*********************************************"/>
 
<tstamp>
<format property="TODAY" pattern="MM/dd/yyyy hh:mm:ss"/>
</tstamp>
 
<property name="build.major" value="01"/>
<property name="build.minor" value="07"/>
<property name="src" location="src"/>
<property name="classes" location="classes"/>
<property name="doc" location="doc"/>
<property name="debug" value="off"/>
 
<!--
the comm.jar file can point to either of the linux or win32 versions..
the API is the same, but the implementation is different
-->
<property name="comm.jar" location="lib/win32/comm.jar"/>
<property name="jdom.jar" location="lib/jdom.jar"/>
<!-- <property name="jdom.jar" location="F:/java/lib/jdom-1.0/build/jdom.jar"/> -->
<property name="jar.file" value="AVRcamVIEW.jar"/>
<property name="jar.main.class" value="avr.swing.JAVRCamFrame"/>
<property name="build.property.file" value="avr.properties"/>
<property name="build.property.file.location" location="${classes}/avr/resource/${build.property.file}"/>
<property name="javac.source" value="${ant.java.version}"/>
<property name="javac.target" value="${ant.java.version}"/>
 
<filterset id="build.properties">
<filter token="DATE" value="${TODAY}"/>
<filter token="MAJOR" value="${build.major}"/>
<filter token="MINOR" value="${build.minor}"/>
</filterset>
 
<condition property="isWin32">
<os family="windows"/>
</condition>
 
<target name="testOS" unless="isWin32">
<fail message="This build can only run on Windows Platforms"/>
</target>
 
<target name="init" depends="testOS">
<mkdir dir="${classes}"/>
<mkdir dir="${doc}"/>
</target>
<target name="check-uptodate">
<uptodate property="src-uptodate" targetfile="${build.property.file.location}">
<srcfiles dir="${src}" includes="avr/**"/>
</uptodate>
</target>
 
<target name="compile" depends="init,check-uptodate" unless="src-uptodate">
<javac source="${javac.source}"
target="${javac.target}"
srcdir="${src}"
destdir="${classes}"
debug="${debug}"
optimize="yes"
listfiles="yes">
 
<!-- if compiling with JDK 1.4 or lessor, the following line MUST be uncommented
because the JNewColorMapPanel contains JDK 5.0 specific code. -->
<!-- <exclude name="**/JNewColorMapPanel.java"/> -->
 
<classpath>
<pathelement location="${comm.jar}"/>
<pathelement location="${jdom.jar}"/>
</classpath>
<!-- print all warnings -->
<!-- <compilerarg value="-Xlint"/> -->
</javac>
<copy todir="${classes}" overwrite="yes">
<filterset refid="build.properties"/>
<fileset dir="${src}">
<include name="**/*.properties*"/>
</fileset>
</copy>
</target>
 
<target name="doc" depends="compile">
<javadoc destdir="${doc}" sourcepath="${src}" packagenames="avr.*">
<link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
<classpath path="${classes}"/>
</javadoc>
</target>
 
<target name="jar" depends="compile">
<jar destfile="${jar.file}" basedir="${classes}" includes="avr/**">
<manifest>
<attribute name="Main-Class" value="${jar.main.class}"/>
</manifest>
</jar>
</target>
 
<target name="zip-src">
<tar compression="gzip" destfile="AVRcamVIEW-${build.major}.${build.minor}.tar.gz">
<tarfileset dir="${src}" prefix="src">
<include name="**/*.java"/>
<include name="**/*.properties"/>
<exclude name="**/*CVS*"/>
</tarfileset>
<tarfileset dir=".">
<include name="*.xml" />
<include name="AVRcamVIEW.sh" />
<include name="AVRcam.spec" />
</tarfileset>
</tar>
</target>
 
<target name="clean" depends="clean-classes, clean-doc, clean-jar"> </target>
 
<target name="clean-classes">
<delete dir="${classes}"/>
</target>
 
<target name="clean-doc">
<delete dir="${doc}"/>
</target>
 
<target name="clean-jar">
<delete file="${jar.file}"/>
</target>
 
<target name="rebuild-all" depends="clean, jar" />
 
</project>