Revision 18874

View differences:

tags/tmp_build/install/HOWTO-BUILD.txt
1
 C?MO GENERAR EL INSTALADOR:
2
 ===========================
3
- gvSIG debe estar correctamente construido en ../_fwAndami/bin 
4
- En el fichero variables.sh hay algunas variables que nos pueden interesar, que permiten personalizar el nombre del plugin, la versi?n, el directorio destino, etc. La variable  APPNAME normalmente valdr? "gvSIG", pero puede tiener nombre si estamos empaquetando una extensi?n (por ejemplo,  "nomenclatorIGN").
5
- Definir los packs adecuados en el fichero XML de configuraci?n (install.xml), y revisar el fichero en general.
6
- Definir las extensiones a incluir en el directorio variables.sh.
7
- Lanzar el script distribucion.sh.
0 8

  
tags/tmp_build/install/instalador-gvSIG-mac/HOWTO-BUILD.txt
1
INSTALACIONES COMPLETAS:
2
Para generar el bundle (.app) para Mac, se debe lanzar el script de Ant "build.xml".
3
Supone definida la variable build.number .
4
Dentro define FULLVERSION (habr? que cambiarlo para cada versi?n mayor, claro)
5
build.xml llama a build-bundle.xml para crear el bundle de gvSIG; luego lo mover? dentro del bundle "autoinstalador". 
6
build-bundle.xml usa un Ant Task llamado Jarbundler, que se puede obtener en http://jarbundler.sourceforge.net/. Hay que instalarlo en la librer?a del Ant que se use.
7
Si se desea usar con el Ant incluido en Eclipse, adem?s se debe a?adir xercesImpl.jar, que va incluido en los Ant "normales" pero no en el de Eclipse. (Tambi?n se puede redefinir el ANTHOME en las preferencias de Eclipse para apuntar a un Ant instalado aparte, en el se haya instalador el jarbundler). 
8

  
9
El classpath que usar? gvSIG est? hardcoded en linea "extraclasspath" de task jarbundler de build-bundle.xml. Ese classpath debe ser el mismo que se define en el gvSIG.sh de Linux, por ejemplo.
10

  
11

  
12

  
13
EXPLICACION DETALLADA:
14
OS X puede ejecutar un fichero.jar con un doble click, pero eso es equivalente a "java fichero.jar", sin m?s par?metros.
15
Para que se ejecute con unos par?metros y un classpath, un icono propio y la metainformaci?n necesaria para parecer una aplicaci?n normal de mac, lo convertimos en un bundle.
16
Un bundle es un directorio con nombre *.app y una cierta estructura de directorios.
17
<miBundle.app>/Contents/Info.plist es un fichero XML con la metainfo necesaria para que OS X sepa ciertas cosas sobre la aplicaci?n: ficheros que puede abrir (extensiones, mimetypes, visor o editor, etc), icono, nombre/s que presentar al usuario, numeros de versi?n...
18
En el caso de aplicaciones java, tambi?n incluye el classpath, par?metros para la aplicaci?n y la JVM, etc.
19
Para el caso de gvSIG, en <miBundle.app>/Contents/Resources/Java/ ir? una copia del directorio gvsig/bin/ de un build normal.
20
De todo esto se encarga build-bundle.xml.
21

  
22
Luego, como en mac no es normal usar instaladores (sino que las aplicaciones son autocontenidas: se instalan copiando el bundle al disco duro, se desinstalan tirando el bundle a la papelera), usamos una peque?a aplicaci?n auxiliar: autoinstalador.app.
23
Autoinstalador.app est? pensado para contener el bundle de gvSIG creado en el paso anterior. De forma que el usuario ejecuta el autoinstalador con un doble click, y ?ste se encarga de comprobar que JAI y JAI I/O est?n correctamente instalados. Si no es as? los instala. Y acto seguido ejecuta el bundle de gvSIG que lleva dentro, de forma que para el usuario la instalaci?n es transparente (pero se le avisa de lo que est? pasando).
24
La estructura que nos interesa del autoinstalador es:
25
autoinstalador.app/
26
	Contents/
27
		Resources/
28
			instalacion/
29
				(JAI para OS X 10.3, JAI I/O, programa java para chequear instalacion)
30
			gvSIG/
31
				bundle gvSIG.app
32
			(...directorios de localizaci?n...)
33

  
34

  
35
build.xml se encarga de:
36
-- llamar a build-bundle.xml, que crea el bundle "gvSIG.app" con sus librerias nativas; 
37
-- y luego, de meter el bundle "gvSIG.app" en el bundle autoinstalador. 
38
El resultado final es un autoinstalador completo.
39

  
40
Nota: un usuario "normal" (no-desarrollador) de mac posiblemente no sepa qu? es un bundle. La forma normal de llamarlos es "aplicaci?n", y se suele considerar un item indivisible.
0 41

  
tags/tmp_build/install/instalador-gvSIG-mac/build.xml
1
<project name="bundle-gvSIG" default="init" basedir=".">
2
	<!-- Este script crea un bundle "simple" de gvSIG y lo envuelve en un bundle instalador de requisitos -->
