build-swt.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <project name="jfreechart-swt" default="all" basedir="..">
  2. <!-- Initialisation. -->
  3. <target name="initialise" description="Initialise required settings.">
  4. <tstamp />
  5. <property name="jfreechart.name" value="jfreechart" />
  6. <property name="jfreechart.version" value="1.0.19" />
  7. <property name="jcommon.name" value="jcommon" />
  8. <property name="jcommon.version" value="1.0.23" />
  9. <property name="builddir" value="${basedir}/build" />
  10. <property name="jcommon.jar" value="${basedir}/lib/${jcommon.name}-${jcommon.version}.jar"/>
  11. <property name="jfreechart.jar" value="${basedir}/lib/${jfreechart.name}-${jfreechart.version}.jar"/>
  12. <!-- Edit the next line to link to the swt library you want, see README file in the swt folder -->
  13. <property name="swt.jar" value="/Users/dgilbert/swt-4/swt.jar"/>
  14. <path id="build.classpath">
  15. <pathelement location="${jcommon.jar}"/>
  16. <pathelement location="${jfreechart.jar}"/>
  17. <pathelement location="${swt.jar}"/>
  18. </path>
  19. </target>
  20. <!-- Compile the JFreeChart SWT classes -->
  21. <target name="compile-swtgraphics" depends="initialise"
  22. description="Compile and package some utility SWT source code.">
  23. <!-- create a temp build directory -->
  24. <mkdir dir="${basedir}/build" />
  25. <!-- compile the source -->
  26. <javac srcdir="${basedir}/swt"
  27. destdir="${basedir}/build"
  28. debug="on"
  29. deprecation="on"
  30. source="1.6"
  31. target="1.6"
  32. includeantruntime="false">
  33. <classpath refid="build.classpath" />
  34. <include name="org/jfree/experimental/swt/**/*.java"/>
  35. </javac>
  36. <!-- make the jar -->
  37. <jar jarfile="${basedir}/lib/swtgraphics2d.jar"
  38. basedir="${basedir}/build" >
  39. </jar>
  40. <!-- delete the temp directory -->
  41. <delete dir="${basedir}/build" />
  42. </target>
  43. <!-- Compile the JFreeChart SWT classes -->
  44. <target name="compile-swt" depends="initialise"
  45. description="Compile and package the JFreeChart SWT source code.">
  46. <!-- create a temp build directory -->
  47. <mkdir dir="${basedir}/build" />
  48. <!-- compile the source -->
  49. <javac srcdir="${basedir}/swt"
  50. destdir="${basedir}/build"
  51. debug="on"
  52. deprecation="on"
  53. source="1.6"
  54. target="1.6"
  55. includeantruntime="false">
  56. <classpath refid="build.classpath" />
  57. <include name="org/jfree/experimental/chart/**/*.java"/>
  58. </javac>
  59. <!-- make the jar -->
  60. <jar jarfile="${basedir}/lib/${jfreechart.name}-${jfreechart.version}-swt.jar"
  61. basedir="${basedir}/build" >
  62. </jar>
  63. <!-- delete the temp directory -->
  64. <delete dir="${basedir}/build" />
  65. </target>
  66. <!-- Generate the JFreeChart SWT source code jar -->
  67. <target name="source-jar-swt" depends="initialise"
  68. description="Package the JFreeChart SWT source code in a jar">
  69. <!-- create a temp build directory -->
  70. <mkdir dir="${basedir}/source-jar-swt"/>
  71. <!-- copy source code -->
  72. <copy todir="${basedir}/source-jar-swt/">
  73. <fileset dir="${basedir}/swt"/>
  74. </copy>
  75. <!-- make the jar -->
  76. <jar jarfile="${basedir}/lib/${jfreechart.name}-${jfreechart.version}-swt-src.jar"
  77. basedir="${basedir}/source-jar-swt">
  78. </jar>
  79. <!-- delete the temp directory -->
  80. <delete dir="${basedir}/source-jar-swt"/>
  81. </target>
  82. <!-- ALL -->
  83. <target name="all"
  84. depends="compile-swtgraphics,compile-swt,source-jar-swt"
  85. description="Compiles and package in jar files all the SWT related code in JFreeChart.">
  86. </target>
  87. </project>