blob: c9ee21d8ef42025e409eb2e09dc5f404193b2d2c (
plain)
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
208
209
210
211
212
213
|
<?xml version="1.0"?>
<!--
Installation procedure.
The install scripts are located inside the resources/install directory . The
files are separated in subdirectories according to distribution - generic,
linux, windows, macosx.
1. For building any of the distributions you must fill in the
path to the installation of IzPack. For instructions on how to install
izPack please referer to http://www.izforge.com/izpack/. And uncomment the
taskdef of izpack in this file.
2. When building the linux installation package you must set the
linux.jre.path variable to point to a location containing an extracted jre
so that it could be bundled inside the installation package.
3. When building the windows installation package you must set the
windows.jre.file variable. This is the path to an installation file of a
jre (online or offline one). The 7zip software package
(http://www.7-zip.org) must also be installed.
4. When changing the application version things you must do:
- generic
- there is app-version variable in the izpack installer xml
- linux
- there is app-version variable in the izpack installer xml
- windows
- there is app-version variable in the izpack installer xml
- you must change the installer jar name in the launcher.ini file
-->
<project name="sip-communicator-installer" basedir="." default="ant-usage">
<!-- Load installer properties -->
<!-- USERS NEED TO UPDATE THIS FILE -->
<property file="${inst.resrc}/installers.properties"/>
<!-- define the izpack task in a separate target so that we don't get an
error when izpack properties are not set-->
<target name="define-izpack-task">
<taskdef name="izpack" classpath="${izpack.dir}/lib/compiler.jar"
classname="com.izforge.izpack.ant.IzPackTask"/>
</target>
<!-- Put here the Windows release directory -->
<property name="windows.app.dir" value="${sc.basedir}/${release}/windows"/>
<!-- Put here the Linux release directory -->
<property name="linux.app.dir" value="${sc.basedir}/${release}/linux"/>
<!-- Put here the Generic release directory -->
<property name="generic.app.dir" value="${sc.basedir}/${release}/generic"/>
<!-- change the 7zip executable corresponding the OS
7-zip is used to create windows self-extract installer binary
In order to work 7-zip must be installed and tobe in the path
For Debian linux use : apt-get install p7zip
For other go to : http://www.7-zip.org/
-->
<condition property="7zip.executable" value="7z">
<os family="windows"/>
</condition>
<condition property="7zip.executable" value="7zr">
<equals arg1="${os.name}" arg2="linux"
casesensitive="false" trim="true"/>
</condition>
<!-- default Ant target does nothing except print helpful options -->
<target name="ant-usage"
description="simply execute 'ant' to discover the most useful targets.">
<echo message="Useful ant commands for the SIP Communicator Build Installer..." />
<echo message="'ant build-installation-generic' for building generic installator jar" />
<echo message="'ant build-installation-linux' for building linux instalation file" />
<echo message="'ant build-installation-windows' for building windows instalation file" />
</target>
<target name="clean-install-generic">
<delete dir="${generic.app.dir}"/>
<mkdir dir="${generic.app.dir}"/>
</target>
<target name="build-installation-generic"
depends="clean-install-generic,define-izpack-task,version">
<filter token="VERSION" value="${sip-communicator.version}" />
<filter token="BUILDDATE" value="${build.date}" />
<copy
tofile="${generic.app.dir}/tmp-installer-generic.xml"
file="${inst.resrc}/generic/installer-generic.xml"
filtering="yes"
/>
<izpack
input="${generic.app.dir}/tmp-installer-generic.xml"
output="${generic.app.dir}/sip-communicator-${sip-communicator.version}.jar"
installerType="standard"
izPackDir="${izpack.dir}/"
basedir="${sc.basedir}"/>
</target>
<target name="clean-install-linux">
<delete dir="${linux.app.dir}"/>
<mkdir dir="${linux.app.dir}"/>
<mkdir dir="${linux.app.dir}/tmp"/>
</target>
<target name="build-installation-linux"
depends="clean-install-linux,define-izpack-task,version">
<copy todir="${linux.app.dir}/tmp">
<fileset dir="${inst.resrc}/linux">
<include name="setup.sh"/>
<include name="inst_path"/>
</fileset>
</copy>
<!-- copy the jre -->
<copy todir="${linux.app.dir}/tmp/jre">
<fileset dir="${linux.jre.path}">
<include name="**/*"/>
</fileset>
</copy>
<filter token="VERSION" value="${sip-communicator.version}" />
<filter token="BUILDDATE" value="${build.date}" />
<copy
tofile="${linux.app.dir}/tmp/tmp-installer-linux.xml"
file="${inst.resrc}/linux/installer-linux.xml"
filtering="yes"
/>
<!-- create izpack installer jar file -->
<izpack input="${linux.app.dir}/tmp/tmp-installer-linux.xml"
output="${linux.app.dir}/tmp/sip-communicator-${sip-communicator.version}-linux.jar"
installerType="standard"
basedir="${sc.basedir}"
izPackDir="${izpack.dir}/"/>
<!-- Create self extract linux binary-->
<tar tarfile="${linux.app.dir}/tmp/install.tar"
basedir="${linux.app.dir}/tmp"/>
<gzip zipfile="${linux.app.dir}/tmp/install.tar.gz"
src="${linux.app.dir}/tmp/install.tar"/>
<concat destfile="${linux.app.dir}/sip-communicator-${sip-communicator.version}-linux.bin"
binary="true">
<fileset dir="${inst.resrc}/linux/">
<include name="sfx-header"/>
</fileset>
<fileset dir="${linux.app.dir}/tmp">
<include name="install.tar.gz"/>
</fileset>
</concat>
<chmod file="${linux.app.dir}/sip-communicator-${sip-communicator.version}-linux.bin" perm="+x"/>
<!-- Delete the temp directory-->
<delete dir="${linux.app.dir}/tmp"/>
</target>
<target name="clean-install-windows">
<delete dir="${windows.app.dir}"/>
<mkdir dir="${windows.app.dir}"/>
<mkdir dir="${windows.app.dir}/tmp"/>
<mkdir dir="${windows.app.dir}/tmp/jre"/>
</target>
<target name="build-installation-windows"
depends="clean-install-windows,define-izpack-task,version">
<copy todir="${windows.app.dir}/tmp">
<fileset dir="${inst.resrc}/windows">
<include name="launcher.ini"/>
<include name="setup-sip-communicator.exe"/>
</fileset>
</copy>
<!-- copy the windows jre file -->
<copy file="${windows.jre.file}"
tofile="${windows.app.dir}/tmp/jre/jre-windows.exe"/>
<filter token="VERSION" value="${sip-communicator.version}" />
<filter token="BUILDDATE" value="${build.date}" />
<copy
tofile="${windows.app.dir}/tmp/tmp-installer-windows.xml"
file="${inst.resrc}/windows/installer-windows.xml"
filtering="yes"
/>
<izpack
input="${windows.app.dir}/tmp/tmp-installer-windows.xml"
output="${windows.app.dir}/tmp/sip-communicator-windows.jar"
installerType="standard"
basedir="${sc.basedir}"
izPackDir="${izpack.dir}/"/>
<zip destfile="${windows.app.dir}/sip-communicator-${sip-communicator.version}-windows.zip"
basedir="${windows.app.dir}/tmp"/>
<!--exec dir="${windows.app.dir}/tmp" executable="${7zip.executable}" failifexecutionfails="false">
<arg line="a -y data.7z *"/>
</exec>
<concat destfile="${windows.app.dir}/sip-communicator-${sip-communicator.version}.exe"
binary="true">
<fileset dir="${inst.resrc}/windows">
<include name="7zS.sfx"/>
</fileset>
<fileset dir="${inst.resrc}/windows">
<include name="7zip.conf"/>
</fileset>
<fileset dir="${windows.app.dir}/tmp">
<include name="data.7z"/>
</fileset>
</concat-->
<!-- Delete the temp directory-->
<delete dir="${windows.app.dir}/tmp"/>
</target>
</project>
|