Merging B-1_9_1 back to head
This commit is contained in:
171
build.xml
171
build.xml
@@ -3,7 +3,7 @@
|
||||
Feb 4, 2005 1:23:05 PM
|
||||
|
||||
Ant build file for JACOB.
|
||||
Tested on Eclipse 3.0.0 and Ant 1.6.1, with MS Visual C++ 6.0
|
||||
Tested on Eclipse 3.0.1 and Ant 1.6.1, with MS Visual C++ 6.0
|
||||
|
||||
Eclipse users are pretty lucky. This works with the version of ANT
|
||||
that comes with Eclipse 3.0.1 (maybe 3.0.0). The whole project
|
||||
@@ -33,18 +33,23 @@
|
||||
=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^=^ -->
|
||||
|
||||
<property name="application.title" value="JACOB : Java COM Bridge" />
|
||||
<property name="application.vendor" value="http://jacob-project.sourceforge.net, created by Dan Adler (http://danadler.com)" />
|
||||
<property name="install.dir" value="${basedir}/release" />
|
||||
<property name="application.vendor" value="http://jacob-project.sourceforge.net" />
|
||||
<property name="java.src.mainpackage" value="com.jacob" />
|
||||
<property name="java.class.main" value="com.jacob.com.Jacob" />
|
||||
<property name="generated_jar" value="jacob.jar" />
|
||||
<property name="generated_dll" value="jacob.dll" />
|
||||
<property name="generated_zip" value="jacob_${version}" />
|
||||
|
||||
<property name="jacob_java.src" value="${basedir}/src" />
|
||||
<property name="jacob_java.samples" value="${basedir}/samples" />
|
||||
<property name="jacob_java.unittest" value="${basedir}/unittest" />
|
||||
<property name="jacob_java.bin" value="${install.dir}" />
|
||||
<property name="jacob_cpp.src" value="${basedir}/jni" />
|
||||
<property name="jacob_cpp.bin" value="${install.dir}/jni" />
|
||||
|
||||
<property name="jacob.jar" value="${install.dir}/jacob.jar" />
|
||||
<property name="jacob.dll" value="${install.dir}/jacob.dll" />
|
||||
<property name="install.dir" value="${basedir}\release" />
|
||||
<property name="java.src" value="${basedir}/src" />
|
||||
<property name="java.samples" value="${basedir}/samples" />
|
||||
<property name="java.unittest" value="${basedir}/unittest" />
|
||||
<property name="java.bin" value="${install.dir}" />
|
||||
<property name="cpp.src" value="${basedir}/jni" />
|
||||
<property name="cpp.bin" value="${install.dir}/jni" />
|
||||
|
||||
<property name="jarfile_fullpath" value="${install.dir}\${generated_jar}" />
|
||||
<property name="dll_fullpath" value="${install.dir}\${generated_dll}" />
|
||||
|
||||
<property name="compiler" value="${MSDEVDIR}\bin\cl.exe" />
|
||||
<property name="linker" value="${MSDEVDIR}\bin\link.exe" />
|
||||
@@ -52,9 +57,9 @@
|
||||
<!-- =================================
|
||||
target: default
|
||||
================================= -->
|
||||
<target name="default" depends="createDirectoryStructure,jacob_java_jar_bin,jacob_c_dll">
|
||||
<target name="default" depends="createDirectoryStructure,java_jar_bin,c_dll">
|
||||
|
||||
<echo message="Jacob ${version} build ${build.iteration} : finished on ${build.date}" />
|
||||
<echo message="${application.title} ${version} build ${build.iteration} : finished on ${build.date}" />
|
||||
</target>
|
||||
|
||||
<!-- ======================================================================
|
||||
@@ -74,61 +79,61 @@
|
||||
already there)
|
||||
================================================================== -->
|
||||
<target name="createDirectoryStructure">
|
||||
<mkdir dir="${jacob_java.bin}"/>
|
||||
<mkdir dir="${jacob_cpp.bin}"/>
|
||||
<mkdir dir="${java.bin}"/>
|
||||
<mkdir dir="${cpp.bin}"/>
|
||||
<mkdir dir="${install.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- ======================================================================
|
||||
Compare the date/time of the jacob JAR against that
|
||||
of the jacob java source
|
||||
Compare the date/time of the JAR against that
|
||||
of the java source
|
||||
================================================================== -->
|
||||
<target name="jacob_java_jar_check">
|
||||
<uptodate property="jarUpToDate" targetfile="${jacob.jar}">
|
||||
<srcfiles dir="${jacob_java.src}">
|
||||
<target name="java_jar_check">
|
||||
<uptodate property="jarUpToDate" targetfile="${jarfile_fullpath}">
|
||||
<srcfiles dir="${java.src}">
|
||||
<include name="com/**/*.java" />
|
||||
</srcfiles>
|
||||
<!-- Check the build file itself as well -->
|
||||
<srcfiles file="${basedir}/build.xml" />
|
||||
</uptodate>
|
||||
<echo message="jacob_java_jar_check result: ${jarUpToDate}" />
|
||||
<echo message="java_jar_check result: ${jarUpToDate}" />
|
||||
</target>
|
||||
<!-- ======================================================================
|
||||
Compile the java files
|
||||
Relies on ant recognizing when a file needs to be compiled
|
||||
================================================================== -->
|
||||
<target name="jacob_java_compile" depends="createDirectoryStructure,IncrementBuildNumber">
|
||||
<echo>Building java classes...</echo>
|
||||
<javac srcdir="${jacob_java.src}"
|
||||
destdir="${jacob_java.bin}"
|
||||
<target name="java_compile" depends="createDirectoryStructure,IncrementBuildNumber">
|
||||
<echo>Building java classes in ${java.bin}...</echo>
|
||||
<javac srcdir="${java.src}"
|
||||
destdir="${java.bin}"
|
||||
listfiles="true" debug="on" fork="yes" />
|
||||
<echo>Building java sample classes...</echo>
|
||||
<javac srcdir="${jacob_java.samples}"
|
||||
destdir="${jacob_java.bin}"
|
||||
excludes="com/jacob/samples/servlet/**/*.java"
|
||||
<echo>Building java sample classes ...</echo>
|
||||
<javac srcdir="${java.samples}"
|
||||
destdir="${java.bin}"
|
||||
listfiles="true" debug="on" fork="yes" />
|
||||
<echo>Building java test classes...</echo>
|
||||
<javac srcdir="${jacob_java.unittest}"
|
||||
destdir="${jacob_java.bin}"
|
||||
<javac srcdir="${java.unittest}"
|
||||
destdir="${java.bin}"
|
||||
listfiles="true" debug="on" fork="yes" />
|
||||
</target>
|
||||
<!-- ======================================================================
|
||||
Package the classes into a JAR.
|
||||
Put version.propertes into the jar file so getJacobVersion() can find it
|
||||
Package the classes into a JAR.
|
||||
Put version.propertes into the jar file so version retrieval method can find it
|
||||
================================================================== -->
|
||||
<target name="jacob_java_jar_bin" depends="createDirectoryStructure,jacob_java_compile,jacob_java_jar_check,IncrementBuildNumber" unless="jarUpToDate">
|
||||
<target name="java_jar_bin" depends="createDirectoryStructure,java_compile,java_jar_check,IncrementBuildNumber" unless="jarUpToDate">
|
||||
<echo>Removing old jars</echo>
|
||||
<delete file="${jacob.jar}" />
|
||||
<delete file="${jarfile_fullpath}" />
|
||||
<echo>Packaging java classes...</echo>
|
||||
<jar destfile="${jacob.jar}" basedir="${jacob_java.bin}" update="false">
|
||||
<jar destfile="${jarfile_fullpath}" basedir="${java.bin}" update="false">
|
||||
<exclude name="**/CVS" />
|
||||
<exclude name="com/**/*Test.class"/>
|
||||
<exclude name="com/jacob/samples/**"/>
|
||||
<exclude name="com/**/samples/**"/>
|
||||
<include name="com/**/*.class" />
|
||||
<include name="version.properties" />
|
||||
<manifest>
|
||||
<attribute name="Built-By" value="${user.name}" />
|
||||
<section name="com.jacob">
|
||||
<attribute name="Main-Class" value="${java.class.main}"/>
|
||||
<section name="${java.src.mainpackage}">
|
||||
<attribute name="Specification-Title" value="${application.title}" />
|
||||
<attribute name="Specification-Vendor" value="${application.vendor}" />
|
||||
<attribute name="Implementation-Title" value="${application.title} Java libraries" />
|
||||
@@ -138,28 +143,28 @@
|
||||
</jar>
|
||||
</target>
|
||||
<!-- ======================================================================
|
||||
Compare the date/time of the jacob DLL against that
|
||||
of the jacob cpp source
|
||||
Compare the date/time of the DLL against that
|
||||
of the cpp source
|
||||
================================================================== -->
|
||||
<target name="jacob_c_check">
|
||||
<uptodate property="dllUpToDate" targetfile="${jacob.dll}">
|
||||
<srcfiles dir="${jacob_cpp.src}">
|
||||
<target name="c_check">
|
||||
<uptodate property="dllUpToDate" targetfile="${dll_fullpath}">
|
||||
<srcfiles dir="${cpp.src}">
|
||||
<include name="*.cpp" />
|
||||
<include name="*.h" />
|
||||
</srcfiles>
|
||||
<!-- Check the build file itself as well -->
|
||||
<srcfiles file="${basedir}/build.xml" />
|
||||
</uptodate>
|
||||
<echo message="jacob_c_check result: ${dllUpToDate}" />
|
||||
<echo message="c_check result: ${dllUpToDate}" />
|
||||
</target>
|
||||
<!-- ======================================================================
|
||||
Compile the c source files.
|
||||
================================================================== -->
|
||||
<target name="jacob_c_compile" depends="createDirectoryStructure,jacob_c_check,IncrementBuildNumber" unless="dllUpToDate">
|
||||
<target name="c_compile" depends="createDirectoryStructure,c_check,IncrementBuildNumber" unless="dllUpToDate">
|
||||
<echo>Clean up the target folders and file, for safety</echo>
|
||||
<delete file="${jacob_cpp.bin}/**/*.*" />
|
||||
<echo>Compiling C++ classes</echo>
|
||||
<apply executable="${compiler}" dir="${jacob_cpp.bin}" parallel="false" verbose="true" failonerror="true">
|
||||
<delete file="${cpp.bin}/**/*.*" />
|
||||
<echo>Compiling C++ classes with JDK JNI library ${JDK}</echo>
|
||||
<apply executable="${compiler}" dir="${cpp.bin}" parallel="false" verbose="true" failonerror="true">
|
||||
<arg value="-c" />
|
||||
<arg value="/nologo" />
|
||||
<!-- optimize build for speed. (is this VC specific? -->
|
||||
@@ -172,7 +177,7 @@
|
||||
<arg value="${MSDEVDIR}\Include" />
|
||||
<arg value="-I" />
|
||||
<arg value="${MSDEVDIR}\ATL\Include" />
|
||||
<fileset dir="${jacob_cpp.src}">
|
||||
<fileset dir="${cpp.src}">
|
||||
<include name="*.cpp" />
|
||||
</fileset>
|
||||
</apply>
|
||||
@@ -180,15 +185,15 @@
|
||||
<!-- ======================================================================
|
||||
Link the obj files into a DLL.
|
||||
================================================================== -->
|
||||
<target name="jacob_c_dll" depends="createDirectoryStructure,jacob_c_check,jacob_c_compile" unless="dllUpToDate">
|
||||
<target name="c_dll" depends="createDirectoryStructure,c_check,c_compile" unless="dllUpToDate">
|
||||
<echo>Clean up the target folders and file, for safety</echo>
|
||||
<delete file="${jacob.dll}" />
|
||||
<echo>Creating jacob.dll</echo>
|
||||
<apply executable="${linker}" dir="${jacob_cpp.bin}" parallel="true" verbose="true" failonerror="true">
|
||||
<delete file="${dll_fullpath}" />
|
||||
<echo>Creating dll_fullpath</echo>
|
||||
<apply executable="${linker}" dir="${cpp.bin}" parallel="true" verbose="true" failonerror="true">
|
||||
<arg value="/nologo" />
|
||||
<arg value="/dll" />
|
||||
<arg value="/version:${version}" />
|
||||
<arg value="/out:${jacob.dll}" />
|
||||
<arg value="/out:${dll_fullpath}" />
|
||||
<arg value="/libpath:${MSDEVDIR}/lib" />
|
||||
<srcfile />
|
||||
<arg value="${JDK}\lib\jvm.lib" />
|
||||
@@ -198,31 +203,32 @@
|
||||
<arg value="kernel32.lib" />
|
||||
<arg value="shell32.lib" />
|
||||
<arg value="user32.lib" />
|
||||
<fileset dir="${jacob_cpp.bin}">
|
||||
<fileset dir="${cpp.bin}">
|
||||
<include name="*.obj" />
|
||||
</fileset>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
<!-- ======================================================================
|
||||
Use this target to create javadoc from com.jacob.*
|
||||
Use this target to create javadoc from ${java.src.mainpackage}/*
|
||||
================================================================== -->
|
||||
<target name="javadoc">
|
||||
<defaultexcludes add="**/*Test*"/>
|
||||
<javadoc
|
||||
packagenames="com.jacob/**"
|
||||
sourcepath="${jacob_java.src}"
|
||||
destdir="${jacob_java.bin}/docs/api"
|
||||
packagenames="${java.src.mainpackage}/**"
|
||||
sourcepath="${java.src}"
|
||||
destdir="${java.bin}/docs/api"
|
||||
author="true"
|
||||
version="true"
|
||||
use="true"
|
||||
windowtitle="Jacob API Docs">
|
||||
windowtitle="${application.title} API Docs">
|
||||
|
||||
<doctitle><![CDATA[<h1>Java Com Bridge (Jacob)</h1>]]></doctitle>
|
||||
<bottom><![CDATA[<i>See Jacob-project on Sourceforge for more info</i>]]></bottom>
|
||||
<doctitle><![CDATA[<h1>${application.title}</h1>]]></doctitle>
|
||||
<bottom><![CDATA[<i>${application.vendor}</i>]]></bottom>
|
||||
<tag name="todo" scope="all" description="To do:" />
|
||||
<group title="Jacob COM" packages="com.jacob.com/**"/>
|
||||
<group title="Higher Level Active X" packages="com.jacob.activeX/**"/>
|
||||
<group title="Core COM Communication" packages="${java.src.mainpackage}.com/**"/>
|
||||
<group title="Higher Level Active X" packages="${java.src.mainpackage}.activeX/**"/>
|
||||
<group title="API Stub Generator" packages="${java.src.mainpackage}.jacobgen/**"/>
|
||||
<link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api/" packagelistLoc="C:\tmp"/>
|
||||
<link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
|
||||
</javadoc>
|
||||
@@ -232,35 +238,38 @@
|
||||
<!-- ======================================================================
|
||||
Use this target to package all the files for a release
|
||||
================================================================== -->
|
||||
<target name="PackageRelease" depends="createDirectoryStructure,jacob_c_dll,jacob_java_jar_bin,javadoc">
|
||||
<target name="PackageRelease" depends="createDirectoryStructure,c_dll,java_jar_bin,javadoc">
|
||||
|
||||
<echo>Packaging release...</echo>
|
||||
<echo>Packaging release... ${jarfile_fullpath}</echo>
|
||||
<zip
|
||||
destfile="${install.dir}/jacob_${version}.zip">
|
||||
destfile="${install.dir}/${generated_zip}.zip">
|
||||
<exclude name="**/CVS" />
|
||||
<exclude name="**/*.obj" />
|
||||
<exclude name="**/*.class" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="LICENSE.* version.properties" />
|
||||
<zipfileset dir="${install.dir}" prefix="jacob_${version}" includes="jacob.jar jacob.dll"/>
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="docs/**" />
|
||||
<zipfileset dir="${install.dir}" prefix="jacob_${version}" includes="docs/**"/>
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="LICENSE.* version.properties" />
|
||||
<zipfileset dir="${install.dir}" prefix="${generated_zip}" includes="${generated_jar}" />
|
||||
<zipfileset dir="${install.dir}" prefix="${generated_zip}" includes="${generated_dll}" />
|
||||
<zipfileset dir="${basedir}/lib" prefix="${generated_zip}" includes="*.jar" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="docs/**" />
|
||||
<zipfileset dir="${install.dir}" prefix="${generated_zip}" includes="docs/**"/>
|
||||
</zip>
|
||||
<zip
|
||||
destfile="${install.dir}/jacob_${version}_src.zip">
|
||||
destfile="${install.dir}/${generated_zip}_src.zip">
|
||||
<exclude name="**/CVS" />
|
||||
<exclude name="**/*.obj" />
|
||||
<exclude name="**/*.class" />
|
||||
<exclude name="**/*.dll" />
|
||||
<exclude name="**/*.exp" />
|
||||
<exclude name="**/*.jar" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="src/**" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="docs/**" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="jni/**" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="samples/**" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="unittest/**" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="vstudio/**" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="build.xml, RELEASE.txt" />
|
||||
<zipfileset dir="${basedir}" prefix="jacob_${version}" includes="LICENSE.* version.properties" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="src/**" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="docs/**" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="jni/**" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="samples/**" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="unittest/**" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="vstudio/**" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="lib/**" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="build.xml, README.txt" />
|
||||
<zipfileset dir="${basedir}" prefix="${generated_zip}" includes="LICENSE.* version.properties" />
|
||||
</zip>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user