Statistics
| Revision:

root / trunk / extensions / ext3Dgui / build.xml @ 16302

History | View | Annotate | Download (6.14 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="logos-dir" location="../_fwAndami/theme" />
12
        <property name="gvsig-lib" location="../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/lib" />
13
        <property name="ext3Dgui-lib" value="../_fwAndami/gvSIG/extensiones/com.iver.ai2.gvsig3dgui/lib" />
14
        <property name="binaries" location="../binaries/" />
15
        <property environment="env" />
16
        <property name="depman" value="${env.HOMEPATH}/DepMan/" />
17
        <property name="depman-lin" value="${env.HOME}/.depman/" />
18
        <import file="../binaries/ant/utilities.xml" />
19
        <property name="depman.executable" value="depman/bin/dmn.py" />
20

    
21
        <!--property name="binaries-dir" location="../binaries" /-->
22

    
23
        <target name="compile" description="compile the source">
24
                <!-- Compile the Java code from ${src} to ${build} -->
25
                <antcall target="gvSIG-import-build-number" />
26
                <mkdir dir="${build}" />
27
                <loadEclipseClasspath project="${basedir}" />
28
                <gvSIG-javac classpath="${eclipseClasspath}" />
29
        </target>
30

    
31
        <target name="batch-build" description="Builds all. This is called by appgvSIG script" depends="compile,create-jar,copy-files,move-to-andami">
32
        </target>
33

    
34
        <target name="init">
35
                <!-- Create the time stamp -->
36
                <tstamp />
37
                <!-- Create the build directory structure used by compile -->
38
                <mkdir dir="${build}" />
39
                <!-- Creamos un fichero con el timeStamp para que lo lea el FPanelAbout -->
40
        </target>
41

    
42
        <target name="create-jar">
43
                <mkdir dir="${dist}" />
44
                <mkdir dir="${dist}/lib" />
45

    
46
                <jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}" />
47
        </target>
48

    
49
        <target name="copy-files">
50
                <copy file="config/config.xml" todir="${dist}" />
51
                <copy file="config/about.htm" todir="${dist}" />
52
                <replace casesensitive="true" file="${dist}/about.htm" token="#build.number#" value="${build.number}" />
53

    
54
                <copy todir="${dist}">
55
                        <fileset dir="config" includes="text*.properties" />
56
                </copy>
57
                <copy todir="${dist}/images">
58
                        <fileset dir="images/" includes="**/**" excludes="**/*.db" />
59
                </copy>
60
                <copy todir="${extension-dir}/${plugin}">
61
                        <fileset dir="resources" includes="**/**" />
62
                </copy>
63

    
64
                <!--copy todir="lib/">
65
                        <fileset dir="${dist}/lib/" includes="*.jar" />
66
                </copy-->
67

    
68
                <copy todir="${dist}/lib">
69
                        <fileset dir="lib/" includes="**/**" excludes="com.iver.ai2.gvsig3d_share.jar" />
70
                </copy>
71
                <copy todir="${gvsig-lib}">
72
                        <fileset dir="lib/" includes="com.iver.ai2.gvsig3d_share.jar" />
73
                </copy>
74

    
75
        </target>
76

    
77
        <target name="move-to-andami">
78
                <move todir="${extension-dir}/${plugin}">
79
                        <fileset dir="${dist}" includes="**/**" />
80
                </move>
81

    
82
        </target>
83

    
84
        <target name="generate-without-source" description="generate the distribution without the source file" depends="create-jar,copy-files,move-to-andami">
85
        </target>
86

    
87
        <target name="clean" description="clean up">
88
                <delete dir="${dist}" />
89
                <delete dir="${build}" />
90
        </target>
91

    
92
        <target name="refresh-binaries">
93
                <ant dir="../binaries" />
94
        </target>
95

    
96

    
97

    
98

    
99
        <condition property="isLinux">
100
                <os family="unix" />
101
        </condition>
102

    
103
        <condition property="isWindows">
104
                <or>
105
                        <os family="windows" />
106
                        <os family="win9x" />
107
                        <os name="Windows Vista" />
108
                </or>
109
        </condition>
110

    
111
        <condition property="isMac">
112
                <os family="mac" />
113
        </condition>
114

    
115
        <target name="copy-binaries" depends="copy-linux-binaries,copy-win-binaries">
116
        </target>
117

    
118
        <target name="copy-win-binaries" if="isWindows" depends="update-binaries-remote">
119
                <property name="win-binaries" value="${binaries}w32/3D" />
120
                <mkdir dir="${win-binaries}" />
121
                <copy todir="${win-binaries}">
122
                        <fileset dir="${depman}/bin/" includes="**/**" excludes="*.exe" />
123
                </copy>
124
        </target>
125

    
126
        <target name="copy-linux-binaries" if="isLinux" depends="update-binaries-remote">
127
                <property name="linux-binaries" value="${binaries}linux/3D" />
128
                <mkdir dir="${linux-binaries}" />
129
                <copy todir="${linux-binaries}">
130
                        <fileset dir="${depman-lin}/lib/" includes="*.so*" followsymlinks="false"/>
131
                </copy>
132
            <echo>
133
                        OJO Falta los links
134
                </echo>
135
                <!--
136
            <exec executable="bash">
137
                        <arg value="-c"/>
138
                        <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"/>
139
                </exec>
140
                <concat destfile="${linux-binaries}/install-3D.sh">#!bin/sh
141

142
                </concat>
143
                <concat destfile="${linux-binaries}/install-3D.sh" append="true">
144
                        <filelist dir="${linux-binaries}" files="install.sh.tmp"/>
145
                </concat>
146
                <delete file="${linux-binaries}/install.sh.tmp"/>
147
            <exec executable="bash">
148
                        <arg value="-c"/>
149
                        <arg value="cd ${depman-lin}/lib/ ; (find . -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/\1=\2/g' > ${linux-binaries}/links.properties)"/>
150
                </exec>
151
                -->
152

    
153

    
154
        </target>
155

    
156
        <target name="update-binaries-cache">
157
                <exec executable="python">
158
                        <arg value="${depman.executable}" />
159
                        <arg value="update" />
160
                        <arg value="--cache" />
161
                </exec>
162
        </target>
163

    
164
        <target name="update-binaries-remote">
165
                <exec executable="python">
166
                        <arg value="${depman.executable}" />
167
                        <arg value="update" />
168
                        <arg value="--remote" />
169
                </exec>
170
        </target>
171

    
172
        <target name="update-binaries-atifglrx-remote">
173
                <exec executable="python">
174
                        <arg value="${depman.executable}" />
175
                        <arg value="update" />
176
                        <arg value="depman-atifglrx.xml" />
177
                        <arg value="--remote" />
178
                </exec>
179
        </target>
180

    
181
        <target name="get-win-binaries">
182
                <exec executable="python">
183
                        <arg value="${depman.executable}" />
184
                        <arg value="--platform" />
185
                        <arg value="win" />
186
                        <arg value="update" />
187
                </exec>
188
        </target>
189
        <target name="get-linux-binaries">
190
                <exec executable="python">
191
                        <arg value="${depman.executable}" />
192
                        <arg value="--platform" />
193
                        <arg value="linux" />
194
                        <arg value="update" />
195
                </exec>
196
        </target>
197

    
198

    
199
</project>