-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.xml
executable file
·84 lines (68 loc) · 3.18 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Masques" default="dist">
<property environment="env" />
<property name="project.basedir" value="${basedir}" />
<property name="target.dir" value="${project.basedir}/target" />
<property name="dist.dir" value="${target.dir}/masques" />
<property name="dist.lib.dir" value="${dist.dir}/lib" />
<property name="lib.dir" value="${project.basedir}/lib" />
<property name="src.dir" value="${project.basedir}/src" />
<property name="package.dir" value="${project.basedir}/pkg" />
<property name="version" value="1.0.0-SNAPSHOT" />
<property name="masques.jar" value="${target.dir}/masques-${version}.jar" />
<property name="target.installer.dir" value="${target.dir}/installer" />
<property name="installer.jar" value="${target.installer.dir}/masques_installer.jar" />
<property name="installer.exe" value="${target.installer.dir}/install.exe" />
<target name="copy-libs" depends="">
<copy todir="${dist.lib.dir}">
<fileset dir="${lib.dir}" />
</copy>
</target>
<target name="copy-jar" depends="">
<copy todir="${dist.lib.dir}" file="${masques.jar}" />
</target>
<target name="copy-resources" depends="">
<copy todir="${dist.dir}">
<fileset dir="${package.dir}" />
</copy>
</target>
<target name="izpack-setup">
<fail message="Install IzPack 4.3.5 (and Python) and set the environment variable IZPACK_HOME"
unless="env.IZPACK_HOME" />
<property name="izpack.dir" location="${env.IZPACK_HOME}" />
<property name="izpack.2exe"
value="${izpack.dir}/utils/wrappers/izpack2exe/izpack2exe.py" />
<property name="izpack.conf" value="${target.dir}/masques.xml" />
<property name="izpack.log" value="${target.dir}/izpack2exe.log" />
<property name="izpack.7zip"
value="${izpack.dir}/utils/wrappers/izpack2exe/7za.exe" />
<taskdef name="IzPack"
classpath="${izpack.dir}/lib/compiler.jar"
classname="com.izforge.izpack.ant.IzPackTask" />
</target>
<target name="izpack-copy-files" depends="izpack-setup">
<copy file="${project.basedir}/install/wrapper.jar" todir="${lib.dir}" />
<copy file="${project.basedir}/masques.xml" todir="${target.dir}" />
<replace file="${izpack.conf}" token="@versionID@" value="${version}"/>
</target>
<target name="izpack" depends="izpack-setup,izpack-copy-files">
<mkdir dir="${target.installer.dir}"/>
<IzPack input="${izpack.conf}"
output="${installer.jar}" installerType="standard"
basedir="${project.basedir}" IzPackDir="${izpack.dir}" />
<exec executable="python" failonerror="true" logError="true" output="${izpack.log}">
<arg value="${izpack.2exe}" />
<arg value="--with-7z=${izpack.7zip}" />
<arg value="--no-upx" />
<arg value="--file=${installer.jar}" />
<arg value="--output=${installer.exe}" />
</exec>
<!-- <copy file="${src.installerdir}/install_64.bat" todir="${dist.64dir}" />
<copy file="${installer.jar}" todir="${dist.64dir}" /> -->
</target>
<target name="dist" depends="copy-libs, copy-jar, copy-resources, izpack">
</target>
<target name="clean">
<delete dir="${target.dir}" />
</target>
</project>