svn-gvsig-desktop / trunk / extensions / ext3Dgui / build.xml @ 20245
History | View | Annotate | Download (7.69 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 | 20146 | jcampos | <!--copy todir="${andami-lib}">
|
76 | 16337 | jmvivo | <fileset dir="lib/" includes="gluegen*.jar,jogl*.jar,libjosg-*.jar,libNative*.jar" />
|
77 | 20146 | jcampos | </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 | 17524 | jcampos | <fileset dir="${depman-lin}/lib/" includes="*.so*,**/*.so*" followsymlinks="false" /> |
135 | 16302 | jmvivo | </copy>
|
136 | 17524 | jcampos | <echo>
|
137 | 16302 | jmvivo | OJO Falta los links |
138 | </echo>
|
||
139 | 17524 | jcampos | |
140 | <exec executable="${basedir}/gen_simb_link.sh"> |
||
141 | </exec>
|
||
142 | 16302 | jmvivo | <!--
|
143 | <exec executable="bash">
|
||
144 | <arg value="-c"/>
|
||
145 | <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"/>
|
||
146 | </exec>
|
||
147 | <concat destfile="${linux-binaries}/install-3D.sh">#!bin/sh
|
||
148 | |||
149 | </concat>
|
||
150 | <concat destfile="${linux-binaries}/install-3D.sh" append="true">
|
||
151 | <filelist dir="${linux-binaries}" files="install.sh.tmp"/>
|
||
152 | </concat>
|
||
153 | <delete file="${linux-binaries}/install.sh.tmp"/>
|
||
154 | <exec executable="bash">
|
||
155 | <arg value="-c"/>
|
||
156 | <arg value="cd ${depman-lin}/lib/ ; (find . -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/\1=\2/g' > ${linux-binaries}/links.properties)"/>
|
||
157 | </exec>
|
||
158 | -->
|
||
159 | |||
160 | |||
161 | 17524 | jcampos | </target>
|
162 | |||
163 | <target name="copy-linux-binaries-complete" if="isLinux" depends="update-binaries-remote"> |
||
164 | <property name="linux-binaries" value="${binaries}/linux/3D" /> |
||
165 | <delete includeemptydirs="true"> |
||
166 | <fileset dir="${linux-binaries}/.." includes="**/*" excludes="*.head"/> |
||
167 | </delete>
|
||
168 | <mkdir dir="${linux-binaries}" /> |
||
169 | <copy todir="${linux-binaries}"> |
||
170 | <fileset dir="${depman-lin}/lib/" includes="*.so*,**/*.so*" followsymlinks="false" /> |
||
171 | </copy>
|
||
172 | <echo>
|
||
173 | Generando fichero de links simbolicos |
||
174 | </echo>
|
||
175 | |||
176 | <exec executable="${basedir}/gen_simb_link.sh"> |
||
177 | </exec>
|
||
178 | <!--
|
||
179 | <exec executable="bash">
|
||
180 | <arg value="-c"/>
|
||
181 | <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"/>
|
||
182 | </exec>
|
||
183 | <concat destfile="${linux-binaries}/install-3D.sh">#!bin/sh
|
||
184 | |||
185 | </concat>
|
||
186 | <concat destfile="${linux-binaries}/install-3D.sh" append="true">
|
||
187 | <filelist dir="${linux-binaries}" files="install.sh.tmp"/>
|
||
188 | </concat>
|
||
189 | <delete file="${linux-binaries}/install.sh.tmp"/>
|
||
190 | <exec executable="bash">
|
||
191 | <arg value="-c"/>
|
||
192 | <arg value="cd ${depman-lin}/lib/ ; (find . -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/\1=\2/g' > ${linux-binaries}/links.properties)"/>
|
||
193 | </exec>
|
||
194 | -->
|
||
195 | |||
196 | |||
197 | 16278 | jcampos | </target>
|
198 | |||
199 | <target name="update-binaries-cache"> |
||
200 | <exec executable="python"> |
||
201 | <arg value="${depman.executable}" /> |
||
202 | <arg value="update" /> |
||
203 | <arg value="--cache" /> |
||
204 | </exec>
|
||
205 | </target>
|
||
206 | |||
207 | <target name="update-binaries-remote"> |
||
208 | <exec executable="python"> |
||
209 | <arg value="${depman.executable}" /> |
||
210 | <arg value="update" /> |
||
211 | <arg value="--remote" /> |
||
212 | </exec>
|
||
213 | </target>
|
||
214 | |||
215 | <target name="update-binaries-atifglrx-remote"> |
||
216 | <exec executable="python"> |
||
217 | <arg value="${depman.executable}" /> |
||
218 | <arg value="update" /> |
||
219 | <arg value="depman-atifglrx.xml" /> |
||
220 | <arg value="--remote" /> |
||
221 | </exec>
|
||
222 | </target>
|
||
223 | |||
224 | 16280 | jcampos | <target name="get-win-binaries"> |
225 | <exec executable="python"> |
||
226 | <arg value="${depman.executable}" /> |
||
227 | <arg value="--platform" /> |
||
228 | <arg value="win" /> |
||
229 | <arg value="update" /> |
||
230 | </exec>
|
||
231 | </target>
|
||
232 | <target name="get-linux-binaries"> |
||
233 | <exec executable="python"> |
||
234 | <arg value="${depman.executable}" /> |
||
235 | <arg value="--platform" /> |
||
236 | <arg value="linux" /> |
||
237 | <arg value="update" /> |
||
238 | </exec>
|
||
239 | </target>
|
||
240 | |||
241 | |||
242 | 15361 | afraile | </project> |