3
	<property name="FULLVERSION" value="1.1.2"/>
4
	<property name="NOMBRE_BUNDLE" value="gvSIG ${FULLVERSION} build ${build.number}"/>
5
	<property name="NOMBRE_BUNDLE_AUTOINSTALADOR" value="${NOMBRE_BUNDLE} autoinstalador"/>
6
    <!-- Para mac OSX 10.3==>"1.4+" y para 10.4==> "1.5*" -->
7
    <property name="jvmversion" value="1.5*"/>
8

  
9

  
10
	<target name="init">
11
		<ant antfile="build-bundle.xml">
12
            <property name="jvmversion" value="${jvmversion}"/>
13
        </ant>
14

  
15

  
16
		<!-- hacemos copia del bundle autoinstalador ... -->
17
		<copy todir="${NOMBRE_BUNDLE_AUTOINSTALADOR}.app">
18
			<fileset dir="instalador.app"/>
19
		</copy>
20
		<!-- (corregimos permisos de ejecucion que copy se ha cargado) -->
21
		<chmod file="${NOMBRE_BUNDLE_AUTOINSTALADOR}.app/Contents/MacOS/applet" perm="+rwxrxrx"/>
22
		<!-- ...y movemos bundle gvSIG a su sitio dentro de autoinstalador -->
23
		<move todir="${NOMBRE_BUNDLE_AUTOINSTALADOR}.app/Contents/Resources/gvSIG/${NOMBRE_BUNDLE}.app">
24
			<fileset dir="${NOMBRE_BUNDLE}.app"/>
25
		</move>
26

  
27
	</target>
28

  
29
</project>
0 30

  
tags/tmp_build/install/instalador-gvSIG-mac/HOWTO-UPDATER,EXTS.txt
1

  
2
TENGO QUE GENERAR UN INSTALADOR DE UNA EXTENSI?N PARA GVSIG-MAC. COMO LO HAGO?
3
No hay un build.xml para ello, ya que no tendria sentido (el proceso es corto y habria que hacer cosas a mano de todas formas).
4
1.- Preparar los ficheros en su arbol de directorios, siendo el directorio de andami.jar el "raiz". 
5
Por ejemplo, supongamos una extensi?n que vaya a proveer estos ficheros a un gvSIG ya instalado:
6
<raiz>/andami.jar
7
<raiz>/gvSIG/extensiones/nuevoFichero1
8
<raiz>/NuevoDirectorio1/nuevoFichero2
9
2.- Hacer una copia de actualizador.app con un nuevo nombre (p. ej., "instalador de extension piloto de redes.app")
10
3.- Asegurarse de que tras la copia, los ficheros en <nuevo nombre>.app/Contents/MacOS/ tienen permisos de ejecuci?n. Una copia normal hecha con Ant suele perderlos!
11
4.- Copiar el arbol de directorios del paso 1 a <nuevo nombre>.app/Contents/Resources/updates/gvSIGbin/
12
5.- Revisar <nuevo nombre>.app/Contents/Resources/configfile para asegurarse de que las opciones configurables 
13
son correctas. Contiene ejemplos.
14
6.- Opcional: se puede a?adir un fichero Info.plist en <nuevo nombre>.app/Contents/Resources/updates/ si se quiere 
15
substituir el original del gvSIG instalado (para cambiar paths, par?ms de arranque de la JVM, etc)
16
7.- Comprimir <nuevo nombre>.app en un ZIP y distribuir.
17

  
18
-------------------------------------------------------------------
19
EXPLICACIONES: 
20

  
21
ACTUALIZACIONES, INSTALACIONES PARCIALES:
22
(y en general, para meter ficheros en un gvSIG ya instalado)
23
Para eso est? "actualizador.app". Es un bundle-aplicacion creado con AppleScript. Su prop?sito es copiar el contenido de uno de sus directorios internos al lugar adecuado de un bundle gvSIG.
24
Hay que poner en actualizador.app/Contents/Resources/updates/gvSIGbin/ el ?rbol de directorios de la actualizaci?n a instalar. Esos ficheros y directorios substituir?n a los que se encuentren en el gvSIG instalado, bas?ndose en la correspondencia entre el directorio mencionado y el directorio base del gvSIG ya existente en el mac del usuario (es decir, el directorio que contiene andami.jar; concretamente ser?a gvSIG.app/Contents/Resources/Java/).
25
Por ejemplo: si ponemos en actualizador.app/Contents/Resources/updates/gvSIGbin/ los siguientes ficheros:
26
andami.jar
27
gvSIG/extensiones/nuevoFichero1
28
NuevoDirectorio1/nuevoFichero2
29

  
30
Al usar ese actualizador, el gvSIG actualizado habr? recibido el andami.jar nuevo, habr? a?adido nuevoFichero1 a gvSIG/extensiones/, y habr? creado en el nivel de andami.jar el directorio NuevoDirectorio1 con nuevoFichero2 dentro.
31

  
32
El fichero actualizador.app/Contents/Resources/configfile permite configurar algunas cosas del actualizador:
33
--nombre que se pondr? a los bundles actualizados (opcional; se aplica al bundle autoinstalador y/o bundle sencillo de gvSIG);
34
--numero de version del bundle que se pide al usuario (opcional; solo se usa como cadena que se mostrar? junto a un mensaje del estilo de "Por favor, seleccione gvSIG versi?n...");
35
--MD5 de andami.jar de el/los gvSIG actualizables (opcional; permite limitar la instalaci?n a una versi?n definida de gvSIG)
36
--sufijo a agregar al nombre de los bundles actualizados (opcional; util para que un "gvSIG" pase a llamarse "gvSIG SEXTANTE", p. ej.)
37
Hay ejemplos y comentarios dentro del propio fichero configfile.
38

  
39
Si el actualizador encuentra un fichero actualizador.app/Contents/Resources/updates/Info.plist, lo pondr? en el lugar adecuado del bundle del gvSIG actualizado. Ser? ?til por ejemplo para cambiar el classpath de un nuevo gvSIG, su nombre tal como lo usa OS X, la versi?n de Java requerida, etc.
40

  
41
El actualizador copia los ficheros a su destino sobreescribiendo lo que encuentre. Los directorios son creados si no existen en destino; si existen, los ficheros que contiene son a?adidos. Es decir, un directorio existente con 10 ficheros no ser? machacado por un directorio con un s?lo fichero, sino que ser? a?adido. (este es el comportamiento intuitivamente esperable de un actualizador)
42
No hay opci?n implementada para borrar ficheros del destino; no parece necesario, y nos ahorramos riesgos.
43

  
44
Actualmente solo esta contemplada la posibilidad de copiar ficheros en el ?rbol de directorios a partir de donde esta andami.jar.
0 45

  
tags/tmp_build/install/instalador-gvSIG-mac/build-updater.xml
1
<project name="bundle-gvSIG" default="init" basedir=".">
2
	<property name="NOMBRE_BUNDLE" value="instalador de la extension XXX"/>
