build.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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="../PC_Client/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="clean">
  10. <delete dir="${build}" />
  11. <delete file="${jar}" />
  12. </target>
  13. <target name="compile">
  14. <echo message="Using Java version ${ant.java.version}."/>
  15. <delete file="${jar}"/>
  16. <delete dir="${build}"/>
  17. <mkdir dir="${build}"/>
  18. <copy todir="${build}/res">
  19. <fileset dir="src/res"/>
  20. </copy>
  21. <javac srcdir="${src}:${pc_client}" destdir="${build}" debug="on" target="${javac.target}" source="${javac.source}"
  22. includeantruntime="false">
  23. <classpath>
  24. <pathelement path="${java.class.path}/"/>
  25. <pathelement location="${lib}/discord-rpc.jar"/>
  26. </classpath>
  27. <compilerarg line="-Xlint:unchecked"/>
  28. </javac>
  29. <jar basedir="${build}" destfile="${jar}">
  30. <zipgroupfileset dir="${lib}" includes="*.jar"/>
  31. <manifest>
  32. <attribute name="Main-Class" value="orsc.OpenRSC"/>
  33. </manifest>
  34. </jar>
  35. </target>
  36. <target name="runclient">
  37. <java classname="orsc.OpenRSC" fork="true">
  38. <jvmarg line="-Xms312m -Dsun.java2d.opengl=true"/>
  39. <classpath>
  40. <pathelement path="${jar}:${lib}/discord-rpc.jar"/>
  41. </classpath>
  42. </java>
  43. </target>
  44. <target name="compile-and-run">
  45. <antcall target="compile"/>
  46. <antcall target="runclient"/>
  47. </target>
  48. </project>