1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <project default="compile" basedir=".">
- <property name="src" location="src"/>
- <property name="pc_client" location="../PC_Client/src"/>
- <property name="build" location="build"/>
- <property name="lib" location="../PC_Client/lib"/>
- <property name="jar" location="Open_RSC_Client.jar"/>
- <property name="javac.source" value="1.8"/>
- <property name="javac.target" value="1.8"/>
- <target name="clean">
- <delete dir="${build}" />
- <delete file="${jar}" />
- </target>
- <target name="compile">
- <echo message="Using Java version ${ant.java.version}."/>
- <delete file="${jar}"/>
- <delete dir="${build}"/>
- <mkdir dir="${build}"/>
- <copy todir="${build}/res">
- <fileset dir="src/res"/>
- </copy>
- <javac srcdir="${src}:${pc_client}" destdir="${build}" debug="on" target="${javac.target}" source="${javac.source}"
- includeantruntime="false">
- <classpath>
- <pathelement path="${java.class.path}/"/>
- <pathelement location="${lib}/discord-rpc.jar"/>
- </classpath>
- <compilerarg line="-Xlint:unchecked"/>
- </javac>
- <jar basedir="${build}" destfile="${jar}">
- <zipgroupfileset dir="${lib}" includes="*.jar"/>
- <manifest>
- <attribute name="Main-Class" value="orsc.OpenRSC"/>
- </manifest>
- </jar>
- </target>
- <target name="runclient">
- <java classname="orsc.OpenRSC" fork="true">
- <jvmarg line="-Xms312m -Dsun.java2d.opengl=true"/>
- <classpath>
- <pathelement path="${jar}:${lib}/discord-rpc.jar"/>
- </classpath>
- </java>
- </target>
- <target name="compile-and-run">
- <antcall target="compile"/>
- <antcall target="runclient"/>
- </target>
- </project>
|