Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / ext3Dgui / build.xml @ 16458

History | View | Annotate | Download (6.33 KB)

1 15361 afraile
<project name="Generar extension en Andami ext3DGUI" default="generate-without-source" basedir=".">
2
        <description>
3
        Instala el plugin de ejemplo en Andami.
4
    </description>
5
        <!-- set global properties for this build -->
6
        <property name="src" location="src" />
7
        <property name="build" location="bin" />
8
        <property name="dist" location="dist" />
9
        <property name="plugin" value="com.iver.ai2.gvsig3dgui" />
10 16337 jmvivo
        <property name="extension-dir" location="../_fwAndami/gvSIG/extensiones" />
11 16304 jcampos
        <property name="andami-lib" value="../_fwAndami/lib" />
12 15361 afraile
        <property name="logos-dir" location="../_fwAndami/theme" />
13 15373 afraile
        <property name="gvsig-lib" location="../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/lib" />
14 16278 jcampos
        <property name="ext3Dgui-lib" value="../_fwAndami/gvSIG/extensiones/com.iver.ai2.gvsig3dgui/lib" />
15 16302 jmvivo
        <property name="binaries" location="../binaries/" />
16 16278 jcampos
        <property environment="env" />
17 16302 jmvivo
        <property name="depman" value="${env.HOMEPATH}/DepMan/" />
18
        <property name="depman-lin" value="${env.HOME}/.depman/" />
19 16278 jcampos
        <import file="../binaries/ant/utilities.xml" />
20 16280 jcampos
        <property name="depman.executable" value="depman/bin/dmn.py" />
21 15406 julio
22 15361 afraile
        <!--property name="binaries-dir" location="../binaries" /-->
23
24 16278 jcampos
        <target name="compile" description="compile the source">
25 16267 jmvivo
                <!-- Compile the Java code from ${src} to ${build} -->
26 16278 jcampos
                <antcall target="gvSIG-import-build-number" />
27 16267 jmvivo
                <mkdir dir="${build}" />
28 16278 jcampos
                <loadEclipseClasspath project="${basedir}" />
29
                <gvSIG-javac classpath="${eclipseClasspath}" />
30
        </target>
31 15361 afraile
32 16278 jcampos
        <target name="batch-build" description="Builds all. This is called by appgvSIG script" depends="compile,create-jar,copy-files,move-to-andami">
33 15361 afraile
        </target>
34
35 15406 julio
        <target name="init">
36 15361 afraile
                <!-- Create the time stamp -->
37
                <tstamp />
38
                <!-- Create the build directory structure used by compile -->
39
                <mkdir dir="${build}" />
40
                <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
41
        </target>
42
43 16267 jmvivo
        <target name="create-jar">
44 15361 afraile
                <mkdir dir="${dist}" />
45
                <mkdir dir="${dist}/lib" />
46 16267 jmvivo
47 15361 afraile
                <jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}" />
48 16267 jmvivo
        </target>
49 15361 afraile
50 16267 jmvivo
        <target name="copy-files">
51 15361 afraile
                <copy file="config/config.xml" todir="${dist}" />
52
                <copy file="config/about.htm" todir="${dist}" />
53
                <replace casesensitive="true" file="${dist}/about.htm" token="#build.number#" value="${build.number}" />
54
55
                <copy todir="${dist}">
56
                        <fileset dir="config" includes="text*.properties" />
57
                </copy>
58
                <copy todir="${dist}/images">
59 15406 julio
                        <fileset dir="images/" includes="**/**" excludes="**/*.db" />
60 16267 jmvivo
                </copy>
61 15373 afraile
                <copy todir="${extension-dir}/${plugin}">
62 16267 jmvivo
                        <fileset dir="resources" includes="**/**" />
63 15361 afraile
                </copy>
64
65 16267 jmvivo
                <!--copy todir="lib/">
66
                        <fileset dir="${dist}/lib/" includes="*.jar" />
67
                </copy-->
68 15361 afraile
69 16267 jmvivo
                <copy todir="${dist}/lib">
70 16278 jcampos
                        <fileset dir="lib/" includes="**/**" excludes="com.iver.ai2.gvsig3d_share.jar" />
71 16267 jmvivo
                </copy>
72
                <copy todir="${gvsig-lib}">
73
                        <fileset dir="lib/" includes="com.iver.ai2.gvsig3d_share.jar" />
74 16337 jmvivo
                </copy>
75 16304 jcampos
                <copy todir="${andami-lib}">
76 16337 jmvivo
                        <fileset dir="lib/" includes="gluegen*.jar,jogl*.jar,libjosg-*.jar,libNative*.jar" />
77 16267 jmvivo
                </copy>
78 15361 afraile
79 16267 jmvivo
        </target>