3
	<property name="DIR_DESTINO" value="${basedir}"/>
4

  
5
	<target name="init">
6
		<!-- copiamos el bundle actualizador ... -->
7
		<copy todir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app">
8
			<fileset dir="actualizador.app"/>
9
		</copy>
10
		<!-- (corregimos permisos de ejecucion que copy se ha cargado) -->
11
		<chmod dir="${DIR_DESTINO}/${NOMBRE_BUNDLE}.app/Contents/MacOS/" type="file" perm="+rwxrxrx"/>
12
		<!-- ...y copiamos cosas a su sitio dentro de autoinstalador
13
		MEJOR HACERLO A MANO?
14
		<copy todir="${NOMBRE_BUNDLE}.app/Contents/Resources/updates">
15
		LO QUE SEA; POR EJEMPLO,
16
			<fileset dir="../../binaries/mac/" includes="**/*.jar"/>
17
		</copy>
18
		-->
19
		<echo>ATENCION: SOLO SE HA HECHO UNA COPIA DEL ACTUALIZADOR VACIO, Y SE HAN CORREGIDO LOS PERMISOS. ESTAS EN EL PASO 4 DEL HOWTO-UPDATER,EXTS!</echo>
20
	</target>
21

  
22
</project>
0 23

  
tags/tmp_build/install/instalador-gvSIG-mac/build-bundle.xml
1
<project name="bundle-gvSIG" default="init" basedir=".">
2

  
3
	<!-- Este script crea el bundle gvSIG con script previo (para ajustar variables de entorno, p.ej)
4
	y con librerias nativas -->
5

  
6
	<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler">
7
		<classpath>
8
			<pathelement location="${basedir}/../../binaries/ant/jarbundler-1.9.jar"/>
9
		</classpath>
10
	</taskdef>
11

  
12
    <property name="jvmversion" value="1.5*"/>
13

  
14
	<target name="init">
15
		<jarbundler
16
			dir="."
17
			name="${NOMBRE_BUNDLE}"
18
			mainclass="com.iver.andami.Launcher"
19
			arguments="gvSIG gvSIG/extensiones"
20
			bundleid="com.iver.cit.gvsig"
21
			developmentregion = "Spanish"
22
			icon="logo gvsig.icns"
23
			shortname="gvSIG"
24
			stubfile="preJava"
25
			version="${FULLVERSION}"
26
			build="${build.number}"
27
			infostring="gvSIG ${FULLVERSION}"
