svn-gvsig-desktop / trunk / extensions / ext3Dgui / distribution / build.xml @ 21675
History | View | Annotate | Download (10.5 KB)
1 |
<?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,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 |
<echo message="#!/bin/sh${line.separator}" file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" /> |
111 |
<echo message="lcount=59${line.separator}" file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" append="true" /> |
112 |
<fixcrlf srcdir="${DIR_LIN}/${INSTALLER_DIR}/" includes="**/xx.tmp" eol="lf" eof="remove" /> |
113 |
<concat destfile="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" binary="true"> |
114 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" /> |
115 |
<fileset file="../build/distribution/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh" /> |
116 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/tmp.tgz" /> |
117 |
</concat>
|
118 |
<chmod file="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" perm="ugo+rx" /> |
119 |
|
120 |
</target>
|
121 |
<target name="cleanDirLIN" description="Limpiamos los directorios DIR_LIN"> |
122 |
|
123 |
<delete file="${DIR_LIN}/${INSTALLER_DIR}/xx.tmp" /> |
124 |
<mkdir dir="${OUTPUT_DIR}" /> |
125 |
<mkdir dir="${OUTPUT_DIR}/linux" /> |
126 |
<move todir="${OUTPUT_DIR}/linux"> |
127 |
<fileset file="${DIR_LIN}/${INSTALLER_DIR}/${LINUXBIN}" /> |
128 |
</move>
|
129 |
<chmod file="${OUTPUT_DIR}/linux/${LINUXBIN}" perm="ugo+rx" /> |
130 |
<delete dir="${DIR_LIN}/${INSTALLER_DIR}" /> |
131 |
|
132 |
</target>
|
133 |
|
134 |
<!--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
135 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
136 |
-->
|
137 |
<target name="Windows" depends="CreateJarWin,InstallationWin,cleanDirWIN"> |
138 |
<echo> ********************************************* </echo> |
139 |
<echo> ******** WINDOWS DONE *********</echo> |
140 |
<echo> ********************************************* </echo> |
141 |
</target>
|
142 |
|
143 |
<target name="CreateJarWin" description="Generacion del instalador(jar) para Windows"> |
144 |
|
145 |
<!-- Instalador para Windows -->
|
146 |
|
147 |
<echo> ********************************************* </echo> |
148 |
<echo> Buildnumber----> ${build.number} --- version--> ${version}</echo> |
149 |
<echo> ********************************************* </echo> |
150 |
<delete file="./${JARNAME}" /> |
151 |
<ant dir="${DIR_WIN}"> |
152 |
<property name="JARNAME" value="${JARNAME}" /> |
153 |
<property name="GVSIG_VERSION" value="${version}" /> |
154 |
<property name="APPNAME" value="${APPNAME}" /> |
155 |
<property name="INSTALL_FILE" value="${DIR_WIN}/install_15.xml" /> |
156 |
<!-- property name="INSTALL_FILE" value="${DIR_WIN}/install.xml" / -->
|
157 |
</ant>
|
158 |
|
159 |
</target>
|
160 |
<target name="InstallationWin" description="Generacion de la distribucion"> |
161 |
|
162 |
<!-- Coping install.bat file -->
|
163 |
<copy todir="${DIR_WIN}/${INSTALLER_DIR}"> |
164 |
<fileset dir="${DIR_WIN}/installer_files"> |
165 |
<exclude name="install.bat" /> |
166 |
</fileset>
|
167 |
</copy>
|
168 |
|
169 |
<!-- Coping the izpack launcher , excluding launcher-win32.ini -->
|
170 |
<copy todir="${DIR_WIN}/${INSTALLER_DIR}"> |
171 |
<fileset dir="../build/distribution/launcher/izpack-launcher-1.3/dist"> |
172 |
<exclude name="launcher-Win32.ini" /> |
173 |
</fileset>
|
174 |
</copy>
|
175 |
|
176 |
<!-- Coping the launcher-win32.ini -->
|
177 |
<copy file="${DIR_WIN}/resources/launcher-Win32.ini.j15" tofile="${DIR_WIN}/${INSTALLER_DIR}/launcher-Win32.ini" /> |
178 |
|
179 |
<!-- Replacing the token JARNAME with the real name of the jar file -->
|
180 |
<replace file="${DIR_WIN}/${INSTALLER_DIR}/launcher-Win32.ini" token="%JARNAME%" value="${JARNAME}" /> |
181 |
|
182 |
<!-- Moving the jar file -->
|
183 |
<move todir="${DIR_WIN}/${INSTALLER_DIR}/"> |
184 |
<fileset file="./${JARNAME}" /> |
185 |
</move>
|
186 |
<!-- Removing 7zip file, only if it exits -->
|
187 |
<delete file="${DIR_WIN}/${WINDOWSZIP}" /> |
188 |
<!-- Creating new 7zip file -->
|
189 |
<!--exec executable="${LAUNCHER7Z}"-->
|
190 |
<exec executable="${LAUNCHER7Z}"> |
191 |
<arg line="a -r ${DIR_WIN}/${WINDOWSZIP} ${DIR_WIN}/${INSTALLER_DIR}/*" /> |
192 |
</exec>
|
193 |
|
194 |
<copy file="../build/distribution/launcher/7z/dist_config.txt" tofile="${DIR_WIN}/dist_config.txt" /> |
195 |
<replace file="${DIR_WIN}/dist_config.txt" token="%TITLE%" value="gvSIG-${bversion}" /> |
196 |
<concat destfile="${DIR_WIN}/${WINDOWSEXE}" binary="true"> |
197 |
<fileset file="../build/distribution/launcher/7z/7zS.sfx" /> |
198 |
<fileset file="${DIR_WIN}/dist_config.txt" /> |
199 |
<fileset file="${DIR_WIN}/${WINDOWSZIP}" /> |
200 |
</concat>
|
201 |
|
202 |
|
203 |
</target>
|
204 |
|
205 |
<!-- UTILIZAR ESTE TARGET PARA LIMPIAR TODOS LOS DIRECTORIOS Y FICHEROS TEMPORALES CREADOS-->
|
206 |
<target name="cleanDirWIN" description="Limpiamos los directorios DIR_WIN"> |
207 |
<mkdir dir="${OUTPUT_DIR}" /> |
208 |
<mkdir dir="${OUTPUT_DIR}/win" /> |
209 |
<move todir="${OUTPUT_DIR}/win"> |
210 |
<fileset file="${DIR_WIN}/${WINDOWSEXE}" /> |
211 |
</move>
|
212 |
<delete file="${DIR_WIN}/${WINDOWSZIP}" /> |
213 |
<delete file="${DIR_WIN}/dist_config.txt" /> |
214 |
<delete dir="${DIR_WIN}/${INSTALLER_DIR}" /> |
215 |
|
216 |
<!--delete dir="${DIR_WIN}/extensiones" />
|
217 |
<delete dir="${DIR_WIN}/bin" /-->
|
218 |
</target>
|
219 |
|
220 |
<!--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
221 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
222 |
-->
|
223 |
<target name="Mac"> |
224 |
<mkdir dir="${OUTPUT_DIR}" /> |
225 |
<ant dir="${DIR_MAC}"> |
226 |
<property name="build.number" value="${build.number}" /> |
227 |
</ant>
|
228 |
<!-- El zip se crea en dentro y se copia por un problema con los permisos-->
|
229 |
<!--zip destfile="${OUTPUT_DIR}/${MAC_10_ZIP}" basedir="${DIR_MAC}" includes="gvSIG*.app/**" filemode="755" /-->
|
230 |
<copy todir="${OUTPUT_DIR}"> |
231 |
<fileset dir="${DIR_MAC}" includes="gvSIG*.zip" /> |
232 |
</copy>
|
233 |
<delete dir="${DIR_MAC}/distr" /> |
234 |
<!--OJO!!!! HAY QUE REVISAR ESTO -->
|
235 |
<echo> ********************************************* </echo> |
236 |
<echo> ******** MAC DONE *********</echo> |
237 |
<echo> ********************************************* </echo> |
238 |
</target>
|
239 |
</project>
|