Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_0_Build_2001 / install / instalador-gvSIG-mac / build-bundle.xml @ 32770

History | View | Annotate | Download (4.11 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
                        stubfile="preJava"
60
                        version="${FULLVERSION}"
61
                        build="${build.number}"
62
                        infostring="gvSIG ${FULLVERSION}"
63
                        vmoptions ="-Xmx500M"
64
                        jvmversion ="${jvmversion}"
65
                        extraclasspath = "${andamiClasspath}"
66
                        workingdirectory  = "$JAVAROOT"
67
                        showplist="true"
68
                        >
69

    
70
                        <javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
71
                        <javaproperty name="java.library.path" value="$JAVAROOT/../NativeLibs"/>
72

    
73
                        <!-- jarfileset no incluye nada, pero evita quejas de jarbundler -->
74
                        <jarfileset dir="${DIR_ORIGEN}" includes="nothing!" excludes="*"/>
75
                        <javafileset dir="${DIR_WORKSPACE}/_fwAndami/" excludes="bin/ src/ src-test/ bin-test/ cachedir/ config/ docs/ schemas/ build.xml/ *.bat"/>
76
                </jarbundler>
77

    
78
                <!-- tenemos ya un bundle con el script preJava, pero sin el "arrancador" de la JVM; hay que meterlo -->
79
                <copy file="${DIR_ORIGEN}/JavaApplicationStub" todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/MacOS"/>
80
                <!-- (corregimos permisos de ejecucion que copy se ha cargado) -->
81
                <chmod file="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/MacOS/*" perm="+rwxrxrx"/>
82

    
83
                <!-- ahora metemos las libs nativas...-->
84
                <!-- crear dir NativeLibs-->
85
                <mkdir dir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/NativeLibs"/>
86
                <!-- copiar dentro dylibs, jnilibs-->
87
                <copy         todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/NativeLibs"
88
                                flatten="true"
89
                        >
90
                        <fileset dir="${DIR_WORKSPACE}/binaries/mac/raster/" includes="**/*.dylib **/*.jnilib"/>
91
                        <fileset dir="${DIR_WORKSPACE}/binaries/mac/crs/" includes="**/*.dylib **/*.jnilib"/>
92
                </copy>
93
                <!-- copiar jars para JNI (jgdal, jmrsid) en gvSIG/extensiones/...-->
94
                <!-- (primero asegurarnos de que no hay jgdal o jmrsid duplicados, lo cual provocaría error en gvSIG) -->
95
                <delete>
96
                          <fileset dir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/Java/gvSIG/extensiones/com.iver.cit.gvsig/lib" includes="jgdal*.jar jmrsid*.jar"/>
97
                </delete>
98
                <copy         todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/Resources/Java/gvSIG/extensiones/com.iver.cit.gvsig/lib"
99
                                flatten="true"
100
                        >
101
                        <fileset dir="${DIR_WORKSPACE}/binaries/mac/raster/" includes="**/*.jar"/>
102
                </copy>
103
        </target>
104

    
105
</project>