-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·107 lines (84 loc) · 3.88 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="ggtracker uploader builder" default="compile" basedir=".">
<description>
ggtracker uploader builder. Can build releases.
</description>
<!-- Folder properties -->
<property name="appFolder" value="app-folder"/>
<property name="resourcesFolder" value="release/release-resources"/>
<property name="buildFolder" value="build"/>
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes" includeantruntime="false">
<classpath>
<fileset dir="libs">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="package" depends="compile">
<mkdir dir="build/gguploader" />
<!-- Why does the class loader only find things in the com.ggtracker.uploader package? -->
<copy todir="build/classes/com/ggtracker/uploader/resources" preservelastmodified="true">
<fileset dir="resources" />
</copy>
<jar manifest="manifest.mf" basedir="build/classes" destFile="build/gguploader/ggtracker-uploader.jar" />
<copy todir="build/gguploader/libs" preservelastmodified="true">
<fileset dir="libs" />
</copy>
</target>
<target name="run" depends="package">
<java jar="build/gguploader/gguploader.jar" fork="true" />
</target>
<target name="package-win" depends="package">
<property name="launch4j.dir" location="C:\Program Files (x86)\Launch4j" />
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.dir}/launch4j.jar :${launch4j.dir}/lib/xstream.jar" />
<mkdir dir="build/gguploader-win/libs" />
<copy todir="build/gguploader-win/libs">
<fileset dir="build/gguploader/libs" />
</copy>
<copy todir="build/gguploader-win/">
<fileset dir=".">
<include name="gg.ico" />
<include name="LICENSE.txt" />
</fileset>
</copy>
<launch4j configFile="launch4j.xml" />
<zip destfile="build/gguploader-win.zip" basedir="build">
<include name="gguploader-win/**"/>
</zip>
</target>
<target name="package-osx" depends="package">
<mkdir dir="build/gguploader-osx/gguploader.app/Contents/Resources/Java/libs" />
<copy todir="build/gguploader-osx/gguploader.app/Contents/Resources/Java" file="build/gguploader/gguploader.jar" />
<copy todir="build/gguploader-osx/gguploader.app/Contents/Resources/Java/libs" >
<fileset dir="build/gguploader/libs" />
</copy>
<mkdir dir="build/gguploader-osx/gguploader.app/Contents/MacOS" />
<copy todir="build/gguploader-osx/gguploader.app/Contents/MacOS" file="app_resources/JavaApplicationStub" />
<!-- Ant's copy task always wipes permissions so we need to manually set any custom permissions -->
<chmod file="build/gguploader-osx/gguploader.app/Contents/MacOS/JavaApplicationStub" perm="a+x" />
<copy todir="build/gguploader-osx/gguploader.app/Contents" file="app_resources/Info.plist" />
<copy todir="build/gguploader-osx/gguploader.app/Contents" file="app_resources/PkgInfo" />
<copy todir="build/gguploader-osx/gguploader.app/Contents/Resources" file="resources/gg.png" />
<zip destfile="build/gguploader-osx.zip" basedir="build/gguploader-osx" />
</target>
<!--
<target name="clearBuildFolder" description="Clears the release build folder">
<delete dir="${buildFolder}"/>
<mkdir dir="${buildFolder}"/>
</target>
<target name="buildRelease" depends="clearBuildFolder" description="Creates a ggtracker uploader release">
<copy todir="${buildFolder}" preservelastmodified="true">
<fileset dir="${appFolder}"/>
</copy>
<jar manifest="${resourcesFolder}/ggtracker-uploader-manifest.mf" basedir="bin" destfile="${buildFolder}/lib/ggtracker-uploader.jar" />
<launch4j configFile="./release/release-resources/ggtracker-uploader-launch4j.xml" />
<echo>Release build successful, release placed in folder: ${buildFolder}</echo>
</target>
-->
</project>