svn-gvsig-desktop / tags / gvsig_redes-1_0_0-1234 / extensions / ext3Dgui / distribution / build.xml @ 41712
History | View | Annotate | Download (11.3 KB)
1 | 21655 | jcampos | <?xml version="1.0" ?>
|
---|---|---|---|
2 | <project default="main"> |
||
3 | |||
4 | |||
5 | 29076 | rgaitan | <property file="./build.number"/> |
6 | 21655 | jcampos | <!--COMPROBAR EXTENSIONES -->
|
7 | 29076 | rgaitan | <!--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 | 21675 | jcampos | |
12 | |||
13 | <property name="DIR_LIN" location="./distribution/linux-distribution" /> |
||
14 | <property name="DIR_WIN" location="./distribution/win-distribution" /> |
||
15 | 21655 | jcampos | <property name="DIR_MAC" location="./mac-distribution" /> |
16 | 29076 | rgaitan | <property name="baseFileName" value="${APPNAME}-${version}-build-${bversion}" /> |
17 | 21655 | jcampos | <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 | 28934 | rgaitan | <condition property="LAUNCHER7Z" value="../build/distribution/launcher/7z/7za" else="../build/distribution/launcher/7z/7z.exe"> |
31 | 21655 | jcampos | <os family="unix" /> |
32 | 28934 | rgaitan | </condition>
|
33 | <!--condition property="LAUNCHER7Z" value="7za" else="7z.exe">
|
||
34 | 25646 | jcampos | <os family="unix" />
|
35 | 28934 | rgaitan | </condition-->
|
36 | 21655 | jcampos | |
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 | 21675 | jcampos | <!-- target name="main" depends="Linux,Windows" -->
|
57 | <target name="main" depends="Linux,Windows"> |
||
58 | 21655 | jcampos | <echo message="DISTRIBUCION" /> |
59 | </target>
|
||
60 | <!--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||
61 | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||
62 | -->
|
||
63 | 21695 | jcampos | <target name="Linux" depends="CreateJarLin,InstallationLin,concatenation,cleanDirLIN"> |
64 | 21655 | jcampos | <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 | 21675 | jcampos | <property name="JARNAME" value="${JARNAME}" /> |
74 | 21655 | jcampos | <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 | 21675 | jcampos | <fileset dir="../build/distribution/launcher/izpack-launcher-1.3_linux/dist"> |
93 | 21655 | jcampos | <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 | 21695 | jcampos | |
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 | 21655 | jcampos | <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 | 21695 | jcampos | <fileset file="${DIR_LIN}/${INSTALLER_DIR}/xxx.tmp" />
|
120 | 21675 | jcampos | <fileset file="../build/distribution/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh" />
|
121 | 21655 | jcampos | <fileset file="${DIR_LIN}/${INSTALLER_DIR}/tmp.tgz" />
|
122 | 21695 | jcampos | </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 | 21655 | jcampos | </concat>
|
137 | <chmod file="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" perm="ugo+rx" /> |
||
138 | 21695 | jcampos | </target>
|
139 | 21675 | jcampos | |
140 | <target name="cleanDirLIN" description="Limpiamos los directorios DIR_LIN"> |
||
141 | |||
142 | 21655 | jcampos | <delete file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" /> |
143 | 21675 | jcampos | <mkdir dir="${OUTPUT_DIR}" /> |
144 | <mkdir dir="${OUTPUT_DIR}/linux" /> |
||
145 | <move todir="${OUTPUT_DIR}/linux"> |
||
146 | 21655 | jcampos | <fileset file="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" /> |
147 | </move>
|
||
148 | 21675 | jcampos | <chmod file="${OUTPUT_DIR}/linux/${LINUXBIN}" perm="ugo+rx" /> |
149 | 21655 | jcampos | <delete dir="${DIR_LIN}/${INSTALLER_DIR}" /> |
150 | |||
151 | </target>
|
||
152 | |||
153 | <!--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||
154 | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||
155 | -->
|
||
156 | 21675 | jcampos | <target name="Windows" depends="CreateJarWin,InstallationWin,cleanDirWIN"> |
157 | 21655 | jcampos | <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 | 21675 | jcampos | <fileset dir="../build/distribution/launcher/izpack-launcher-1.3/dist"> |
191 | 21655 | jcampos | <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 | 25646 | jcampos | <exec executable="${LAUNCHER7Z}"> |
210 | 21655 | jcampos | <arg line="a -r ${DIR_WIN}/${WINDOWSZIP} ${DIR_WIN}/${INSTALLER_DIR}/*" /> |
211 | </exec>
|
||
212 | |||
213 | 21675 | jcampos | <copy file="../build/distribution/launcher/7z/dist_config.txt" tofile="${DIR_WIN}/dist_config.txt" /> |
214 | 21655 | jcampos | <replace file="${DIR_WIN}/dist_config.txt" token="%TITLE%" value="gvSIG-${bversion}" /> |
215 | <concat destfile="${DIR_WIN}/${WINDOWSEXE}" binary="true"> |
||
216 | 21675 | jcampos | <fileset file="../build/distribution/launcher/7z/7zS.sfx" /> |
217 | 21655 | jcampos | <fileset file="${DIR_WIN}/dist_config.txt" /> |
218 | <fileset file="${DIR_WIN}/${WINDOWSZIP}" /> |
||
219 | </concat>
|
||
220 | |||
221 | 21675 | jcampos | |
222 | 21655 | jcampos | </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 | 28934 | rgaitan | </project> |