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