28
			vmoptions ="-Xmx500M"
29
			jvmversion ="${jvmversion}"
30
			extraclasspath = "andami.jar,lib/log4j-1.2.8.jar,lib/beans.jar,lib/gvsig-i18n.jar,lib/iver-utiles.jar,lib/castor-0.9.5.3-xml.jar,lib/crimson.jar,lib/xerces_2_5_0.jar,lib/javaws.jar,lib/xml-apis.jar,lib/JWizardComponent.jar,lib/looks-2.0.2.jar,lib/kxml2.jar,lib/jcalendar.jar,lib/xmlrpc-2.0.1.jar,lib/commons-codec-3.1.zip,lib/commons-collections-3.1.zip,lib/commons-pool-1.2.zip,lib/commons-dbcp-1.0-dev-20020806.zip,lib/jh.jar"
31
			workingdirectory  = "$JAVAROOT"
32
			showplist="true"
33
			>
34

  
35
			<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
36
			<javaproperty name="java.library.path" value="$JAVAROOT/../NativeLibs"/>
37

  
38
			<!-- jarfileset no incluye nada, pero evita quejas de jarbundler -->
39
			<jarfileset dir="." includes="nothing!" excludes="*"/>
40
			<javafileset dir="../../_fwAndami/" excludes="bin/ src/"/>
41
		</jarbundler>
42

  
43
		<!-- tenemos ya un bundle con el script preJava, pero sin el "arrancador" de la JVM; hay que meterlo -->
44
		<copy file="JavaApplicationStub" todir="${NOMBRE_BUNDLE}.app/Contents/MacOS"/>
45
		<!-- (corregimos permisos de ejecucion que copy se ha cargado) -->
46
		<chmod file="${NOMBRE_BUNDLE}.app/Contents/MacOS/*" perm="+rwxrxrx"/>
47

  
48
		<!-- ahora metemos las libs nativas...-->
49
		<!-- crear dir NativeLibs-->
50
		<mkdir dir="${NOMBRE_BUNDLE}.app/Contents/Resources/NativeLibs"/>
51
		<!-- copiar dentro dylibs, jnilibs-->
52
		<copy 	todir="${NOMBRE_BUNDLE}.app/Contents/Resources/NativeLibs"
53
				flatten="true"
54
			>
55
			<fileset dir="../../binaries/mac/raster/" includes="**/*.dylib **/*.jnilib"/>
56
			<fileset dir="../../binaries/mac/crs/" includes="**/*.dylib **/*.jnilib"/>
57
		</copy>
58
		<!-- copiar jars para JNI (jgdal, jmrsid) en gvSIG/extensiones/...-->
59
		<!-- (primero asegurarnos de que no hay jgdal o jmrsid duplicados, lo cual provocaría error en gvSIG) -->
60
		<delete>
61
		  	<fileset dir="${NOMBRE_BUNDLE}.app/Contents/Resources/Java/gvSIG/extensiones/com.iver.cit.gvsig/lib" includes="jgdal*.jar jmrsid*.jar"/>
62
		</delete>
63
		<copy 	todir="${NOMBRE_BUNDLE}.app/Contents/Resources/Java/gvSIG/extensiones/com.iver.cit.gvsig/lib"
64
				flatten="true"
65
			>
66
			<fileset dir="../../binaries/mac/raster/" includes="**/*.jar"/>
67
		</copy>
68
	</target>
