Statistics
| Revision:

svn-gvsig-desktop / tags / tmp_build / extensions / ext3Dgui / maven-build.xml @ 24305

History | View | Annotate | Download (4.74 KB)

1
<project name="copy-native" default="install-binaries" basedir=".">
2
        <description>
3
                Downloads and copy all native dependencies.
4
        </description>
5
        <property name="binaries" location="${basedir}/../binaries/" />
6
        <property name="buildman.executable" location="${basedir}/buildman/bin/bmn.py" />
7
        <property environment="env" />
8
        <condition property="depman" value="${env.HOMEPATH}/DepMan/">
9
                <or>
10
                        <os family="windows" />
11
                        <os family="win9x" />
12
                        <os name="Windows Vista" />
13
                </or>
14
        </condition>
15
        <condition property="depman" value="${env.HOME}/.depman/">
16
                <and>
17
                        <os family="unix" />
18
                        <not>
19
                                <os family="mac" />
20
                        </not>
21
                </and>
22
        </condition>
23
        <condition property="depman" value="/Developer/DepMan/">
24
                <os family="mac" />
25
        </condition>
26

    
27
        <condition property="isLinux">
28
                <os family="unix" />
29
        </condition>
30
        <condition property="isWindows">
31
                <or>
32
                        <os family="windows" />
33
                        <os family="win9x" />
34
                        <os name="Windows Vista" />
35
                </or>
36
        </condition>
37
        <condition property="isMac">
38
                <os family="mac" />
39
        </condition>
40
        
41
        <condition property="binaries-dir" value="${binaries}/w32/3D">
42
                <or>
43
                        <os family="windows" />
44
                        <os family="win9x" />
45
                        <os name="Windows Vista" />
46
                </or>
47
        </condition>
48
        <condition property="binaries-dir" value="${binaries}/linux/3D">
49
                <os family="unix" />
50
        </condition>
51
        <condition property="binaries-dir" value="${binaries}/mac/3D">
52
                <os family="mac" />
53
        </condition>
54
        
55
        
56
        <target name="install-binaries" depends="copy-binaries">
57
                <copy todir="${install-binaries-dir}">
58
                        <fileset dir="${binaries-dir}" includes="**/**"
59
                                excludes="*.exe,*.head,links.properties" />
60
                </copy>
61
        </target>
62

    
63
        <target name="copy-binaries"
64
                depends="copy-linux-binaries,copy-win-binaries,copy-mac-binaries">
65
        </target>
66

    
67
        <target name="copy-win-binaries" if="isWindows"
68
                depends="update-binaries-remote">
69
                <mkdir dir="${binaries-dir}" />
70
                <copy todir="${binaries-dir}">
71
                        <fileset dir="${depman}/bin/" includes="**/**"
72
                                excludes="*.exe" />
73
                </copy>
74
        </target>
75

    
76
        <target name="copy-linux-binaries" if="isLinux"
77
                depends="update-binaries-remote">
78
                <mkdir dir="${binaries-dir}" />
79
                <copy todir="${binaries-dir}">
80
                        <fileset dir="${depman}/lib/" includes="*.so*,**/*.so*"
81
                                followsymlinks="false" />
82
                </copy>
83

    
84
                <exec executable="${basedir}/gen_simb_link.sh" />
85

    
86
                <exec executable="${binaries-dir}/install-3D.sh" dir="${install-binaries-dir}/../" />
87
                <!--
88
                        <exec executable="bash">
89
                        <arg value="-c"/>
90
                        <arg value="find ${depman}/lib/ -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/ln -s \2 \1/g' > ${binaries-dir}/install.sh.tmp"/>
91
                        </exec>
92
                        <concat destfile="${binaries-dir}/install-3D.sh">#!bin/sh
93
                        
94
                        </concat>
95
                        <concat destfile="${binaries-dir}/install-3D.sh" append="true">
96
                        <filelist dir="${binaries-dir}" files="install.sh.tmp"/>
97
                        </concat>
98
                        <delete file="${binaries-dir}/install.sh.tmp"/>
99
                        <exec executable="bash">
100
                        <arg value="-c"/>
101
                        <arg value="cd ${depman}/lib/ ; (find . -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/\1=\2/g' > ${binaries-dir}/links.properties)"/>
102
                        </exec>
103
                -->
104
        </target>
105
        <target name="copy-mac-binaries" if="isMac"
106
                depends="update-binaries-remote">
107
                <mkdir dir="${binaries-dir}" />
108
                <copy todir="${binaries-dir}">
109
                        <fileset dir="${depman}/lib/"
110
                                includes="*.so*,**/*.so*,*.dylib*,**/*.dylib*,*.jnilib*,**/*.jnilib*" />
111
                </copy>
112

    
113
                <!--exec executable="${basedir}/gen_simb_link_mac.sh" / -->
114

    
115
                <!--
116
                        <exec executable="bash">
117
                        <arg value="-c"/>
118
                        <arg value="find ${depman}/lib/ -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/ln -s \2 \1/g' > ${binaries-dir}/install.sh.tmp"/>
119
                        </exec>
120
                        <concat destfile="${binaries-dir}/install-3D.sh">#!bin/sh
121
                        
122
                        </concat>
123
                        <concat destfile="${binaries-dir}/install-3D.sh" append="true">
124
                        <filelist dir="${binaries-dir}" files="install.sh.tmp"/>
125
                        </concat>
126
                        <delete file="${binaries-dir}/install.sh.tmp"/>
127
                        <exec executable="bash">
128
                        <arg value="-c"/>
129
                        <arg value="cd ${depman}/lib/ ; (find . -type l -exec ls -l {} ';' | sed 's/.*[.][/]//g' | sed 's/\(.*\) -> \(.*\)$/\1=\2/g' > ${binaries-dir}/links.properties)"/>
130
                        </exec>
131
                -->
132
        </target>
133

    
134

    
135
        <target name="update-binaries-cache">
136
                <exec executable="python">
137
                        <arg value="${buildman.executable}" />
138
                        <arg value="update" />
139
                        <arg value="--cache" />
140
                </exec>
141
        </target>
142

    
143
        <target name="update-binaries-remote">
144
                <exec executable="python">
145
                        <arg value="${buildman.executable}" />
146
                        <arg value="update" />
147
                        <arg value="--remote" />
148
                </exec>
149
        </target>
150

    
151
        <target name="update-binaries-atifglrx-remote">
152
                <exec executable="python">
153
                        <arg value="${buildman.executable}" />
154
                        <arg value="update" />
155
                        <arg value="--file" />
156
                        <arg value="depman-atifglrx.xml" />
157
                        <arg value="--remote" />
158
                </exec>
159
        </target>
160
</project>