-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
executable file
·91 lines (82 loc) · 3.3 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<project name="jfcraft" default="jar" basedir=".">
<description>jfcraft</description>
<!-- set global properties for this build -->
<property name="app" value="jfcraft-client"/>
<property name="apptype" value="c"/>
<property name="home" location="../.."/>
<property name="ico" value="jfcraft.ico"/>
<property name="jre" location="${home}/jre_base_desktop"/>
<property name="msi" value="jfcraft"/>
<property name="src" location="src"/>
<property name="build" location="classes"/>
<property name="version" value="0.33"/>
<import file="${home}/base.xml"/>
<available property="have_base" file="base.zip"/>
<target name="get-base" unless="have_base" depends="">
<download url="http://jfcraft.sourceforge.net/base.zip" dest="base.zip"/>
</target>
<target name="zip-base">
<zip destfile="base.zip">
<fileset dir="base" includes="**/*"/>
</zip>
</target>
<target name="depjars" depends="depnatives,jar-javaforce">
</target>
<target name="compile" depends="depjars" description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<mkdir dir="${build}"/>
<javac srcdir="${src}" destdir="${build}" target="${jdkver}" source="${jdkver}" debug="true" includeantruntime="false">
<classpath path="javaforce.jar"/>
</javac>
</target>
<target name="jfassets">
<!-- zip jfassets into jfassets.zip -->
<zip destfile="jfassets.zip">
<fileset dir="jfassets" includes="**/*"/>
</zip>
</target>
<target name="jar" depends="compile,depjars,jfassets,get-base" description="build jar file">
<!-- Build jar file from class files -->
<jar destfile="jfcraft.jar" includes="**/*.class" basedir="${build}">
<fileset dir="." includes="jfcraft.png"/>
<manifest>
<attribute name="Main-Class" value="jfcraft.client.Launcher"/>
<attribute name="Trusted-Library" value="true"/>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="jfcraft.sourceforge.net"/>
</manifest>
</jar>
<!-- build example plugins -->
<ant antfile="plugins/creeper/build.xml" inheritAll="false"/>
<ant antfile="plugins/domino/build.xml" inheritAll="false"/>
<ant antfile="plugins/marioworld/build.xml" inheritAll="false"/>
</target>
<!-- sudo ant install -->
<target name="install" description="install files">
<exec command="gcc loader.c -I../../include -o ${app} -ldl -lpthread"/>
<move file="${app}" todir="/usr/bin"/>
<copy file="jfcraft.jar" todir="/usr/share/java"/>
<copy file="jfcraft.desktop" todir="/usr/share/applications"/>
<copy file="jfcraft.png" todir="/usr/share/icons/hicolor/48x48/apps"/>
<chmod file="/usr/bin/jfcraft" perm="+x"/>
<mkdir dir="/usr/lib/jfcraft"/>
<copy todir="/usr/lib/jfcraft">
<fileset dir=".">
<include name="*.zip"/>
</fileset>
</copy>
<copy file="title.png" todir="/usr/lib/jfcraft"/>
<mkdir dir="/usr/lib/jfcraft/plugins"/>
<copy todir="/usr/lib/jfcraft/plugins">
<fileset dir="plugins">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="clean" description="deletes compiled files">
<delete>
<fileset dir="." includes="**/*.class"/>
<fileset dir="." includes="**/*.jar"/>
</delete>
</target>
</project>