-
Notifications
You must be signed in to change notification settings - Fork 148
/
build.xml
131 lines (120 loc) · 5.38 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project beatoraja">
<property environment="env" />
<property name="build.src" value="src" />
<property name="build.dest" value="build" />
<property name="app.version" value="0.5.4"/>
<property name="dir.release" value="release" />
<property name="dir.release.windows" value="${dir.release}/windows" />
<property name="dir.release.linux" value="${dir.release}/linux" />
<!-- zip file name -->
<property name="zipname" value="beatoraja_${app.version}" />
<!-- launch4j setting -->
<property name="launch4j.dir" location="launch4j" />
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar
:${launch4j.dir}/lib/xstream.jar" />
<path id="build.lib">
<fileset dir="lib" includes="*.jar" />
</path>
<target name="clean">
<delete dir="${build.dest}" />
<mkdir dir="${build.dest}" />
<delete dir="${dir.release}" />
<mkdir dir="${dir.release}" />
<mkdir dir="${dir.release}/windows" />
<mkdir dir="${dir.release}/linux" />
</target>
<target name="compile" depends="clean">
<javac classpathref="build.lib" srcdir="${build.src}" debug="${debug}" destdir="${build.dest}" encoding="UTF-8" />
</target>
<target name="create_run_jar" depends="compile">
<jar destfile="./${build.dest}/beatoraja.jar" filesetmanifest="mergewithoutmain" duplicate="preserve">
<manifest>
<attribute name="Main-Class" value="bms.player.beatoraja.MainLoader" />
<attribute name="Bundle-NativeCode" value="jasiohost32.dll;jasiohost64.dll" />
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${build.dest}" />
<fileset excludes="**/*.java" dir="${build.src}" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx-controllers-desktop-natives.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx-controllers-desktop.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx-freetype-natives.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx-freetype.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx-natives.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/sqlite-jdbc.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/jbms-parser.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/commons-dbutils.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/jbmstable-parser.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/javacpp.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/jportaudio.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/ffmpeg-linux-x86_64.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/ffmpeg-macosx-x86_64.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/ffmpeg-windows-x86_64.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/ffmpeg.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/ffmpeg-platform.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/javacv.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/javacv-platform.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx-controllers.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx-backend-lwjgl.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/gdx-backend-lwjgl-natives.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/twitter4j-core-4.0.4.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/jflac-codec-1.5.3.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/luaj-jse-3.0.2-custom.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/commons-compress-1.16.1.jar" />
<zipfileset excludes="META-INF/*.SF" src="./lib/java-discord-rpc-2.0.1-all.jar" />
</jar>
</target>
<target name="make_exe_file">
<copy file="${launch4j.dir}/launch4j.xml" tofile="launch4j.xml.tmp"
filtering="true" overwrite="true">
<filterset>
<filter token="app.version" value="${app.version}"/>
</filterset>
</copy>
<launch4j configFile="launch4j.xml.tmp" />
<delete file="launch4j.xml.tmp"/>
</target>
<target name="filecopy">
<copy todir="${dir.release.windows}">
<fileset dir="./">
<include name="folder/**" />
<include name="manual/**" />
<include name="natives/**" />
<include name="skin/default/**" />
<include name="skin/default/bg.jpg" />
<include name="beatoraja.l4j.ini" />
</fileset>
</copy>
<copy todir="${dir.release.linux}">
<fileset dir="./">
<include name="folder/**" />
<include name="manual/**" />
<include name="natives/**" />
<include name="skin/default/**" />
<include name="skin/default/bg.jpg" />
<include name="beatoraja-config.command" />
</fileset>
<fileset dir="./${build.dest}">
<include name="beatoraja.jar" />
</fileset>
</copy>
</target>
<target name="make_zip">
<zip destfile="${dir.release.windows}/${zipname}_windows.zip" basedir="${dir.release.windows}" />
<zip destfile="${dir.release.linux}/${zipname}_linux.zip" basedir="${dir.release.linux}" />
</target>
<target name="release">
<antcall target="create_run_jar" />
<antcall target="make_exe_file" />
<copy todir="${dir.release.windows}">
<fileset dir="./${build.dest}">
<include name="beatoraja.exe" />
</fileset>
</copy>
<antcall target="filecopy" />
<antcall target="make_zip" />
</target>
</project>