svn-gvsig-desktop / tags / gvsig_redes-1_0_0-1234 / extensions / ext3Dgui / distribution / build.xml @ 41712
History | View | Annotate | Download (11.3 KB)
1 |
<?xml version="1.0" ?>
|
---|---|
2 |
<project default="main"> |
3 |
|
4 |
|
5 |
<property file="./build.number"/> |
6 |
<!--COMPROBAR EXTENSIONES -->
|
7 |
<!--property name="version" value="1.9b" />
|
8 |
<property name="bversion" value="build_${build.number}" />
|
9 |
<property name="APPNAME" value="gvSIG3D" />
|
10 |
<property name="OUTPUT_DIR" location="./target/installers" /-->
|
11 |
|
12 |
|
13 |
<property name="DIR_LIN" location="./distribution/linux-distribution" /> |
14 |
<property name="DIR_WIN" location="./distribution/win-distribution" /> |
15 |
<property name="DIR_MAC" location="./mac-distribution" /> |
16 |
<property name="baseFileName" value="${APPNAME}-${version}-build-${bversion}" /> |
17 |
<property name="LINUXBIN" value="${baseFileName}-linux-i586.bin" /> |
18 |
<property name="LINUXBINWITHJRE" value="${baseFileName}-linux-i586-withjre.bin" /> |
19 |
<property name="WINDOWSZIP" value="${baseFileName}-windows-i586.7z" /> |
20 |
<property name="WINDOWSEXE" value="${baseFileName}-windows-i586.exe" /> |
21 |
<property name="WINDOWSEXEWITHJRE" value="${baseFileName}-windows-i586-withjre.exe" /> |
22 |
<property name="MAC_10_ZIP" value="${baseFileName}-mac-10_4.zip" /> |
23 |
<property name="JARNAME" value="${APPNAME}-${bversion}.jar" /> |
24 |
<property name="INSTALLER_DIR" value="${APPNAME}-${version}_installer" /> |
25 |
<property name="nombre_autoinstalador" value="gvSIG ${version} build ${build.number} autoinstalador" /> |
26 |
<!--OJO!!!! HAY QUE REVISAR ESTO -->
|
27 |
<property environment="env" /> |
28 |
|
29 |
|
30 |
<condition property="LAUNCHER7Z" value="../build/distribution/launcher/7z/7za" else="../build/distribution/launcher/7z/7z.exe"> |
31 |
<os family="unix" /> |
32 |
</condition>
|
33 |
<!--condition property="LAUNCHER7Z" value="7za" else="7z.exe">
|
34 |
<os family="unix" />
|
35 |
</condition-->
|
36 |
|
37 |
<condition property="Lang.Is.Spanish"> |
38 |
<contains string="${env.LANG}" substring="es" /> |
39 |
</condition>
|
40 |
<condition property="directorio.base"> |
41 |
<available file="../install" type="dir" /> |
42 |
</condition>
|
43 |
|
44 |
<target name="E_Spanish" if="Lang.Is.Spanish"> |
45 |
<property name="ERROR_BASEDIR" value="Este script debe invocarse desde el directorio install del workspace" /> |
46 |
</target>
|
47 |
|
48 |
<target name="E_notSpanish" unless="Lang.Is.Spanish"> |
49 |
<property name="ERROR_BASEDIR" value="This script must be run from the workspace\install's directory" /> |
50 |
</target>
|
51 |
|
52 |
<target name="check" depends="E_Spanish,E_notSpanish"> |
53 |
<fail message="${ERROR_BASEDIR}" unless="directorio.base" /> |
54 |
</target>
|
55 |
|
56 |
<!-- target name="main" depends="Linux,Windows" -->
|
57 |
<target name="main" depends="Linux,Windows"> |
58 |
<echo message="DISTRIBUCION" /> |
59 |
</target>
|
60 |
<!--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
61 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
62 |
-->
|
63 |
<target name="Linux" depends="CreateJarLin,InstallationLin,concatenation,cleanDirLIN"> |
64 |
<echo> ********************************************* </echo> |
65 |
<echo> ******** LINUX DONE *********</echo> |
66 |
<echo> ********************************************* </echo> |
67 |
</target>
|
68 |
|
69 |
<target name="CreateJarLin" description="Generacion del instalador(jar) para Linux"> |
70 |
<!-- Generamos el instalador (jar) para Linux -->
|
71 |
<delete file="../${JARNAME}" /> |
72 |
<ant dir="${DIR_LIN}"> |
73 |
<property name="JARNAME" value="${JARNAME}" /> |
74 |
<property name="GVSIG_VERSION" value="${version}" /> |
75 |
<property name="APPNAME" value="${APPNAME}" /> |
76 |
</ant>
|
77 |
</target>
|
78 |
<target name="InstallationLin" description="Generacion de la distribucion"> |
79 |
<echo> ********************************************* </echo> |
80 |
<echo> Buildnumber----> ${build.number} --- version--> ${version}</echo> |
81 |
<echo> ********************************************* </echo> |
82 |
|
83 |
<!-- INSTALACION PARA LINUX -->
|
84 |
<delete dir="${DIR_LIN}/${INSTALLER_DIR}" /> |
85 |
<mkdir dir="${DIR_LIN}/${INSTALLER_DIR}/tmp_gvSIGInstall" /> |
86 |
<move todir="${DIR_LIN}/${INSTALLER_DIR}/tmp_gvSIGInstall"> |
87 |
<fileset file="./${JARNAME}" /> |
88 |
</move>
|
89 |
|
90 |
<!-- carpetas CVS no se copiaran, ANT las excluye por defecto -->
|
91 |
<copy todir="${DIR_LIN}/${INSTALLER_DIR}/tmp_gvSIGInstall"> |
92 |
<fileset dir="../build/distribution/launcher/izpack-launcher-1.3_linux/dist"> |
93 |
<exclude name="launcher.ini" /> |
94 |
</fileset>
|
95 |
</copy>
|
96 |
<chmod file="${DIR_LIN}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher-Linux" perm="ugo+rx" /> |
97 |
|
98 |
<copy file="${DIR_LIN}/resources/launcher.ini.j15" tofile="${DIR_LIN}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini" /> |
99 |
<replace file="${DIR_LIN}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini" token="%JARNAME%" value="${JARNAME}" /> |
100 |
|
101 |
<!-- comprimimos la carpeta tmp_gvSIGInstall en tmp.tgz -->
|
102 |
<tar destfile="${DIR_LIN}/${INSTALLER_DIR}/tmp.tgz" compression="gzip"> |
103 |
<tarfileset dir="${DIR_LIN}/${INSTALLER_DIR}" mode="755"> |
104 |
<include name="tmp_gvSIGInstall/launcher-Linux" /> |
105 |
</tarfileset>
|
106 |
<tarfileset dir="${DIR_LIN}/${INSTALLER_DIR}"> |
107 |
<include name="tmp_gvSIGInstall/*" /> |
108 |
<exclude name="tmp_gvSIGInstall/launcher-Linux" /> |
109 |
</tarfileset>
|
110 |
</tar>
|
111 |
|
112 |
<antcall target="concatenation" /> |
113 |
|
114 |
<!--echo message="#!/bin/sh${line.separator}" file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" append="true" />
|
115 |
<echo message="lcount=59${line.separator}" file="${DIR_LIN}/${INSTALLER_DIR}/xxx.tmp" append="true" />
|
116 |
<fixcrlf srcdir="${DIR_LIN}/${INSTALLER_DIR}/" includes="**/xx.tmp" eol="lf" eof="remove" />
|
117 |
<concat destfile="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" binary="true">
|
118 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" />
|
119 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/xxx.tmp" />
|
120 |
<fileset file="../build/distribution/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh" />
|
121 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/tmp.tgz" />
|
122 |
</concat-->
|
123 |
|
124 |
|
125 |
</target>
|
126 |
|
127 |
<target name="concatenation" description="this target concats all the files into a new bin file"> |
128 |
<echo message="#!/bin/sh" file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" /> |
129 |
<echo message="lcount=59" file="${DIR_LIN}/${INSTALLER_DIR}/xxx.tmp" /> |
130 |
<fixcrlf srcdir="${DIR_LIN}/${INSTALLER_DIR}/" includes="**/xx.tmp,**/xxx.tmp" eol="lf" eof="remove" /> |
131 |
<concat destfile="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" binary="true"> |
132 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" /> |
133 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/xxx.tmp" /> |
134 |
<fileset file="../build/distribution/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh" /> |
135 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/tmp.tgz" /> |
136 |
</concat>
|
137 |
<chmod file="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" perm="ugo+rx" /> |
138 |
</target>
|
139 |
|
140 |
<target name="cleanDirLIN" description="Limpiamos los directorios DIR_LIN"> |
141 |
|
142 |
<delete file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" /> |
143 |
<mkdir dir="${OUTPUT_DIR}" /> |
144 |
<mkdir dir="${OUTPUT_DIR}/linux" /> |
145 |
<move todir="${OUTPUT_DIR}/linux"> |
146 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" /> |
147 |
</move>
|
148 |
<chmod file="${OUTPUT_DIR}/linux/${LINUXBIN}" perm="ugo+rx" /> |
149 |
<delete dir="${DIR_LIN}/${INSTALLER_DIR}" /> |
150 |
|
151 |
</target>
|
152 |
|
153 |
<!--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
154 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
155 |
-->
|
156 |
<target name="Windows" depends="CreateJarWin,InstallationWin,cleanDirWIN"> |
157 |
<echo> ********************************************* </echo> |
158 |
<echo> ******** WINDOWS DONE *********</echo> |
159 |
<echo> ********************************************* </echo> |
160 |
</target>
|
161 |
|
162 |
<target name="CreateJarWin" description="Generacion del instalador(jar) para Windows"> |
163 |
|
164 |
<!-- Instalador para Windows -->
|
165 |
|
166 |
<echo> ********************************************* </echo> |
167 |
<echo> Buildnumber----> ${build.number} --- version--> ${version}</echo> |
168 |
<echo> ********************************************* </echo> |
169 |
<delete file="./${JARNAME}" /> |
170 |
<ant dir="${DIR_WIN}"> |
171 |
<property name="JARNAME" value="${JARNAME}" /> |
172 |
<property name="GVSIG_VERSION" value="${version}" /> |
173 |
<property name="APPNAME" value="${APPNAME}" /> |
174 |
<property name="INSTALL_FILE" value="${DIR_WIN}/install_15.xml" /> |
175 |
<!-- property name="INSTALL_FILE" value="${DIR_WIN}/install.xml" / -->
|
176 |
</ant>
|
177 |
|
178 |
</target>
|
179 |
<target name="InstallationWin" description="Generacion de la distribucion"> |
180 |
|
181 |
<!-- Coping install.bat file -->
|
182 |
<copy todir="${DIR_WIN}/${INSTALLER_DIR}"> |
183 |
<fileset dir="${DIR_WIN}/installer_files"> |
184 |
<exclude name="install.bat" /> |
185 |
</fileset>
|
186 |
</copy>
|
187 |
|
188 |
<!-- Coping the izpack launcher , excluding launcher-win32.ini -->
|
189 |
<copy todir="${DIR_WIN}/${INSTALLER_DIR}"> |
190 |
<fileset dir="../build/distribution/launcher/izpack-launcher-1.3/dist"> |
191 |
<exclude name="launcher-Win32.ini" /> |
192 |
</fileset>
|
193 |
</copy>
|
194 |
|
195 |
<!-- Coping the launcher-win32.ini -->
|
196 |
<copy file="${DIR_WIN}/resources/launcher-Win32.ini.j15" tofile="${DIR_WIN}/${INSTALLER_DIR}/launcher-Win32.ini" /> |
197 |
|
198 |
<!-- Replacing the token JARNAME with the real name of the jar file -->
|
199 |
<replace file="${DIR_WIN}/${INSTALLER_DIR}/launcher-Win32.ini" token="%JARNAME%" value="${JARNAME}" /> |
200 |
|
201 |
<!-- Moving the jar file -->
|
202 |
<move todir="${DIR_WIN}/${INSTALLER_DIR}/"> |
203 |
<fileset file="./${JARNAME}" /> |
204 |
</move>
|
205 |
<!-- Removing 7zip file, only if it exits -->
|
206 |
<delete file="${DIR_WIN}/${WINDOWSZIP}" /> |
207 |
<!-- Creating new 7zip file -->
|
208 |
<!--exec executable="${LAUNCHER7Z}"-->
|
209 |
<exec executable="${LAUNCHER7Z}"> |
210 |
<arg line="a -r ${DIR_WIN}/${WINDOWSZIP} ${DIR_WIN}/${INSTALLER_DIR}/*" /> |
211 |
</exec>
|
212 |
|
213 |
<copy file="../build/distribution/launcher/7z/dist_config.txt" tofile="${DIR_WIN}/dist_config.txt" /> |
214 |
<replace file="${DIR_WIN}/dist_config.txt" token="%TITLE%" value="gvSIG-${bversion}" /> |
215 |
<concat destfile="${DIR_WIN}/${WINDOWSEXE}" binary="true"> |
216 |
<fileset file="../build/distribution/launcher/7z/7zS.sfx" /> |
217 |
<fileset file="${DIR_WIN}/dist_config.txt" /> |
218 |
<fileset file="${DIR_WIN}/${WINDOWSZIP}" /> |
219 |
</concat>
|
220 |
|
221 |
|
222 |
</target>
|
223 |
|
224 |
<!-- UTILIZAR ESTE TARGET PARA LIMPIAR TODOS LOS DIRECTORIOS Y FICHEROS TEMPORALES CREADOS-->
|
225 |
<target name="cleanDirWIN" description="Limpiamos los directorios DIR_WIN"> |
226 |
<mkdir dir="${OUTPUT_DIR}" /> |
227 |
<mkdir dir="${OUTPUT_DIR}/win" /> |
228 |
<move todir="${OUTPUT_DIR}/win"> |
229 |
<fileset file="${DIR_WIN}/${WINDOWSEXE}" /> |
230 |
</move>
|
231 |
<delete file="${DIR_WIN}/${WINDOWSZIP}" /> |
232 |
<delete file="${DIR_WIN}/dist_config.txt" /> |
233 |
<delete dir="${DIR_WIN}/${INSTALLER_DIR}" /> |
234 |
|
235 |
<!--delete dir="${DIR_WIN}/extensiones" />
|
236 |
<delete dir="${DIR_WIN}/bin" /-->
|
237 |
</target>
|
238 |
|
239 |
<!--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
240 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
241 |
-->
|
242 |
<target name="Mac"> |
243 |
<mkdir dir="${OUTPUT_DIR}" /> |
244 |
<ant dir="${DIR_MAC}"> |
245 |
<property name="build.number" value="${build.number}" /> |
246 |
</ant>
|
247 |
<!-- El zip se crea en dentro y se copia por un problema con los permisos-->
|
248 |
<!--zip destfile="${OUTPUT_DIR}/${MAC_10_ZIP}" basedir="${DIR_MAC}" includes="gvSIG*.app/**" filemode="755" /-->
|
249 |
<copy todir="${OUTPUT_DIR}"> |
250 |
<fileset dir="${DIR_MAC}" includes="gvSIG*.zip" /> |
251 |
</copy>
|
252 |
<delete dir="${DIR_MAC}/distr" /> |
253 |
<!--OJO!!!! HAY QUE REVISAR ESTO -->
|
254 |
<echo> ********************************************* </echo> |
255 |
<echo> ******** MAC DONE *********</echo> |
256 |
<echo> ********************************************* </echo> |
257 |
</target>
|
258 |
</project>
|