svn-gvsig-desktop / tags / v1_11_0_Build_1301 / install / instalador-gvSIG-mac / build-bundle.xml @ 43567
History | View | Annotate | Download (4.36 KB)
1 |
<project name="bundle-gvSIG" default="init" basedir="."> |
---|---|
2 |
<dirname file="${ant.file.bundle-gvSIG}" property="DIR_ORIGEN"/> |
3 |
<property name="DIR_WORKSPACE" location="${DIR_ORIGEN}/../../"/> |
4 |
|
5 |
<property name="DIR_DESTINO" value="${DIR_ORIGEN}"/> |
6 |
<!-- Este script crea el bundle gvSIG con script previo (para ajustar variables de entorno, p.ej)
|
7 |
y con librerias nativas -->
|
8 |
|
9 |
<property name="JUNIT_HOME" location="${DIR_WORKSPACE}/binaries/ant/" /> |
10 |
<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler"> |
11 |
<classpath>
|
12 |
<pathelement location="${DIR_WORKSPACE}/binaries/ant/jarbundler-1.9.jar"/> |
13 |
<pathelement location="${DIR_WORKSPACE}/_fwAndami/lib/xerces_2_5_0.jar"/> |
14 |
</classpath>
|
15 |
</taskdef>
|
16 |
|
17 |
<taskdef resource="net/sf/ant4eclipse/antlib.xml" > |
18 |
<classpath>
|
19 |
<pathelement location="${DIR_WORKSPACE}/binaries/ant/ant4eclipse-0.5.0.rc1.jar"/> |
20 |
</classpath>
|
21 |
</taskdef>
|
22 |
|
23 |
<property name="jvmversion" value="1.5*"/> |
24 |
|
25 |
<target name="init"> |
26 |
<getEclipseClasspath
|
27 |
property="tmp_andamiClasspath" |
28 |
workspace="${DIR_WORKSPACE}" |
29 |
projectName="_fwAndami" |
30 |
relative="yes" |
31 |
pathseparator="," |
32 |
runtime="true" |
33 |
/>
|
34 |
<concat destfile="${DIR_ORIGEN}/tmp_andamiClasspath">andami.jar,${tmp_andamiClasspath}</concat> |
35 |
<replace file="${DIR_ORIGEN}/tmp_andamiClasspath" |
36 |
token="_fwAndami/" |
37 |
value="" |
38 |
/>
|
39 |
<replace file="${DIR_ORIGEN}/tmp_andamiClasspath" |
40 |
token="bin," |
41 |
value="" |
42 |
/>
|
43 |
<replace file="${DIR_ORIGEN}/tmp_andamiClasspath" |
44 |
token="bin-test," |
45 |
value="" |
46 |
/>
|
47 |
<loadfile property="andamiClasspath" srcfile="${DIR_ORIGEN}/tmp_andamiClasspath"></loadfile> |
48 |
<delete file="${DIR_ORIGEN}/tmp_andamiClasspath"></delete> |
49 |
<echo>classPath=${andamiClasspath}</echo> |
50 |
<jarbundler
|
51 |
dir="${DIR_DESTINO}" |
52 |
name="${NOMBRE_BUNDLE}" |
53 |
mainclass="com.iver.andami.Launcher" |
54 |
arguments="gvSIG gvSIG/extensiones" |
55 |
bundleid="com.iver.cit.gvsig" |
56 |
developmentregion = "Spanish" |
57 |
icon="logo gvsig.icns" |
58 |
shortname="gvSIG" |
59 |
signature="gvSI" |
60 |
stubfile="preJava" |
61 |
version="${FULLVERSION}" |
62 |
build="${build.number}" |
63 |
infostring="gvSIG ${FULLVERSION}" |
64 |
vmoptions ="-Xmx500M" |
65 |
jvmversion ="${jvmversion}" |
66 |
extraclasspath = "jai_imageio.jar,${andamiClasspath}" |
67 |
workingdirectory = "$JAVAROOT" |
68 |
showplist="true" |
69 |
>
|
70 |
|
71 |
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/> |
72 |
<javaproperty name="java.library.path" value="$JAVAROOT/../NativeLibs"/> |
73 |
|
74 |
<!-- jarfileset no incluye nada, pero evita quejas de jarbundler -->
|
75 |
<jarfileset dir="${DIR_ORIGEN}" includes="nothing!" excludes="*"/> |
76 |
<javafileset dir="${DIR_WORKSPACE}/_fwAndami/" excludes="bin/ src/ src-test/ bin-test/ cachedir/ config/ docs/ schemas/ build.xml/ *.bat"/> |
77 |
</jarbundler>
|
78 |
|
79 |
<!-- tenemos ya un bundle con el script preJava, pero sin el "arrancador" de la JVM; hay que meterlo -->
|
80 |
<copy file="${DIR_ORIGEN}/JavaApplicationStub" todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/MacOS"/> |
81 |
<!-- (corregimos permisos de ejecucion que copy se ha cargado) -->
|
82 |
<chmod file="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/MacOS/*" perm="+rwxrxrx"/> |
83 |
|
84 |
<!-- ahora metemos las libs nativas...-->
|
85 |
<!-- crear dir NativeLibs-->
|
86 |
<mkdir dir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/NativeLibs"/> |
87 |
<!-- copiar dentro dylibs, jnilibs-->
|
88 |
<copy todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/NativeLibs" |
89 |
flatten="true" |
90 |
>
|
91 |
<fileset dir="${DIR_WORKSPACE}/binaries/mac/raster/" includes="**/*.dylib **/*.jnilib"/> |
92 |
<fileset dir="${DIR_WORKSPACE}/binaries/mac/crs/" includes="**/*.dylib **/*.jnilib"/> |
93 |
</copy>
|
94 |
<!-- copiar jars para JNI (jgdal, jmrsid) en gvSIG/extensiones/...-->
|
95 |
<!-- (primero asegurarnos de que no hay jgdal o jmrsid duplicados, lo cual provocarÃa error en gvSIG) -->
|
96 |
<delete>
|
97 |
<fileset dir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/Java/gvSIG/extensiones/com.iver.cit.gvsig/lib" includes="jgdal*.jar jmrsid*.jar"/> |
98 |
</delete>
|
99 |
<copy todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/Java/gvSIG/extensiones/com.iver.cit.gvsig/lib" |
100 |
flatten="true" |
101 |
>
|
102 |
<fileset dir="${DIR_WORKSPACE}/binaries/mac/raster/" includes="**/*.jar"/> |
103 |
</copy>
|
104 |
|
105 |
<!-- copiar JAI-ImageIO junto a andami.jar, para ser usado en classpath en vez de como extensión de la JVM-->
|
106 |
<copy file="jai_imageio.jar" todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/Java"/> |
107 |
|
108 |
</target>
|
109 |
|
110 |
</project>
|