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