This repository has been archived by the owner on Jun 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
/
build.xml
207 lines (169 loc) · 6.15 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="all" name="Moonlight-PC">
<property name="app.name" value="Moonlight"/>
<property name="app.version" value="0.7-SNAPSHOT"/>
<property name="app.java.version" value="1.7"/>
<property name="one-jar.dist.dir" value="${basedir}"/>
<property name="src.dir" location="${basedir}/src"/>
<property name="libs.dir" location="${basedir}/libs"/>
<property name="libs.osx64.dir" location="${libs.dir}/osx"/>
<property name="libs.lin32.dir" location="${libs.dir}/lin32"/>
<property name="libs.lin64.dir" location="${libs.dir}/lin64"/>
<property name="libs.win32.dir" location="${libs.dir}/win32"/>
<property name="libs.win64.dir" location="${libs.dir}/win64"/>
<property name="lib.dir" location="${basedir}/lib"/>
<property name="build.dir" location="${basedir}/build"/>
<property name="classes.dir" location="${basedir}/classes"/>
<property environment="env"/>
<target name="init" depends="clean">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${classes.dir}/lib"/>
<mkdir dir="${classes.dir}/src"/>
<mkdir dir="${build.dir}"/>
</target>
<target name="moonlight-java" depends="init">
<javac srcdir="${src.dir}"
destdir="${classes.dir}/src"
includeantruntime="false"
source="${app.java.version}"
target="${app.java.version}"
debug="off"
classpath="${build.dir}">
<classpath>
<fileset dir="${libs.dir}" includes="*.jar"/>
</classpath>
</javac>
</target>
<import file="one-jar-ant-task.xml"/>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${classes.dir}"/>
</target>
<target name="all" depends="clean,moonlight-osx,moonlight-lin32,moonlight-lin64,moonlight-win32,moonlight-win64"/>
<target name="moonlight-osx-app" depends="moonlight-osx">
<!--
This is a fork of Oracle's Mac OS X bundler.
See https://bitbucket.org/infinitekind/appbundler for detailed reference
-->
<taskdef name="bundleapp"
classpath="${basedir}/appbundler-1.0ea.jar"
classname="com.oracle.appbundler.AppBundlerTask"/>
<bundleapp
jvmrequired="${app.java.version}"
jrepreferred="true"
outputdirectory="${build.dir}"
name="${app.name}"
displayname="${app.name}"
executableName="moonlight-osx64"
identifier="com.limelight"
shortversion="${app.version}"
version="${app.version}"
mainclassname="OneJar"
applicationCategory="public.app-category.games">
<classpath file="${build.dir}/moonlight-osx64.jar"/>
<arch name="x86_64"/>
<!--<arch name="i386"/>-->
<!-- Workaround as com.apple.mrj.application.apple.menu.about.name property may no longer work -->
<option value="-Xdock:name=${app.name}"/>
<option value="-Dapple.laf.useScreenMenuBar=true"/>
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>
<option value="-Dcom.apple.mrj.application.apple.menu.about.name=${app.name}"/>
<option value="-Dcom.apple.smallTabs=true"/>
<option value="-Dfile.encoding=UTF-8"/>
<option value="-Xmx512M" name="Xmx"/>
<!-- Use this option to bundle a JRE -->
<!-- <runtime dir="${env.JAVA_HOME}" /> -->
</bundleapp>
</target>
<target name="moonlight-osx" depends="moonlight-java">
<!-- construct one-jar file -->
<one-jar destfile="${build.dir}/moonlight-osx64.jar">
<manifest>
<attribute name="One-Jar-Main-Class" value="com.limelight.Limelight"/>
</manifest>
<main>
<!-- construct moonlight.jar -->
<fileset dir="${classes.dir}/src"/>
</main>
<lib>
<fileset dir="${libs.dir}" includes="*.jar"/>
</lib>
<binlib>
<fileset dir="${libs.osx64.dir}" includes="*"/>
</binlib>
</one-jar>
</target>
<target name="moonlight-lin32" depends="moonlight-java">
<!-- construct one-jar file -->
<one-jar destfile="${build.dir}/moonlight-lin32.jar">
<manifest>
<attribute name="One-Jar-Main-Class" value="com.limelight.Limelight"/>
</manifest>
<main>
<!-- construct moonlight.jar -->
<fileset dir="${classes.dir}/src"/>
</main>
<lib>
<fileset dir="${libs.dir}" includes="*.jar"/>
</lib>
<binlib>
<fileset dir="${libs.lin32.dir}" includes="*"/>
</binlib>
</one-jar>
</target>
<target name="moonlight-lin64" depends="moonlight-java">
<!-- construct one-jar file -->
<one-jar destfile="${build.dir}/moonlight-lin64.jar">
<manifest>
<attribute name="One-Jar-Main-Class" value="com.limelight.Limelight"/>
</manifest>
<main>
<!-- construct moonlight.jar -->
<fileset dir="${classes.dir}/src"/>
</main>
<lib>
<fileset dir="${libs.dir}" includes="*.jar"/>
</lib>
<binlib>
<fileset dir="${libs.lin64.dir}" includes="*"/>
</binlib>
</one-jar>
</target>
<target name="moonlight-win32" depends="moonlight-java">
<!-- construct one-jar file -->
<one-jar destfile="${build.dir}/moonlight-win32.jar">
<manifest>
<attribute name="One-Jar-Main-Class" value="com.limelight.Limelight"/>
</manifest>
<main>
<!-- construct moonlight.jar -->
<fileset dir="${classes.dir}/src"/>
</main>
<lib>
<fileset dir="${libs.dir}" includes="*.jar"/>
</lib>
<binlib>
<fileset dir="${libs.win32.dir}" includes="*"/>
</binlib>
</one-jar>
</target>
<target name="moonlight-win64" depends="moonlight-java">
<!-- construct one-jar file -->
<one-jar destfile="${build.dir}/moonlight-win64.jar">
<manifest>
<attribute name="One-Jar-Main-Class" value="com.limelight.Limelight"/>
</manifest>
<main>
<!-- construct moonlight.jar -->
<fileset dir="${classes.dir}/src"/>
</main>
<lib>
<fileset dir="${libs.dir}" includes="*.jar"/>
</lib>
<binlib>
<fileset dir="${libs.win64.dir}" includes="*"/>
</binlib>
</one-jar>
</target>
</project>