build.xml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <project default="compile" basedir=".">
  2. <property name="src" location="src"/>
  3. <property name="pc_client" location="../PC_Client/src"/>
  4. <property name="build" location="build"/>
  5. <property name="lib" location="lib"/>
  6. <property name="jar" location="Open_RSC_Client.jar"/>
  7. <property name="javac.source" value="1.8"/>
  8. <property name="javac.target" value="1.8"/>
  9. <target name="compile">
  10. <echo message="Using Java version ${ant.java.version}."/>
  11. <delete file="${jar}"/>
  12. <delete dir="${build}"/>
  13. <mkdir dir="${build}"/>
  14. <copy todir="${build}/res">
  15. <fileset dir="src/res"/>
  16. </copy>
  17. <javac srcdir="${src}:${pc_client}" destdir="${build}" debug="on" target="${javac.target}" source="${javac.source}"
  18. includeantruntime="false">
  19. <classpath>
  20. <pathelement path="${java.class.path}/"/>
  21. </classpath>
  22. <compilerarg line="-Xlint:unchecked"/>
  23. </javac>
  24. <jar basedir="${build}" destfile="${jar}">
  25. <manifest>
  26. <attribute name="Main-Class" value="orsc.OpenRSC"/>
  27. </manifest>
  28. </jar>
  29. </target>
  30. <target name="runclient">
  31. <java classname="orsc.OpenRSC" fork="true">
  32. <jvmarg line="-Xms312m -Dsun.java2d.opengl=true"/>
  33. <classpath>
  34. <pathelement path="${jar}/"/>
  35. </classpath>
  36. </java>
  37. </target>
  38. <target name="compile-and-run">
  39. <antcall target="compile"/>
  40. <antcall target="runclient"/>
  41. </target>
  42. </project>