alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<?xml version="1.0" encoding="UTF-8"?>
<project name="buildlibrary" default="run" basedir="."> 
  
  <!-- The properties ${eclipse-home} ${jdk-path} should be passed into this script -->
  <!-- The Path should point to the bin directory of BCC55 -->
  <!-- http://www.borland.com/products/downloads/download_cbuilder.html -->
  
  <!-- Set a meaningful default value for when it is not. -->
  <property name="eclipse-home" value="${basedir}/../.."/>
  <property name="jdk-path" value="${java.home}"/>  
  <property name="destination" value="${eclipse-home}/org.eclipse.update.core.win32/os/win32/x86/"/>
  <property name="obj-path" value="${eclipse-home}/org.eclipse.update.core.win32/src"/>
  <property name="src-path" value="${eclipse-home}/org.eclipse.update.core.win32/src/"/>  
  
  <!-- sets the properties -->
  <property name="library-name" value="update"/>  
  <property name="library-platform" value="dll"/>    
  <property name="library-file" value="${library-name}.${library-platform}"/>
  
  <!-- This target holds all initialization code that needs to be done for -->
  <!-- all tests that are to be run. Initialization for individual tests -->
  <!-- should be done within the body of the suite target. -->
  <target name="init">
    <tstamp/>
    <delete>
      <fileset dir="${obj-path}" includes="${library-file}"/>
      <fileset dir="${obj-path}" includes="${library-name}.obj"/>
      <fileset dir="${obj-path}" includes="${library-name}.tds"/>            
    </delete>
  </target>
  
  <!-- This target holds code to cleanup the testing environment after -->
  <!-- after all of the tests have been run. You can use this target to -->
  <!-- delete temporary files that have been created. -->
  <target name="cleanup">
      <delete>
      <fileset dir="${obj-path}" includes="${library-file}"/>
      <fileset dir="${obj-path}" includes="${library-name}.obj"/>
      <fileset dir="${obj-path}" includes="${library-name}.tds"/>            
    </delete>
  </target>
  
  
  <!-- This target runs the test suite. Any actions that need to happen -->
  <!-- after all the tests have been run should go here. -->
  <target name="run" depends="init,build,cleanup">
  </target>
  
  <!-- This target build the dll -->
  <target name="build">
    <echo message="Building ${library-file}"/>

    <property name="header-path" value="${jdk-path}/include"/>
    <property name="header-windows-path" value="${header-path}/win32" />

	<echo message="bcc32 -I${src-path} -I${header-windows-path} -WD"/>

    <apply executable="bcc32" dest="${eclipse-home}/" parallel="false">
      <arg value="-I${src-path}"/>
      <arg value="-I${header-path}"/>      
      <arg value="-I${header-windows-path}"/> 
      <!-- arg value="-DUNICODE" --> 
	  <arg value="-w-8057"/>           
      <arg value="-WD"/>
	  <srcfile/>
      <fileset dir="${src-path}" includes="*.cpp"/>
      <mapper type="glob" from="*.cpp" to="*.obj"/>
    </apply>
    
	<move file="${library-file}" todir="${destination}"/>
  </target>
  
  
</project>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.