Statistics
| Revision:

svn-gvsig-desktop / tags / tmp_build / upgrade / buildExt.xml @ 16849

History | View | Annotate | Download (15.6 KB)

1
<project name="instalador-gvSIG" default="init" basedir=".">
2

    
3
        <dirname file="${ant.file.instalador-gvSIG}" property="base_dir"/>
4
        <dirname file="${base_dir}" property="proyect_dir"/>
5
        <property value="${proyect_dir}" name="workspace_dir"/>
6

    
7
        <taskdef resource="net/sf/antcontrib/antcontrib.properties">
8
                <classpath>
9
                        <pathelement location="${workspace_dir}/binaries/ant/ant-contrib-1.0b3.jar"/> <!--CAMBIAR SEGUN DONDE SE COLOQUEN FINALMENTE LOS JARS-->
10
                </classpath>
11
        </taskdef>
12

    
13
        <taskdef resource="net/sf/antcontrib/antlib.xml">
14
                <classpath>
15
                        <pathelement location="${workspace_dir}/binaries/ant/ant-contrib-1.0b3.jar"/> <!--CAMBIAR SEGUN DONDE SE COLOQUEN FINALMENTE LOS JARS-->
16
                </classpath>
17
        </taskdef>
18

    
19
        <property file="build.properties"/>
20
        <property file="${workspace_dir}/_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number"/>
21

    
22
        <property name="dir_inst" location="/usr/local"/>
23
        <!--<property name="base_dir" location="./"/>                -->
24
        <property name="izpack_dir" location="${workspace_dir}/install/IzPack"/>
25
        <property name="dir_libs" location="${izpack_dir}/lib"/>
26

    
27

    
28
        <property name="GVSIG_INSTALLDIR" location="${workspace_dir}/install"/>
29
        <property name="ANDAMI_DIR" location="${workspace_dir}/_fwAndami"/>
30
        <property name="INSTALLER_DIR" value="${APPNAME}-${version}_upgrader"/>
31
        <property name="JARNAME" value="${APPNAME}-${version}.jar"/>
32
        <property name="DIR_LIN_GVSIG" location="${GVSIG_INSTALLDIR}/instalador-gvSIG-lin"/>
33
        <property name="DIR_WIN_GVSIG" location="${GVSIG_INSTALLDIR}/instalador-gvSIG-win"/>
34
        <property name="WINDOWSZIP" value="${APPNAME}-${bversion}_${build.number}-windows-i586.7z" />
35
        <property name="LINUXBIN" value="${APPNAME}-${bversion}_${build.number}-upgraderFrom_1_1_1015-linux-i586.bin"/>
36
        <property name="WINDOWSEXE" value="${APPNAME}-${bversion}_${build.number}-upgraderFrom_1_1_1015-windows-i586.exe"/>
37
        <property name="MAC_10_ZIP" value="${APPNAME}-${bversion}_${build.number}-upgraderFrom_1_1_1015-mac-10_4.zip"/>
38
        <property name="autoinstalador" value="${APPNAME}_update-1_1-TO-${bversion}" />
39
        <property name="OUTPUT_DIR" location="./tmp/versiones/v${version}/${build.number}"/> <!--CAMBIAR ESTO SEGUN DIRECTORIO OUTPUT,VERIFICAR BUILD.PROPERTIES -->
40

    
41
        <condition property="LAUNCHER7Z" value="${GVSIG_INSTALLDIR}/launcher/7z/7za" else="${GVSIG_INSTALLDIR}/launcher/7z/7z.exe">
42
                <os family="unix" />
43
        </condition>
44

    
45
        <taskdef name="izpack" classpath="${dir_libs}/compiler.jar" classname="com.izforge.izpack.ant.IzPackTask"/>
46

    
47

    
48
        <condition property="Lang.Is.Spanish">
49
                <contains string="${env.LANG}" substring="es"/>
50
        </condition>
51
        <condition property="directorio.base">
52
                <available file="${base_dir}/install.xml" type="file" />
53
        </condition>
54

    
55
        <target name="E_Spanish" if="Lang.Is.Spanish">
56
                <property name="ERROR_BASEDIR" value="En el directorio ${base_dir} no se encuentra el fichero install.xml" />
57
        </target>
58

    
59
        <target name="E_notSpanish" unless="Lang.Is.Spanish">
60
                <property name="ERROR_BASEDIR" value="Cannot find install.xml in ${base_dir} folder " />
61
        </target>
62

    
63
        <target name="check" depends="E_Spanish,E_notSpanish">
64
                <fail message="${ERROR_BASEDIR}" unless="directorio.base"/>