69

  
70
</project>
0 71

  
tags/tmp_build/install/instalador-gvSIG-mac/jre-libs/LEEME.txt
1
Directorio que contiene las JAI y las JAI I/O, para instalar sobre la m?quina virtual del sistema.
0 2

  
tags/tmp_build/install/pluginInstallationTemplate/HOWTO-Extension.txt
1
{{{
2
#!rst
3
.. contents::
4

  
5
Cómo se genera un instalable para un Plugin de gvSIG
6
=======================================================
7

  
8
Número de  build
9
----------------
10

  
11
Un plugin debe añadir un panel (al que se accede en gvSIG por "ayuda->acerda de") con su correspondiente build.number para su seguimiento.
12
Para poder añadir dicho panel se seguirán los siguientes pasos:
13

  
14
+ En la carpeta config del plugin, se tiene que crear un fichero **"about.htm"**. Se puede ver un ejemplo de este fichero en el plugin **"extExpressionField"**. Lo más importante en este fichero es que debe tener la siguiente linea, que indica el build number: ::
15
   <p><br><br>
16
   <b> Build Number: #build.number#</b>
17
   </p>
18
 
19
+ Dentro de nuestro plugin, hay que crear dentro del build.xml un target **<buildNumber>**, que se encargará de aumentarlo: ::
20

  
21
	<target name="buildNumber">  
22
		<propertyfile	file="build.number"
23
				comment="Build Number for ANT. Do not edit!">
24
			<entry key="build.number" default="0" type="int" operation="+" />
25
		</propertyfile>
26
		<property file="build.number" />
27
	</target>
28

  
29
  **Nota**: Existe un *task* para el ant que hace una función parecida, el problema es que funciona de forma distinta
30
  a la que nosotros trabajamos (*Deja el siguiente número de build en el fichero, en vez de el actual*).
31

  
32
+ El fichero **"about.htm"** se tiene que copiar en una carpeta temporal y hacer el remplazo del #build.number# (el about.htm que se copiará al gvsig será el que está en dicha carpeta temporal). Aquí un ejemplo (extraído del *extExpressionField/build.xml*): ::
33
    
34
    <target name="copy-data-files">
35
		<copy file="config/config.xml" todir="${without_src}"/>
36
		<copy file="build.number" todir="${without_src}"/>
37
		<copy file="config/about.htm" todir="${without_src}"/>   <!-- AQUÍ SE HACE LA COPIA DEL about.htm A LA CARPETA TEMPORAL -->
38
		<loadproperties srcFile="build.number"/>
39
		<replace casesensitive="true"
40
  		file="${without_src}/about.htm"
41
  	  	token="#build.number#"
42
  		value="${build.number}"/>				<!-- AQUÍ SE HACE EL REMPLAZO DE #build.number# --> 
43
		<copy todir="${without_src}">
44
			<fileset dir="config" includes="text*.properties"/>
45
		</copy>
46
		<copy todir="${without_src}/images">
47
			<fileset dir="images/" includes="*"/>
48
		</copy>
49
    </target>
50

  
51
+ De nuevo en el build.xml de nuestro plugin, crear un target **<distribution>**, que llama al target *<buildNumber>* y luego al target por defecto. Este target por lo tanto hará lo mismo que el target por defecto, con la única diferencia de aumentar el buildnumber del plugin.
52

  
53
+ En los fuentes del plugin hay que crear una extensión (si ya la tenemos simplemente añadiremos dentro de ella) para registrar el panel de about.htm, un ejemplo (extraído nuevamente de *extExpressionField*) sería: ::
54

  
55
	public class AboutExpresionFieldExtension extends Extension {
56
	
57
		public void initialize() {
58
			// TODO Auto-generated method stub
59

  
60
		}
61

  
62
		public void postInitialize() {
63
			About about=(About)PluginServices.getExtension(About.class);
64
			FPanelAbout panelAbout=about.getAboutPanel();
65
			java.net.URL aboutURL = this.getClass().getResource(
66
		        "/about.htm");
67
		        panelAbout.addAboutUrl(PluginServices.getText(this,"calculate_expresion"),aboutURL);
68
		}
69
+ Para acabar, habrá que añadir en el fichero config/config.xml de nuestro plugin la extensión que acabamos de crear (en caso de que no existiera): ::
70
	
71
	<extension class-name="com.iver.cit.gvsig.AboutExpresionFieldExtension"
72
			description="Extension to add about panel."
73
			active="true"
74
			priority="1">
75
	</extension>    
76
  
77

  
78

  
79
Nombrado de los binarios
80
--------------------------
81

  
82
El nombre de los ficheros debe tener la siguiente estructura:
83

  
84
gvsig_[NOMBRE-EXT]-[VERSION_GVSIG]-[BUILD_NUMBER_GVSIG]-[BUILD_NUMBER_EXT]-[PLATAFORMA].[zip|exe|bin]
85

  
86
Donde:
87

  
88
* NOMBRE_EXT = Nombre de la extensión.
89

  
90
* VERSION_GVSIG = Número de versión de gvSIG sobre la que funciona el binario.
91

  
92
* BUILD_NUMBER_GVSIG = Número de build de gvSIG sobre el que funciona el binario.
93

  
94
* BUILD_NUMBER_EXT = Número de build propio de la extensión.
95

  
96
* PLATAFORMA = Sistema operativo (linux, windows, mac).
97

  
98
Por ejemplo: 
99

  
100
gvsig_sextante-1_1_0-1015-31-windows-i586.exe
101

  
102

  
103
Generación del instalable
104
-----------------------------
105

  
106
Vamos a describir los pasos que se siguen actualmente para generar una distribución de binarios de una extensíon para gvSIG.
107
Antes de empezar, hay que asegurarse de que en nuestro Workspace disponemos de la carpeta **"install"** y **"binaries"**, ya que estas dos carpetas son imprescindible para generar los binarios, y sin estas no se podría hacer.
108

  
109
Hay que descomprimir el fichero **"install/pluginInstallTemplate/install.zip**" dentro de nuestro proyecto. Este zip también se puede bajar de:
110

  
111
+ Si se está trabajando sobre el branch: `install_branch.zip <https://gvsig.org/svn/gvSIG/branches/v10/install/pluginInstallationTemplate/install.zip?format=raw>`_   
112
+ Si se está trabajando sobre el trunk: `install_trunk.zip <https://gvsig.org/svn/gvSIG/trunk/install/pluginInstallationTemplate/install.zip?format=raw>`_ 
113

  
114
Una vez descomprimido ya tenemos lo necesario (en forma de plantilla) para generar los binarios de cualquier extensión, y solo se deberán hacer algunos pequeños cambios para adaptarla a cada extensión...
115

  
116
Primero tenemos que modificar el fichero build.properties. Este fichero contiene el nombre de algunas variables y de la extensión. Tal y como está comentado en el propio fichero, hay que indicar el directorio de nuestra extensión en **MAIN_INSTALL_PLUGIN**, verificar que los números de versión sean los correctos, indicar el nombre del plugin (extensión) en **APPNAME**, y finalmente indicarle el directorio donde se dejaran caer los binarios en **OUTPUT_DIR**.
117

  
118
El siguiente fichero a modificar será el install.xml. Este fichero sirve de guía para el IzPAck a la hora de generar el instalable. Al principio del fichero se debe de indicar el nombre del plugin en **"<appname> </appname>"**.
119
Luego habrá que situarse en el final del fichero, en la zona de **<pack>**. En esta parte se definen qué ficheros tendrán que añadirse sobre la instalación de gvSIG ya existente. En **"name"** se indica el nombre del paquete tal y como se mostrará a la hora de la selección de paquetes durante la instalación, y en **"descripcion"** se indica la descripción que aparecerá al seleccionar dicha extensión. Posteriormente se definen los ficheros a añadir. Para ello disponemos de dos *tasks*:
120

  
121
**<file>**: copia un fichero o directorio. Tiene tres atributos a especificar:
122

  
123
- **targetdir**: Para especificar el destino de los ficheros que se copiarán.
124
- **src**: Para especificar el fichero/directorio que se copiará.
125
- **override**: Para especificar si se sobreescriben los ficheros a copiar en caso de que existan. Generalmente será **true**.
126

  
127
**<fileset>**: copia un conjunto de fichero o directorios. Tiene los siguientes campos:
128

  
129
- **targetdir**: Para especificar el destino, de igual manera que <file>.
130
- **dir**: El directorio de dónde se copiarán los ficheros.
131
- **includes**: Los ficheros a incluir en la copia. Lo interesante de este campo es que se pueden introducir patrones (como * o ?).
132
- **excludes**: Semejante a includes, sólo que aquí se especifican los ficheros que **no** se desean copiar.
133
- **override**: igual que en <file>.
134

  
135
*Para más información acerca de los tasks, hay un html de ayuda en la carpeta install del workspace: install/IzPack/doc/izpack/html/index.html*
136

  
137
Lo más normal será llevarse todo el directorio de nuestra extensión, y además, según que extensiones, se llevaran otros ficheros (ver ejemplos en el propio *install.xml*).
138

  
139
Ahora tendremos que modificar el **buildExt.xml** para prepara la instalación para **MAC OSX** cuyo proceso es distinto. Básicamente, en el *target* llamado **InstallMac** hay que copiar los fichero que hay que actualizar en la instalación (*igula que en el* **instal.xml** *pero usando los comando del* **ANT**). En el propio fichero hay comentados varios ejemplos. También existe el fichero **resources/configfile** que nos permite adaptar la configuración de la instalación de Mac (añadir un sufijo al nombre de la aplicación o comprobar el MD5 de andami), para mas información sobre este fichero se puede consultar el fichero **install/instalador-gvSIG-mac/HOWTO-UPDATER,EXTS.txt** (**CUIDADO CON LOS EL FORMATO DE LOS RETORNOS DE CARRO**).
140

  
141

  
142
Con esto ya tenemos todos los parámetros necesarios para generar los binarios, y simplemente habrá que lanzar el **buildExt.xml**, que en cuanto finalice, encontraremos los binarios de nuestro plugin en la ruta que indicamos en **OUTPUT_DIR** del fichero build.properties.
143

  
144
Dónde dejar los instalables
145
----------------------------
146

  
147
Los instalables de las versiones previas de gvSIG se dejan en el SVN asociado 
148
al TRAC de bugtracking, *https://gvsig.org/svn/bugtracking*, en *trunk/Versiones*.
149

  
150
En esa carpeta se crea para la extensión, algo como:
151

  
152
  [NOMBRE-EXT]-[MAJOR-VERSION]
153

  
154
Dentro de ésta se crearan dos carpetas, 
155
  
156
 * Documentacion-usuario
157
 * Versiones-previas
158

  
159
Y dentro de versiones previas se dejarán caer los instalables para todas las plataformas
160
soportadas.
161

  
162
En la carpeta de documentación de usuario, se dejarán caer las versiones en PDF de la
163
documentación que va a ser publicada como documentación de usuario junto con la extensión.
164

  
165

  
166
}}}
0 167

  
tags/tmp_build/install/instalador-gvSIG-lin/libs/linux/ecw/install-ecw.sh
1
#!/bin/sh
2

  
3
cd "$INSTALL_PATH/libs"
4

  
5
rm -f libjecwcompress.so libjecwcompress.so.0 libjecwcompress.so.1
6
ln -s libjecwcompress.so.0.1.0 libjecwcompress.so
7
ln -s libjecwcompress.so.0.1.0 libjecwcompress.so.0
8

  
9
rm -f libjecw.so libjecw.so.0
10
ln -s libjecw.so.0.0.1 libjecw.so
11
ln -s libjecw.so.0.0.1 libjecw.so.0
12

  
13
#rm -f libNCSCnet.so libNCSCNet.so libNCScnet.so
14
#ln -s libNCSCnet.so.0.0.0 libNCSCnet.so
15
#ln -s libNCSCnet.so.0.0.0 libNCSCNet.so
16
#ln -s libNCSCnet.so.0.0.0 libNCScnet.so
17

  
18
#rm -f libNCSEcwC.so
19
#ln -s libNCSEcwC.so.0.0.0 libNCSEcwC.so
20

  
21
#rm -f libNCSEcw.so
22
#ln -s libNCSEcw.so.0.0.0 libNCSEcw.so
23

  
24
#rm -f libNCSUtil.so
25
#ln -s libNCSUtil.so.0.0.0 libNCSUtil.so
0 26

  
tags/tmp_build/install/instalador-gvSIG-lin/libs/linux/mrsid/install-mrsid.sh
1
#!/bin/sh
2
cd "$INSTALL_PATH/libs"
3
ln -s libjmrsid.so.0.0.2 libjmrsid.so
4
ln -s libjmrsid.so.0.0.2 libjmrsid.so.0
0 5

  
tags/tmp_build/install/instalador-gvSIG-lin/libs/linux/install-crs.sh
1
#!/bin/sh
2

  
3
VER=0.6.0
4
VERPROJ=0.5.0
5

  
6
cd "$INSTALL_PATH/libs"
7

  
8
rm -f libproj.so.0 libproj.so
9
ln -s libproj.so.$VERPROJ libproj.so
10
ln -s libproj.so.$VERPROJ libproj.so.0
11

  
12
rm -f libcrsjniproj.so.0 libcrsjniproj.so
13
ln -s libcrsjniproj.so.0.1.1 libcrsjniproj.so
14
ln -s libcrsjniproj.so.0.1.1 libcrsjniproj.so.0
0 15

  
tags/tmp_build/install/instalador-gvSIG-lin/libs/linux/gdal/install-gdal.sh
1
#!/bin/sh
2
cd "$INSTALL_PATH/libs"
3
rm -f libjgdal.so libjgdal.so.0
4
ln -s libjgdal.so.0.6.1 libjgdal.so
5
ln -s libjgdal.so.0.6.1 libjgdal.so.0
6

  
7
rm -f libgdal.0 libgdal.so.1
8
ln -s libgdal.so.1.10.0 libgdal.so
9
ln -s libgdal.so.1.10.0 libgdal.so.1
10

  
11
rm -f libjasper-1.701.so libjasper-1.701.so.1
12
ln -s libjasper-1.701.so.1.0.0 libjasper-1.701.so
13
ln -s libjasper-1.701.so.1.0.0 libjasper-1.701.so.1
14

  
15
rm -f libodbc.so libodbc.so.1
16
ln -s libodbc.so.1.0.0 libodbc.so
17
ln -s libodbc.so.1.0.0 libodbc.so.1
18

  
19
rm -f libpq.so libpq.so.3
20
ln -s libpq.so.3.0 libpq.so
21
ln -s libpq.so.3.0 libpq.so.3
22

  
23
rm -f libcrypto.so libcrypto.so.0
24
ln -s libcrypto.so.0.9.7 libcrypto.so
25
ln -s libcrypto.so.0.9.7 libcrypto.so.0
26

  
27
rm -f libssl.so libssl.so.0
28
ln -s libssl.so.0.9.7 libssl.so
29
ln -s libssl.so.0.9.7 libssl.so.0
30

  
31
rm -f libpng.so libpng.so.3
32
ln -s libpng.so.3.1.2.5 libpng.so
33
ln -s libpng.so.3.1.2.5 libpng.so.3
0 34

  
tags/tmp_build/install/instalador-gvSIG-lin/resources/install.sh
1
#!/bin/sh
2
# This is used at installation time, in order to perform some extra actions
3
# that the installer is not able to do
4

  
5
chmod +x "$INSTALL_PATH"/bin/gvSIG.sh
6
chmod +x "$INSTALL_PATH"/Uninstaller/uninstall.sh
7
[ -a "$USER_HOME"/gvSIG ] || mkdir -p "$USER_HOME"/gvSIG
8
[ -a "$USER_HOME"/gvSIG/andami-config.xml ] || cp "$INSTALL_PATH"/bin/andami-config.xml "$USER_HOME"/gvSIG/andami-config.xml
0 9

  
tags/tmp_build/install/instalador-gvSIG-lin/resources/gpl.txt
1
	GNU GENERAL PUBLIC LICENSE
2
	Version 2, June 1991
3

  
4
	 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
5

  
6
		Preamble
7

  
8
	The licenses for most software are designed to take away your freedom to share and change it.  By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.  This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it.  (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.)  You can apply it to your programs, too.
9

  
10
	When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
11

  
12
	To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
13

  
14
	For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have.  You must make sure that they, too, receive or can get the source code.  And you must show them these terms so they know their
15
rights.
16

  
17
	We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
18

  
19
	Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software.  If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
20

  
21
	Finally, any free program is threatened constantly by software	patents.  We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary.  To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
22

  
23
	The precise terms and conditions for copying, distribution and modification follow.
24

  
25
				GNU GENERAL PUBLIC LICENSE
26
	TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
27

  
28
	0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License.  The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language.  (Hereinafter, translation is included without limitation in the term "modification".)  Each licensee is addressed as "you".
29

  
30
	Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.  The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
31

  
32
1.	You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
33

  
34
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
35

  
36
2.	You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
37

  
38
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
39

  
40
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
41

  
42
c)	If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License.  (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
43

  
44
These requirements apply to the modified work as a whole.  If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.  But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
45

  
46
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
47

  
48
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
49

  
50
3.	You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
51

  
52
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
53

  
54
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
55

  
56
c)	Accompany it with the information you received as to the offer to distribute corresponding source code.  (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
57

  
58
The source code for a work means the preferred form of the work for making modifications to it.  For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable.  However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
59

  
60
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
61

  
62
4.	You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License.  Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License.
63
However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
64

  
65
5.	You are not required to accept this License, since you have not signed it.  However, nothing else grants you permission to modify or distribute the Program or its derivative works.  These actions are prohibited by law if you do not accept this License.  Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
66

  
67
6.	Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions.  You may not impose any further restrictions on the recipients' exercise of the rights granted herein.
68
You are not responsible for enforcing compliance by third parties to this License.
69

  
70
7.	If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all.  For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
71

  
72
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
73

  
74
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices.  Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
75

  
76
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
77

  
78
8.	If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded.  In such case, this License incorporates the limitation as if written in the body of this License.
79

  
80
9.	The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
81

  
82
Each version is given a distinguishing version number.  If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
83

  
84
10.	If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission.  For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this.  Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
85

  
86
NO WARRANTY
87

  
88
11.	BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
89

  
90
12.	IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
91

  
92
END OF TERMS AND CONDITIONS
93

  
94
How to Apply These Terms to Your New Programs
95

  
96
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
97

  
98
To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
99

  
100
<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>
101

  
102
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
103

  
104
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
105

  
106
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
107

  
108

  
109
Also add information on how to contact you by electronic and paper mail.
110

  
111
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
112

  
113
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
114
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
115

  
116
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License.  Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
117

  
118
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary.  Here is a sample; alter the names:
119

  
120
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
121

  
122
<signature of Ty Coon>, 1 April 1989
123
Ty Coon, President of Vice
124

  
125
This General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Library General Public License instead of this License.
0 126

  
tags/tmp_build/install/instalador-gvSIG-lin/resources/uninstall.sh
1
#!/bin/sh
2
$JAVA_HOME/bin/java -jar "$INSTALL_PATH/Uninstaller/uninstaller.jar"
0 3

  
tags/tmp_build/install/instalador-gvSIG-lin/resources/unix_shortcut_spec.xml
1
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2

  
3
<shortcuts>
4
	<programGroup 	defaultName="Gva/gvSIG"
5
					location="applications"/>
6
					
7
   <shortcut	name="gvSIG User Manual" 
8
   				programGroup="no" 
9
   				desktop="no" 
10
   				applications="no" 
11
   				startMenu="yes" 
12
   				startup="no" 
13
   				target="acroread" 
14
   				workingDirectory="" 
15
   				commandLine="$INSTALL_PATH/doc/user/user-doc-0.3.pdf" 
16
   				initialState="noShow" 
17
   				iconFile="$INSTALL_PATH/bin/help.png" 
18
   				iconIndex="0" 
19
   				url="$INSTALL_PATH/doc/user/user-doc-0.3.pdf" 
20
   				type="Application" 
21
   				encoding="UTF-8" 
22
   				description="gvSIG user documentation (PDF format)"> 
23
   				<createForPack name="Documentation"/> 
24
   	</shortcut>
25
   	<shortcut	name="gvSIG"
26
				programGroup="yes"
27
				desktop="yes"
28
				startMenu="yes"
29
				applications="no"
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff