Statistics
| Revision:

svn-gvsig-desktop / tags / v1_9_Build_1246 / install / instalador-gvSIG-mac / build-bundle.xml @ 43233

History | View | Annotate | Download (4.36 KB)

1 10614 mija
<project name="bundle-gvSIG" default="init" basedir=".">
2 17819 jmvivo
        <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 17802 mijail
        <!-- Este script crea el bundle gvSIG con script previo (para ajustar variables de entorno, p.ej)
7
        y con librerias nativas -->
8
9 17819 jmvivo
        <property name="JUNIT_HOME" location="${DIR_WORKSPACE}/binaries/ant/" />
10 17802 mijail
        <taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler">
11 13840 jmvivo
                <classpath>
12 17819 jmvivo
                        <pathelement location="${DIR_WORKSPACE}/binaries/ant/jarbundler-1.9.jar"/>
13
                        <pathelement location="${DIR_WORKSPACE}/_fwAndami/lib/xerces_2_5_0.jar"/>
14 13840 jmvivo
                </classpath>
15
        </taskdef>
16
17 17819 jmvivo
        <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 17802 mijail
    <property name="jvmversion" value="1.5*"/>
24 13840 jmvivo
25 10614 mija
        <target name="init">
26 17819 jmvivo
            <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 13840 jmvivo
                <jarbundler
51 17803 mijail
                        dir="${DIR_DESTINO}"
52 12510 mija
                        name="${NOMBRE_BUNDLE}"
53 10614 mija
                        mainclass="com.iver.andami.Launcher"
54
                        arguments="gvSIG gvSIG/extensiones"
55
                        bundleid="com.iver.cit.gvsig"
56
                        developmentregion = "Spanish"
57 13840 jmvivo
                        icon="logo gvsig.icns"
58
                        shortname="gvSIG"
59 21719 mijail
                        signature="gvSI"
60 17802 mijail
                        stubfile="preJava"
61 10614 mija
                        version="${FULLVERSION}"
62
                        build="${build.number}"
63
                        infostring="gvSIG ${FULLVERSION}"
64
                        vmoptions ="-Xmx500M"
65 17802 mijail
                        jvmversion ="${jvmversion}"
66 21719 mijail
                        extraclasspath = "jai_imageio.jar,${andamiClasspath}"
67 13840 jmvivo
                        workingdirectory  = "$JAVAROOT"
68 10614 mija
                        showplist="true"
69
                        >
70 13840 jmvivo
71 10614 mija
                        <javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
72
                        <javaproperty name="java.library.path" value="$JAVAROOT/../NativeLibs"/>
73 13840 jmvivo
74 10614 mija
                        <!-- jarfileset no incluye nada, pero evita quejas de jarbundler -->
75 17819 jmvivo
                        <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 10614 mija
                </jarbundler>
78
79 17802 mijail
                <!-- tenemos ya un bundle con el script preJava, pero sin el "arrancador" de la JVM; hay que meterlo -->
80 17819 jmvivo
                <copy file="${DIR_ORIGEN}/JavaApplicationStub" todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/MacOS"/>
81 17802 mijail
                <!-- (corregimos permisos de ejecucion que copy se ha cargado) -->
82 17803 mijail
                <chmod file="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/MacOS/*" perm="+rwxrxrx"/>
83 17802 mijail
84
                <!-- ahora metemos las libs nativas...-->
85
                <!-- crear dir NativeLibs-->
86 17803 mijail
                <mkdir dir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/NativeLibs"/>
87 17802 mijail
                <!-- copiar dentro dylibs, jnilibs-->
88 17803 mijail
                <copy         todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/NativeLibs"
89 17802 mijail
                                flatten="true"
90
                        >
91 17819 jmvivo
                        <fileset dir="${DIR_WORKSPACE}/binaries/mac/raster/" includes="**/*.dylib **/*.jnilib"/>
92
                        <fileset dir="${DIR_WORKSPACE}/binaries/mac/crs/" includes="**/*.dylib **/*.jnilib"/>
93 17802 mijail
                </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 17803 mijail
                          <fileset dir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/Java/gvSIG/extensiones/com.iver.cit.gvsig/lib" includes="jgdal*.jar jmrsid*.jar"/>
98 17802 mijail
                </delete>
99 17803 mijail
                <copy         todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/Java/gvSIG/extensiones/com.iver.cit.gvsig/lib"
100 17802 mijail
                                flatten="true"
101
                        >
102 17819 jmvivo
                        <fileset dir="${DIR_WORKSPACE}/binaries/mac/raster/" includes="**/*.jar"/>
103 17802 mijail
                </copy>
104 21719 mijail
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 10614 mija
        </target>
109
110
</project>