svn-gvsig-desktop / trunk / extensions / ext3Dgui / build.xml @ 18955
History | View | Annotate | Download (7.69 KB)
1 |
<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 |
<property name="extension-dir" location="../_fwAndami/gvSIG/extensiones" /> |
11 |
<property name="andami-lib" value="../_fwAndami/lib" /> |
12 |
<property name="logos-dir" location="../_fwAndami/theme" /> |
13 |
<property name="gvsig-lib" location="../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/lib" /> |
14 |
<property name="ext3Dgui-lib" value="../_fwAndami/gvSIG/extensiones/com.iver.ai2.gvsig3dgui/lib" /> |
15 |
<property name="binaries" location="../binaries/" /> |
16 |
<property environment="env" /> |
17 |
<property name="depman" value="${env.HOMEPATH}/DepMan/" /> |
18 |
<property name="depman-lin" value="${env.HOME}/.depman/" /> |
19 |
<import file="../binaries/ant/utilities.xml" /> |
20 |
<property name="depman.executable" value="depman/bin/dmn.py" /> |
21 |
|
22 |
<!--property name="binaries-dir" location="../binaries" /-->
|
23 |
|
24 |
<target name="compile" description="compile the source"> |
25 |
<!-- Compile the Java code from ${src} to ${build} -->
|
26 |
<antcall target="gvSIG-import-build-number" /> |
27 |
<mkdir dir="${build}" /> |
28 |
<loadEclipseClasspath project="${basedir}" /> |
29 |
<gvSIG-javac classpath="${eclipseClasspath}" /> |
30 |
</target>
|
31 |
|
32 |
<target name="batch-build" description="Builds all. This is called by appgvSIG script" depends="compile,create-jar,copy-files,move-to-andami"> |
33 |
</target>
|
34 |
|
35 |
<target name="init"> |
36 |
<!-- 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 |
<target name="create-jar"> |
44 |
<mkdir dir="${dist}" /> |
45 |
<mkdir dir="${dist}/lib" /> |
46 |
|
47 |
<jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}" /> |
48 |
</target>
|
49 |
|
50 |
<target name="copy-files"> |
51 |
<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 |
<fileset dir="images/" includes="**/**" excludes="**/*.db" /> |
60 |
</copy>
|
61 |
<copy todir="${extension-dir}/${plugin}"> |
62 |
<fileset dir="resources" includes="**/**" /> |
63 |
</copy>
|
64 |
|
65 |
<!--copy todir="lib/">
|
66 |
<fileset dir="${dist}/lib/" includes="*.jar" />
|
67 |
</copy-->
|
68 |
|
69 |
<copy todir="${dist}/lib"> |
70 |
<fileset dir="lib/" includes="**/**" excludes="com.iver.ai2.gvsig3d_share.jar" /> |
71 |
</copy>
|
72 |
<copy todir="${gvsig-lib}"> |
73 |
<fileset dir="lib/" includes="com.iver.ai2.gvsig3d_share.jar" /> |
74 |
</copy>
|
75 |
<copy todir="${andami-lib}"> |
76 |
<fileset dir="lib/" includes="gluegen*.jar,jogl*.jar,libjosg-*.jar,libNative*.jar" /> |
77 |
</copy>
|
78 |
|
79 |
</target>
|
80 |
|
81 |
<target name="move-to-andami"> |
82 |
<move todir="${extension-dir}/${plugin}"> |
83 |
<fileset dir="${dist}" includes="**/**" /> |
84 |
</move>
|
85 |
|
86 |
</target>
|
87 |
|
88 |
<target name="generate-without-source" description="generate the distribution without the source file" depends="create-jar,copy-files,move-to-andami"> |
89 |
</target>
|
90 |
|
91 |
<target name="clean" description="clean up"> |
92 |
<delete dir="${dist}" /> |
93 |
<delete dir="${build}" /> |
94 |
</target>
|
95 |
|
96 |
<target name="refresh-binaries"> |
97 |
<ant dir="../binaries" /> |
98 |
</target>
|
99 |
|
100 |
|
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 |
<property name="win-binaries" value="${binaries}/w32/3D" /> |
124 |
<mkdir dir="${win-binaries}" /> |
125 |
<copy todir="${win-binaries}"> |
126 |
<fileset dir="${depman}/bin/" includes="**/**" excludes="*.exe" /> |
127 |
</copy>
|
128 |
</target>
|
129 |
|
130 |
<target name="copy-linux-binaries" if="isLinux" depends="update-binaries-remote"> |
131 |
<property name="linux-binaries" value="${binaries}/linux/3D" /> |
132 |
<mkdir dir="${linux-binaries}" /> |
133 |
<copy todir="${linux-binaries}"> |
134 |
<fileset dir="${depman-lin}/lib/" includes="*.so*,**/*.so*" followsymlinks="false" /> |
135 |
</copy>
|
136 |
<echo>
|
137 |
OJO Falta los links |
138 |
</echo>
|
139 |
|
140 |
<exec executable="${basedir}/gen_simb_link.sh"> |
141 |
</exec>
|
142 |
<!--
|
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 |
</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 |
</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 |
<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 |
</project>
|