65
        </target>
66

    
67

    
68

    
69
        <target name="init" depends="check,CopyFiles,CreateJar,Installation,InstallMac,CleanDir" >
70

    
71
        </target>
72
        <target name="CopyFiles" description="Copia de ficheros de librerias y de las extensiones necesarias">
73
                <delete dir="${base_dir}/bin"/>
74
                <copy file="${base_dir}/resources/gpl.txt" todir="./bin"/>
75
                <mkdir dir="${base_dir}/bin/lib"/>
76
<!--                 copiamos los jar y zip que tenemos en _fwAndami/lib                 -->
77
                <copy todir="${base_dir}/bin/lib">
78
                        <fileset dir="${ANDAMI_DIR}/lib">
79
                                <include name="*.jar"/>
80
                                <include name="*.zip"/>
81
                        </fileset>
82
                </copy>
83

    
84
                <copy todir="${base_dir}/bin" file="${ANDAMI_DIR}/andami.jar"/>
85
                <copy todir="${base_dir}/bin" file="${ANDAMI_DIR}/castor.properties"/>
86

    
87
<!--                 PARA WINDOWS -->
88

    
89

    
90
                <delete dir="${base_dir}/tmpResources"/>
91
                <mkdir dir="${base_dir}/tmpResources" />
92

    
93
<!--         Copiamos el lanzador y sus traduciones al tmpResources,sin copiar el ini, manifest y los CVS (ANT excluye carpetas CVS por defecto -->
94
                <copy todir="${base_dir}/tmpResources">
95
                        <fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3/dist/">
96
                                <include name="**/"/>
97
                                <exclude name="**/*.ini"/>
98
                                <exclude name="**/*.manifest"/>
99
                        </fileset>
100
                </copy>
101
                <move file="${base_dir}/tmpResources/launcher-Win32.exe" tofile="./tmpResources/gvSIG.exe"/>
102

    
103

    
104

    
105

    
106
                <for list="${EXTENSIONS}" param="extensions">
107
                        <sequential>
108
                                <copy todir="${base_dir}/extensiones/@{extensions}">
109
                                        <fileset dir="${ANDAMI_DIR}/gvSIG/extensiones/@{extensions}"/>
110
                                </copy>
111
                                <echo>extension ----> @{extensions} </echo>
112
                        </sequential>
113
                </for>
114
        </target>
115
        <target name="CreateJar" description="Generacion del instalador Jar">
116
                <izpack input="${base_dir}/install.xml"
117
                        output="${base_dir}/${JARNAME}"
118
                        installerType="standard"
119
                        basedir="${base_dir}"
120
                        izPackDir="${izpack_dir}/"/>
121
        </target>
122
<!--                 generar el tar.gz para linux -->
123
        <target name="Installation" description="Generacion de la distribucion">
124

    
125
                <mkdir dir="${OUTPUT_DIR}" />
126
                <delete dir="${base_dir}/${INSTALLER_DIR}"/>
127
                <mkdir dir="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall"/>
128
                <copy file="${base_dir}/${JARNAME}" todir="./${INSTALLER_DIR}/tmp_gvSIGInstall"/>
129

    
130
<!--                 carpetas CVS no se copiaran, ANT las excluye por defecto -->
131
                <copy todir="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall">
132
                        <fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3_linux/dist/"/>
133
                </copy>
134

    
135
                <chmod file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher-Linux" perm="ugo+rx"/>
136
                <delete file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini"/>
137
                <copy file="${DIR_LIN_GVSIG}/resources/launcher.ini.j15" tofile="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini"/>
138
                <replace file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini" token="%JARNAME%" value="${JARNAME}"/>
139

    
140
<!--                 comprimimos la carpeta tmp_gvSIGInstall en tmp.tgz  -->
141
                <tar destfile="${base_dir}/${INSTALLER_DIR}/tmp.tgz"  compression="gzip">
142
                        <tarfileset dir="${base_dir}/${INSTALLER_DIR}" mode="755" >
143
                                <include name="tmp_gvSIGInstall/launcher-Linux"/>
144
                        </tarfileset>
145
                        <tarfileset dir="${base_dir}/${INSTALLER_DIR}">
146
                                <include name="tmp_gvSIGInstall/*"/>
147
                                <exclude name="tmp_gvSIGInstall/launcher-Linux"/>
148
                        </tarfileset>
149
                </tar>
150
                <echo message="#!/bin/sh${line.separator}" file="./${INSTALLER_DIR}/xx.tmp" />
151
                <echo message="lcount=59${line.separator}" file="./${INSTALLER_DIR}/xx.tmp" append="true" /> <!-- OJO SI SE TOCA EL FICHERO h_gvSIG-install.sh - 59 -> num de lineas del fichero + 2 -->
152
                <concat destfile="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" binary="true" >
153
                        <fileset file="${base_dir}/${INSTALLER_DIR}/xx.tmp"/>
154
                        <fileset file="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh"/>
155
                        <fileset file="${base_dir}/${INSTALLER_DIR}/tmp.tgz"/>
156
                </concat>
157
                <chmod file="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" perm="ugo+rx"/>
158
                <delete file="${base_dir}/${INSTALLER_DIR}/xx.tmp"/>
159
                <move file="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" todir="${OUTPUT_DIR}" />
160
                <chmod file="${OUTPUT_DIR}/${LINUXBIN}" perm="ugo+rx"/>
161
                <delete dir="${base_dir}/${INSTALLER_DIR}"/>
162

    
163

    
164

    
165
<!--                 PARA WINDOWS  -->
166
                <delete dir="${base_dir}/${INSTALLER_DIR}"/>
167
                <mkdir dir="${base_dir}/${INSTALLER_DIR}"/>
168
                <copy todir="${base_dir}/${INSTALLER_DIR}">
169
                        <fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3/dist"/>
170
                </copy>
171
                <delete file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini"/>
172
                <copy file="${DIR_WIN_GVSIG}/resources/launcher-Win32.ini.j15" tofile="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini"/>
173
                <replace file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini" token="%JARNAME%" value="${JARNAME}"/>
174
                <move file="${base_dir}/${JARNAME}" todir="./${INSTALLER_DIR}"/>
175
                <delete file="${base_dir}/${WINDOWSZIP}"/>
176
                <exec executable="${LAUNCHER7Z}">
177
                        <arg line="a -r ${WINDOWSZIP} ./${INSTALLER_DIR}/*"/>
178
                </exec>
179
                <copy file="${GVSIG_INSTALLDIR}/launcher/7z/dist_config.txt" tofile="./dist_config.txt"/>
180
                <replace file="${base_dir}/dist_config.txt" token="%TITLE%" value="${APPNAME}-${bversion}_${build.number}" />
181
                <concat destfile="${base_dir}/${WINDOWSEXE}" binary="true">
182
                        <fileset file="${GVSIG_INSTALLDIR}/launcher/7z/7zS.sfx"/>
183
                        <fileset file="${base_dir}/dist_config.txt"/>
184
                        <fileset file="${base_dir}/${WINDOWSZIP}"/>
185
                </concat>
186
                <move file="${WINDOWSEXE}" todir="${OUTPUT_DIR}"/>
187
        </target>
188

    
189
        <target name="InstallMac" description="Actualizador para MAC">
190
                <property name="mac_install_path_bin" value="${GVSIG_INSTALLDIR}/instalador-gvSIG-mac/actualizador.app/Contents/Resources/updates/gvSIGbin"/>
191
                <property name="mac_install_path_gvsig" value="${mac_install_path_bin}/gvSIG"/>
192
                <property name="mac_install_path_ext" value="${mac_install_path_gvsig}/extensiones"/>
193

    
194
                <delete >
195
                        <fileset dir="${mac_install_path_bin}" includes="**/**"/>
196
                </delete>
197

    
198
                <copy todir="${mac_install_path_bin}" file="bin/andami.jar"/>
199
                <copy todir="${mac_install_path_bin}/lib">
200
                        <fileset dir="bin/lib">
201
                                <include name="beans.jar"/>
202
                                <include name="gvsig-i18n.jar"/>
203
                                <include name="iver-utiles.jar"/>
204
                        </fileset>
205
                </copy>
206

    
207
                <copy todir="${mac_install_path_gvsig}">
208
                        <fileset dir=".">
209
                                <include name="extensiones/com.iver.cit.gvsig/text.properties"/>
210
                                <include name="extensiones/com.iver.cit.gvsig/config.xml"/>
211
                        </fileset>
212
                </copy>
213
                <copy todir="${mac_install_path_gvsig}">
214
                        <fileset dir=".">
215
                                <include name="extensiones/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/>
216
                                <include name="extensiones/com.iver.cit.gvsig/lib/driver-manager-1.1.jar"/>
217
                                <include name="extensiones/com.iver.cit.gvsig/lib/fmap-arcims.jar"/>
218
                                <include name="extensiones/com.iver.cit.gvsig/lib/gvsig-annotation.jar"/>
219
                                <include name="extensiones/com.iver.cit.gvsig/lib/gvsig-ui.jar"/>
220
                                <include name="extensiones/com.iver.cit.gvsig/lib/hsqldb_spatial.jar"/>
221
                                <include name="extensiones/com.iver.cit.gvsig/lib/mysql_spatial.jar"/>
222
                                <include name="extensiones/com.iver.cit.gvsig/lib/oracle_spatial.jar"/>
223
                                <include name="extensiones/com.iver.cit.gvsig/lib/postgis_spatial.jar"/>
224
                                <include name="extensiones/com.iver.cit.gvsig/lib/remote-clients-arcims.jar"/>
225
                                <include name="extensiones/com.iver.cit.gvsig/lib/fmap.jar"/>
226
                                <include name="extensiones/com.iver.cit.gvsig/lib/cms.jar"/>
227
                                <include name="extensiones/com.iver.cit.gvsig/lib/jcrs.jar"/>
228
                                <include name="extensiones/com.iver.cit.gvsig/lib/gdbms-0.8-SNAPSHOT.jar"/>
229
                                <include name="extensiones/com.iver.cit.gvsig/lib/remote-clients.jar"/>
230

    
231
                        </fileset>
232
                </copy>
233

    
234
                <copy todir="${mac_install_path_gvsig}">
235
                        <fileset dir=".">
236
                                <include name="extensiones/com.iver.cit.gvsig/drivers/dxf/*"/>
237
                        </fileset>
238
                </copy>
239

    
240
                <copy todir="${mac_install_path_gvsig}">
241
                        <fileset dir=".">
242
                                <include name="extensiones/com.iver.cit.gvsig/drivers/dbf/*"/>
243
                        </fileset>
244
                </copy>
245

    
246
                <copy todir="${mac_install_path_gvsig}">
247
                        <fileset dir=".">
248
                                <include name="extensiones/com.iver.cit.gvsig/drivers/dgn/*"/>
249
                        </fileset>
250
                </copy>
251

    
252
                <copy todir="${mac_install_path_gvsig}">
253
                        <fileset dir=".">
254
                                <include name="extensiones/com.iver.cit.gvsig/drivers/gml/*"/>
255
                        </fileset>
256
                </copy>
257

    
258
                <copy todir="${mac_install_path_gvsig}">
259
                        <fileset dir=".">
260
                                <include name="extensiones/com.iver.cit.gvsig/drivers/shp/*"/>
261
                        </fileset>
262
                </copy>
263

    
264
                <copy todir="${mac_install_path_gvsig}">
265
                        <fileset dir=".">
266
                                <include name="extensiones/com.iver.cit.gvsig/drivers/raster/*"/>
267
                        </fileset>
268
                </copy>
269

    
270

    
271
                <copy todir="${mac_install_path_ext}/com.iver.cit.gvsig.annotation/lib"
272
                        file="extensiones/com.iver.cit.gvsig.annotation/lib/com.iver.cit.gvsig.annotation.jar"/>
273

    
274
                <copy todir="${mac_install_path_ext}/com.iver.cit.gvsig.cad"
275
                                        file="extensiones/com.iver.cit.gvsig.cad/com.iver.cit.gvsig.cad.jar"/>
276

    
277
                <copy todir="${mac_install_path_ext}/com.iver.cit.gvsig.centerviewpoint"
278
                                        file="extensiones/com.iver.gvsig.centerviewpoint/com.iver.gvsig.centerviewpoint.jar"/>
279

    
280

    
281
                <copy todir="${mac_install_path_ext}/com.iver.gvsig.expresionfield"
282
                                        file="extensiones/com.iver.gvsig.expresionfield/com.iver.gvsig.expresionfield.jar"/>
283

    
284
                <copy todir="${mac_install_path_ext}/es.prodevelop.cit.gvsig.arcims"
285
                                        file="extensiones/es.prodevelop.cit.gvsig.arcims/es.prodevelop.cit.gvsig.arcims.jar"/>
286

    
287
                <copy todir="${mac_install_path_ext}/org.gvsig.crs"
288
                                        file="extensiones/org.gvsig.crs/org.gvsig.crs.jar"/>
289
                <copy todir="${mac_install_path_ext}/org.gvsig.crs"
290
                                        file="extensiones/org.gvsig.crs/text_pl.properties"/>
291

    
292
                <copy todir="${mac_install_path_gvsig}">
293
                        <fileset dir=".">
294
                                <include name="extensiones/com.iver.cit.gvsig.geoprocess/docs/com.iver.cit.gvsig.geoprocess.impl.dissolve.DissolveGeoprocessPlugin/description_cs.html"/>
295
                                <include name="extensiones/com.iver.cit.gvsig.geoprocess/docs/com.iver.cit.gvsig.geoprocess.impl.dissolve.DissolveGeoprocessPlugin/description_pl.html"/>
296
                        </fileset>
297
                </copy>
298

    
299
                <copy todir="${mac_install_path_gvsig}">
300
                        <fileset dir=".">
301
                                <include name="extensiones/com.iver.cit.gvsig.geoprocessextensions/docs/com.iver.cit.gvsig.geoprocess.impl.xyshift.XYShiftGeoprocessPlugin/description_cs.html"/>
302
                                <include name="extensiones/com.iver.cit.gvsig.geoprocessextensions/docs/com.iver.cit.gvsig.geoprocess.impl.xyshift.XYShiftGeoprocessPlugin/description_pl.html"/>
303
                        </fileset>
304
                </copy>
305

    
306
                <copy todir="${mac_install_path_ext}/org.gvsig.georeferencing"
307
                                        file="extensiones/org.gvsig.georeferencing/text_pt_br.properties"/>
308

    
309

    
310
                <copy todir="${mac_install_path_ext}/com.iver.cit.gvsig.jdbc_spatial"
311
                                        file="extensiones/com.iver.cit.gvsig.jdbc_spatial/com.iver.cit.gvsig.jdbc_spatial.jar"/>
312
                <copy todir="${mac_install_path_ext}/com.iver.cit.gvsig/drivers">
313
                        <fileset dir="extensiones/com.iver.cit.gvsig/drivers">
314
                                <include name="jdbc_spatial/*"/>
315
                        </fileset>
316
                </copy>
317

    
318

    
319
                <copy todir="${mac_install_path_ext}/com.iver.cit.gvsig.oracle_spatial"
320
                                        file="extensiones/com.iver.cit.gvsig.oracle_spatial/com.iver.cit.gvsig.oracle_spatial.jar"/>
321
                <copy todir="${mac_install_path_ext}/com.iver.cit.gvsig.oracle_spatial/images"
322
                                        file="extensiones/com.iver.cit.gvsig.oracle_spatial/images/jdbc.png"/>
323

    
324

    
325
                <copy todir="${mac_install_path_ext}/com.iver.core"
326
                                        file="extensiones/com.iver.core/text_pt_br.properties"/>
327
                <copy todir="${mac_install_path_ext}/com.iver.core"
328
                                        file="extensiones/com.iver.core/com.iver.core.jar"/>
329

    
330
                <copy todir="${mac_install_path_ext}">
331
                        <fileset dir="extensiones">
332
                                <include name="es.gva.cit.gvsig.catalogClient/**/**"/>
333
                        </fileset>
334
                </copy>
335

    
336

    
337
                <copy todir="${mac_install_path_ext}">
338
                        <fileset dir="extensiones">
339
                                <include name="**/build.number"/>
340
                        </fileset>
341
                </copy>
342
                <copy todir="${mac_install_path_ext}">
343
                        <fileset dir="extensiones">
344
                                <include name="**/text_ro.properties,**/text_en.properties,**/text_eu.properties,**/text_de.properties"/>
345
                        </fileset>
346
                </copy>
347
                <copy todir="${mac_install_path_ext}">
348
                        <fileset dir="extensiones">
349
                                <include name="**/about.htm"/>
350
                        </fileset>
351
                </copy>
352

    
353
                <ant antfile="build-updater.xml" dir="${GVSIG_INSTALLDIR}/instalador-gvSIG-mac">
354
                        <property name="NOMBRE_BUNDLE" value="${autoinstalador}"/>
355
                </ant>
356

    
357
                <zip destfile="${OUTPUT_DIR}/${MAC_10_ZIP}" basedir="${GVSIG_INSTALLDIR}/instalador-gvSIG-mac" includes="${autoinstalador}.app/**"/>
358

    
359
                <delete >
360
                        <fileset dir="${mac_install_path_bin}" includes="**"/>
361
                </delete>
362

    
363
                <delete dir="${GVSIG_INSTALLDIR}/instalador-gvSIG-mac/${autoinstalador}.app"/>
364
        </target>
365

    
366
        <target name="CleanDir" description="Limpiamos los directorios creados">
367

    
368
                <delete file="${base_dir}/${WINDOWSZIP}" />
369
                <delete file="${base_dir}/dist_config.txt" />
370
                <delete dir="${base_dir}/${INSTALLER_DIR}" />
371
                <delete dir="${base_dir}/tmpResources" />
372
                <delete dir="extensiones"/>
373
                <delete dir="bin"/>
374
        </target>
375

    
376
</project>