mirror of
https://github.com/bdnugget/APOS.git
synced 2026-11-07 08:47:27 +00:00
updates ant build.xml and convenience cmd scripts
* create ant tasks: compile-bot, compile-scripts, compile-all, run-bot, clean * create compile_all.cmd * create compile_scripts.cmd * create run.bat * create run_noconsole.bat
This commit is contained in:
8 files changed
+87
-48
No files matched your search
@@ -1 +0,0 @@
|
||||
javaw -cp ./Scripts;./lib/rs.jar;./lib/bis.jar;bot.jar; ClientInit NOCONSOLE
|
||||
@@ -1 +0,0 @@
|
||||
javaw -cp ./Scripts;./lib/rs.jar;./lib/bis.jar;bot.jar; ClientInit
|
||||
@@ -1,54 +1,71 @@
|
||||
<project name="APOS" default="compile-and-run" basedir=".">
|
||||
<property name="src" location="src"/>
|
||||
<property name="build" location="build"/>
|
||||
<property name="scripts" location="Scripts"/>
|
||||
<property name="lib" location="lib"/>
|
||||
<project name="APOS" default="run-bot" basedir=".">
|
||||
<property name="build" location="build"/>
|
||||
<property name="scripts" location="Scripts"/>
|
||||
<property name="jar" location="bot.jar"/>
|
||||
<property name="javac.source" value="1.8"/>
|
||||
<property name="javac.target" value="1.8"/>
|
||||
|
||||
<target name="compile">
|
||||
<delete file="${jar}"/>
|
||||
<delete dir="${build}"/>
|
||||
<path id="compile.path">
|
||||
<file file="${jar}"/>
|
||||
<fileset dir="lib">
|
||||
<include name="rsclassic.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<target name="clean">
|
||||
<delete file="${jar}"/>
|
||||
<delete>
|
||||
<fileset dir="${scripts}">
|
||||
<include name="*.class"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<target name="compile-bot">
|
||||
<delete file="${jar}"/>
|
||||
<delete dir="${build}"/>
|
||||
<mkdir dir="${build}"/>
|
||||
<javac srcdir="${src}" destdir="${build}" debug="on" includeantruntime="false" target="${javac.target}" source="${javac.source}">
|
||||
<classpath>
|
||||
<pathelement location="${jar}"/>
|
||||
<pathelement path="${java.class.path}/"/>
|
||||
<pathelement location="${lib}/rsclassic.jar"/>
|
||||
</classpath>
|
||||
<compilerarg line="-Xlint:unchecked"/>
|
||||
<javac srcdir="src" destdir="${build}" debug="on" includeantruntime="false" target="${javac.target}"
|
||||
source="${javac.source}" classpathref="compile.path">
|
||||
<compilerarg line="-Xlint:unchecked"/>
|
||||
</javac>
|
||||
<jar basedir="${build}" destfile="${jar}" manifest="MANIFEST.MF">
|
||||
<jar basedir="${build}" destfile="${jar}" manifest="MANIFEST.MF">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="ClientInit"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
<javac srcdir="${scripts}" destdir="${scripts}" debug="on" includeantruntime="false" target="${javac.target}" source="${javac.source}">
|
||||
<compilerarg line="-Xlint:unchecked"/>
|
||||
<classpath>
|
||||
<pathelement location="${jar}"/>
|
||||
<pathelement path="${java.class.path}/"/>
|
||||
<pathelement location="${lib}/rsclassic.jar"/>
|
||||
<pathelement location="${jar}"/>
|
||||
</classpath>
|
||||
<compilerarg line="-Xlint:deprecation"/>
|
||||
</javac>
|
||||
<delete dir="${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="runclient">
|
||||
<java classname="ClientInit" fork="true">
|
||||
<jvmarg line="-Xms312m -Dsun.java2d.opengl=true"/>
|
||||
<classpath>
|
||||
<pathelement path="${jar}:${lib}/rsclassic.jar"/>
|
||||
</classpath>
|
||||
</java>
|
||||
<delete dir="${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="compile-and-run">
|
||||
<antcall target="compile"/>
|
||||
<antcall target="runclient"/>
|
||||
<target name="compile-scripts">
|
||||
<fail message="Error: must compile bot before compiling scripts!">
|
||||
<condition>
|
||||
<not>
|
||||
<available file="${jar}"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<javac srcdir="${scripts}" destdir="${scripts}" debug="on" includeantruntime="false" target="${javac.target}"
|
||||
source="${javac.source}" classpathref="compile.path">
|
||||
<compilerarg line="-Xlint:unchecked -Xlint:deprecation"/>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="compile-all">
|
||||
<antcall target="compile-bot"/>
|
||||
<antcall target="compile-scripts"/>
|
||||
</target>
|
||||
|
||||
<target name="run-bot">
|
||||
<fail message="Error: must compile bot first!">
|
||||
<condition>
|
||||
<not>
|
||||
<available file="${jar}"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<java classname="ClientInit" fork="true" classpathref="compile.path">
|
||||
<jvmarg line="-Xms312m -Dsun.java2d.opengl=true"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
SET antpath="apache-ant-1.10.5\bin\"
|
||||
|
||||
%antpath%ant -f build.xml compile
|
||||
@@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
SET antpath="apache-ant-1.10.5\bin\"
|
||||
|
||||
echo Compiling bot and scripts ...
|
||||
echo.
|
||||
call %antpath%ant -f build.xml compile-all
|
||||
pause
|
||||
@@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
|
||||
SET antpath="apache-ant-1.10.5\bin\"
|
||||
|
||||
IF NOT EXIST bot.jar (
|
||||
call compile_all.cmd
|
||||
) ELSE (
|
||||
echo Compiling scripts ...
|
||||
echo.
|
||||
call %antpath%ant -f build.xml compile-scripts
|
||||
pause
|
||||
)
|
||||
@@ -1,4 +1,10 @@
|
||||
@echo off
|
||||
SET antpath="apache-ant-1.10.5\bin\"
|
||||
|
||||
%antpath%ant -f build.xml runclient
|
||||
IF NOT EXIST bot.jar (
|
||||
echo Missing bot.jar ...
|
||||
echo.
|
||||
call compile_all.cmd
|
||||
)
|
||||
|
||||
start javaw -jar bot.jar %1
|
||||
exit
|
||||
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
|
||||
run.cmd _
|
||||
Reference in new issue
Block a user