forked from ATLauncher/ATLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
97 lines (74 loc) · 3.24 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
<!--
REMEMBER - Change the atlauncher.version property below
3.0.8
-
-->
<project name="ATLauncher" basedir=".">
<property name="src.dir" value="src" />
<property name="build.dir" value="build" />
<property name="macapp.dir" value="macapp" />
<property name="release.dir" value="release" />
<property name="buildsrc.dir" value="${build.dir}/src" />
<property name="bin.dir" value="${build.dir}/compiled" />
<property name="atlauncher.version" value="3.0.8" />
<mkdir dir="${build.dir}" />
<mkdir dir="${release.dir}" />
<delete dir="${buildsrc.dir}" />
<delete dir="${bin.dir}" />
<mkdir dir="${buildsrc.dir}" />
<mkdir dir="${bin.dir}" />
<mkdir dir="${macapp.dir}" />
<copy todir="${buildsrc.dir}">
<fileset dir="${src.dir}" />
</copy>
<replace file="${buildsrc.dir}/com/atlauncher/data/Settings.java" token=""%VERSION%";" value=""${atlauncher.version}";" />
<replace file="${buildsrc.dir}/com/atlauncher/gui/LauncherConsole.java" token="%VERSION%" value="${atlauncher.version}" />
<replace file="${buildsrc.dir}/com/atlauncher/gui/LauncherFrame.java" token="%VERSION%" value="${atlauncher.version}" />
<javac srcdir="${buildsrc.dir}" destdir="${bin.dir}" target="1.6" source="1.6" includeantruntime="false" />
<copy todir="${bin.dir}/resources">
<fileset dir="${buildsrc.dir}/resources" includes="**" />
</copy>
<jar destfile="${bin.dir}/ATLauncher.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="com.atlauncher.App" />
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${bin.dir}" />
</jar>
<chmod file="${bin.dir}/ATLauncher.jar" perm="ugo+rwx"/>
<copy file="${bin.dir}/ATLauncher.jar" tofile="${release.dir}/ATLauncher.jar"/>
<exec os="Windows NT" executable="cmd">
<arg value="/c" />
<arg value="launch4jc.exe" />
<arg value=".\launch4j.xml" />
</exec>
<exec os="Windows 8" executable="cmd">
<arg value="/c" />
<arg value="launch4jc.exe" />
<arg value=".\launch4j.xml" />
</exec>
<exec os="Windows XP" executable="cmd">
<arg value="/c" />
<arg value="launch4jc.exe" />
<arg value=".\launch4j.xml" />
</exec>
<exec os="Mac OS X" executable="launch4j">
<arg value="launch4j.xml" />
</exec>
<exec os="Linux" executable="launch4j">
<arg value="launch4j.xml" />
</exec>
<mkdir dir="${bin.dir}/ATLauncher.app" />
<copy todir="${bin.dir}/ATLauncher.app">
<fileset dir="${macapp.dir}" includes="**" />
</copy>
<copy file="${bin.dir}/ATLauncher.jar" tofile="${bin.dir}/ATLauncher.app/Contents/Resources/Java/ATLauncher.jar"/>
<copy file="${src.dir}/resources/Icon.icns" tofile="${bin.dir}/ATLauncher.app/Contents/Resources/Icon.icns"/>
<replace file="${bin.dir}/ATLauncher.app/Contents/Info.plist" token="%VERSION%" value="${atlauncher.version}" />
<zip destfile="${release.dir}/ATLauncher.zip">
<zipfileset dir="${bin.dir}/" includes="ATLauncher.app/**" excludes="ATLauncher.app/Contents/MacOS/JavaApplicationStub" />
<zipfileset dir="${bin.dir}/" includes="ATLauncher.app/Contents/MacOS/JavaApplicationStub" filemode="755" />
</zip>
<delete dir="${bin.dir}/ATLauncher.app"/>
<delete dir="${build.dir}" />
</project>