-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.xml
119 lines (103 loc) · 4.13 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
<?xml version="1.0" encoding="UTF-8" ?>
<project name="fsoinstaller" default="run" basedir=".">
<property name="projectname" value="FreeSpace Open Installer"/>
<property name="projectversion" value="2.3.5.0"/>
<property name="main-class" value="com.fsoinstaller.main.FreeSpaceOpenInstaller"/>
<property name="checkxstr-class" value="com.fsoinstaller.utils.CheckXSTR"/>
<property name="jar-launcher" value="com.jdotsoft.jarloader.JarLauncher"/>
<!-- Change this path to the actual location of Launch4j when using the launch4j task -->
<!--
<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" />
-->
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<property name="docs" value="docs"/>
<property name="javadoc" value="docs/api"/>
<property name="lib" value="lib"/>
<property name="resources" value="resources"/>
<property name="src" value="src"/>
<path id="build.class.path">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="runtime.class.path">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${build}"/>
<pathelement path="."/>
</path>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="compile">
<mkdir dir="${build}"/>
<!-- FSO Installer can work on 1.5, but GitHub workflow only supports 1.6. -->
<javac classpathref="build.class.path" debug="on" srcdir="${src}" destdir="${build}" source="1.6" target="1.6"/>
</target>
<target name="run" depends="compile">
<java classpathref="runtime.class.path" classname="${main-class}" fork="true"/>
</target>
<target name="hash" depends="compile">
<java classpathref="runtime.class.path" classname="${main-class}" fork="true">
<arg value="hash"/>
</java>
</target>
<target name="test" depends="compile">
<java classpathref="runtime.class.path" classname="${main-class}" fork="true">
<arg value="test"/>
</java>
</target>
<target name="validate" depends="compile">
<java classpathref="runtime.class.path" classname="${main-class}" fork="true">
<arg value="validate"/>
</java>
</target>
<target name="checkxstr" depends="compile">
<java classpathref="runtime.class.path" classname="${checkxstr-class}" fork="true"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="${dist}"/>
<!-- jar it up -->
<jar jarfile="${dist}/FreeSpaceOpenInstaller.jar">
<fileset file="application.properties"/>
<fileset dir="${build}" excludes="**/svn*"/>
<!-- we don't need the .java files because they make the jar bigger
<fileset dir="${src}" excludes="**/svn*"/> -->
<fileset dir="." includes="${lib}/**" excludes="**/svn*"/>
<fileset dir="." includes="${resources}/**" excludes="**/svn*"/>
<fileset dir="${docs}" excludes="**/svn*"/>
<manifest>
<attribute name="Main-Class" value="${jar-launcher}"/>
<attribute name="SplashScreen-Image" value="${resources}/splash.gif"/>
</manifest>
</jar>
</target>
<target name="javadoc" depends="compile">
<delete dir="${javadoc}"/>
<javadoc packagenames="com.fsoinstaller.*"
sourcepath="${src}"
defaultexcludes="yes"
destdir="${javadoc}"
author="true"
version="true"
use="true"
linksource="true"
windowtitle="${projectname} v${projectversion}">
<doctitle><![CDATA[<h1>${projectname} v${projectversion}<br>API Specification</h1>]]></doctitle>
</javadoc>
</target>
<!--
<target name="launch4j" depends="jar">
<launch4j configFile="./resources/launch4j.xml" jar="${dist}/FreeSpaceOpenInstaller.jar"
outfile="${dist}/FreeSpaceOpenInstaller.exe" fileVersion="${projectversion}"
txtFileVersion="${projectversion}" productVersion="${projectversion}"
txtProductVersion="${projectversion}"/>
</target>
-->
</project>