80 15361 afraile
81 16267 jmvivo
        <target name="move-to-andami">
82
                <move todir="${extension-dir}/${plugin}">
83
                        <fileset dir="${dist}" includes="**/**" />
84
                </move>
85 15361 afraile
86
        </target>
87
88 16278 jcampos
        <target name="generate-without-source" description="generate the distribution without the source file" depends="create-jar,copy-files,move-to-andami">
89 15406 julio
        </target>
90
91 16267 jmvivo
        <target name="clean" description="clean up">
92
                <delete dir="${dist}" />
93
                <delete dir="${build}" />
94 15361 afraile
        </target>
95 16267 jmvivo
96
        <target name="refresh-binaries">
97
                <ant dir="../binaries" />
98
        </target>
99
100 16278 jcampos
101
102
103
        <condition property="isLinux">
104
                <os family="unix" />
105
        </condition>
106
107
        <condition property="isWindows">
108
                <or>
109
                        <os family="windows" />
110
                        <os family="win9x" />
111
                        <os name="Windows Vista" />
112
                </or>
113
        </condition>
114
115
        <condition property="isMac">
116
                <os family="mac" />
117
        </condition>
118
119
        <target name="copy-binaries" depends="copy-linux-binaries,copy-win-binaries">
120
        </target>
121
122
        <target name="copy-win-binaries" if="isWindows" depends="update-binaries-remote">
123 16346 jmvivo
                <property name="win-binaries" value="${binaries}/w32/3D" />
124 16278 jcampos
                <mkdir dir="${win-binaries}" />
125
                <copy todir="${win-binaries}">
126
                        <fileset dir="${depman}/bin/" includes="**/**" excludes="*.exe" />
127
                </copy>
128
        </target>
129
130 16302 jmvivo
        <target name="copy-linux-binaries" if="isLinux" depends="update-binaries-remote">
131 16346 jmvivo
                <property name="linux-binaries" value="${binaries}/linux/3D" />
132 16278 jcampos
                <mkdir dir="${linux-binaries}" />
133
                <copy todir="${linux-binaries}">
134 16458 jmvivo
                        <fileset dir="${depman-lin}/lib/" includes="*.so*,**/*.so*" followsymlinks="false"/>
135 16302 jmvivo
                </copy>
136 16337 jmvivo
            <echo>
137 16302 jmvivo
                        OJO Falta los links
138
                </echo>
139
                <!--
140
            <exec executable="bash">
141
                        <arg value="-c"/>
142
                        <arg value="find ${depman-lin}/lib/ -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/ln -s \2 \1/g' > ${linux-binaries}/install.sh.tmp"/>
143
                </exec>
144
                <concat destfile="${linux-binaries}/install-3D.sh">#!bin/sh
145

146
                </concat>
147
                <concat destfile="${linux-binaries}/install-3D.sh" append="true">
148
                        <filelist dir="${linux-binaries}" files="install.sh.tmp"/>
149
                </concat>
150
                <delete file="${linux-binaries}/install.sh.tmp"/>
151
            <exec executable="bash">
152
                        <arg value="-c"/>
153
                        <arg value="cd ${depman-lin}/lib/ ; (find . -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/\1=\2/g' > ${linux-binaries}/links.properties)"/>
154
                </exec>
155
                -->
156
157
158 16278 jcampos
        </target>
159
160
        <target name="update-binaries-cache">
161
                <exec executable="python">
162
                        <arg value="${depman.executable}" />
163
                        <arg value="update" />
164
                        <arg value="--cache" />
165
                </exec>
166
        </target>
167
168
        <target name="update-binaries-remote">
169
                <exec executable="python">
170
                        <arg value="${depman.executable}" />
171
                        <arg value="update" />
172
                        <arg value="--remote" />
173
                </exec>
174
        </target>
175
176
        <target name="update-binaries-atifglrx-remote">
177
                <exec executable="python">
178
                        <arg value="${depman.executable}" />
179
                        <arg value="update" />
180
                        <arg value="depman-atifglrx.xml" />
181
                        <arg value="--remote" />
182
                </exec>
183
        </target>
184
185 16280 jcampos
        <target name="get-win-binaries">
186
                <exec executable="python">
187
                        <arg value="${depman.executable}" />
188
                        <arg value="--platform" />
189
                        <arg value="win" />
190
                        <arg value="update" />
191
                </exec>
192
        </target>
193
        <target name="get-linux-binaries">
194
                <exec executable="python">
195
                        <arg value="${depman.executable}" />
196
                        <arg value="--platform" />
197
                        <arg value="linux" />
198
                        <arg value="update" />
199
                </exec>
200
        </target>
201
202
203 15361 afraile
</project>