Subversion Repositories wimsdev

Rev

Rev 4935 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <!--
  2.  
  3.     Project buildfile for WIMSchem.
  4.  
  5. -->
  6.  
  7. <project name="WIMSchem" default="dist" basedir=".">
  8.  
  9.     <description>WIMSchem: Sketcher of Elements</description>
  10.  
  11.     <property name="ver" value="1.19"/>
  12.     <!-- image directory for extended help on WIMSchem (B. Perrin-Riou) -->
  13.     <property name="wims_images_dir" location="../../../../public_html/gifs/WIMSchem"/>
  14.     <property name="src" location="src"/>
  15.     <!--<property name="extern" location="extern"/>-->
  16.     <property name="build" location="build"/>
  17.     <property name="dist"  location="dist"/>
  18.     <property name="pkg"  location="pkg"/>
  19.  
  20.     <path id="project.class.path">
  21.         <!--<pathelement location="${classpath}/rt.jar"/>-->
  22.         <!--<pathelement location="/usr/local/javalib/xerces.jar"/>-->
  23.     </path>
  24.  
  25.     <target name="init">
  26.         <!-- Create the time stamp -->
  27.         <tstamp/>
  28.         <!-- Create the build directory structure used by compile -->
  29.         <mkdir dir="${build}"/>
  30.         <!-- Create image directory for extended help on WIMSchem (B. Perrin-Riou) -->
  31.         <mkdir dir="${wims_images_dir}"/>
  32.     </target>
  33.  
  34.     <target name="compile" depends="init" description="compile the source">
  35.         <!-- Compile the java code from ${src} into ${build} -->
  36.         <javac srcdir="${src}" destdir="${build}" debug="on"
  37.                         source="1.5" target="1.5" encoding="8859_1">
  38.             <classpath refid="project.class.path" />
  39.         </javac>
  40.     </target>
  41.  
  42.     <target name="build" depends="compile" description="post-compilation">
  43.     </target>
  44.  
  45.     <target name="dist" depends="build" description="generate the distribution">
  46.         <!-- Create the distribution directory -->
  47.         <mkdir dir="${dist}"/>
  48.         <mkdir dir="${build}/templ"/>
  49.         <mkdir dir="${build}/lang"/>
  50.         <mkdir dir="${build}/images"/>
  51.        
  52.         <exec dir="${src}/templ/" executable="/bin/sh" output="${build}/templ/list">
  53.             <arg line="-c 'ls *.el'"/>
  54.         </exec>
  55.         <exec executable="/bin/sh">
  56.             <arg line="-c 'cp ${src}/lang/*properties ${build}/lang'"/>
  57.         </exec>
  58.         <exec executable="/bin/sh">
  59.             <arg line="-c 'cp ${src}/images/*.png ${build}/images'"/>
  60.         </exec>
  61.         <exec executable="/bin/sh">
  62.             <arg line="-c 'cp ${src}/images/*.gif ${build}/images'"/>
  63.         </exec>
  64.         <!-- Copy images to directory for extended help on WIMSchem (B. Perrin-Riou) -->
  65.         <exec executable="/bin/sh">
  66.             <arg line="-c 'cp ${src}/images/*.png ${wims_images_dir}'"/>
  67.         </exec>
  68.         <exec executable="/bin/sh">
  69.             <arg line="-c 'cp ${src}/templ/*.el ${build}/templ'"/>
  70.         </exec>
  71.  
  72.         <jar jarfile="${dist}/WIMSchem.jar" basedir="${build}">
  73.             <manifest>
  74.                 <attribute name="Main-Class" value="WIMSchem.MainWindow"/>
  75.             </manifest>
  76.             <fileset dir="." includes="lang/*.properties" />
  77.             <fileset dir="." includes="images/*.png" />
  78.             <fileset dir="." includes="images/*.gif" />
  79.             <fileset dir="." includes="templ/list" />
  80.             <fileset dir="." includes="templ/*.el" />
  81.            
  82.             <!-- embed any other appropriate jar files...
  83.             <zipfileset src="extern/epsgraphics.jar"/>
  84.             -->
  85.         </jar>
  86.     </target>
  87.  
  88.     <target name="pkg" depends="dist" description="assemble the package">
  89.         <exec executable="/bin/sh">
  90.             <arg line="-c 'tar czf ${pkg}/WIMSchem-${ver}-src.tar.gz build.xml *.java ds/*.java images/*.png  images/*.gif lang/*.properities templ/*.el CHANGELOG'"/>
  91.         </exec>
  92.         <exec executable="cp">
  93.             <arg line="${dist}/WIMSchem.jar ${pkg}/WIMSchem-${ver}.jar"/>
  94.         </exec>
  95.     </target>
  96.  
  97.     <target name="clean" description="clean up">
  98.         <!-- Delete the ${build} and ${dist} directory trees -->
  99.         <delete dir="${build}"/>
  100.         <delete dir="${dist}"/>
  101.     </target>
  102.  
  103. </project>
  104.