Revision 232
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/LEEME.rst | ||
---|---|---|
1 |
=============== |
|
2 |
gvSIG Educa |
|
3 |
=============== |
|
4 |
|
|
5 |
------------------------------------------------- |
|
6 |
Adaptación de gvSIG con fines educativos |
|
7 |
------------------------------------------------- |
|
8 |
|
|
9 |
Descripción |
|
10 |
============== |
|
11 |
|
|
12 |
Este fichero contiene información para generar un paquete de instalación de gvSIG personalizado que puede instalarse en el sistema operativo *Sugar* de los OLPC. |
|
13 |
|
|
14 |
Contenido del directorio |
|
15 |
=========================== |
|
16 |
|
|
17 |
* *profiles* : Directorio con configuraciones de entorno de ejecución para usar en la creación de la actividad |
|
18 |
|
|
19 |
* *resource*: Recursos que son utilizados en la generación de la activida |
|
20 |
|
|
21 |
* *skeleton*: Esqueleto de la activida, incluye los fichero de información, estructura de directorio y scrits de ejecución de la actividad. |
|
22 |
|
|
23 |
* *README.rst* *LEEME.rst*: Este fichero |
|
24 |
|
|
25 |
* *Sugerencias_de_configuracion.rst*: Documento con sugerencias para preparar gvSIG 2.0 para empaquetar |
|
26 |
|
|
27 |
Requisitos |
|
28 |
============== |
|
29 |
|
|
30 |
* *Sistema operativo Linux*: Por ser *Sugar* un sistema operativo basado en Linux-base (*Fedora 9*) |
|
31 |
|
|
32 |
Generar el paquete de instalación |
|
33 |
===================================== |
|
34 |
|
|
35 |
Esta sección explica como generar un paquete de *activida* (fichero ``.xo``). |
|
36 |
|
|
37 |
Instalar gvSIG 2.0 |
|
38 |
--------------------- |
|
39 |
|
|
40 |
Es necesario instalar gvSIG v2.0 en el sistema para poder usarla como base de plugins y configuraciones que deseamos tener en la distribución para el OLPC. |
|
41 |
|
|
42 |
Para más información sobre que paquetes/complementos instalar en gvSIG ver el fichero *Sugerencias_de_configuracion.rst*. |
|
43 |
|
|
44 |
Limpiar compilación previa |
|
45 |
---------------------------- |
|
46 |
|
|
47 |
Para limpiar una ejecución previa solo es necesario borrar el directorio de trabajo *target* o ejecutar el script *clean.sh* :: |
|
48 |
|
|
49 |
bash$ ./clean.sh |
|
50 |
|
|
51 |
|
|
52 |
Preparar el paquete |
|
53 |
--------------------- |
|
54 |
|
|
55 |
En este paso prepararemos el directorio temporal para general el paquete. Para ello ejecutar el script *prepare-bundle.sh*. Este script soporta los siguiente parámetros: |
|
56 |
|
|
57 |
* ``-g {path}``: *[obligatorio]* Directorio donde está la instalación de gvSIG 2.0 a usar como base. |
|
58 |
* ``-p {profile}``: *[opcional, standard por defecto]* Profile a usar para configura el entorno de ejecucion de gvSIG en el OLPC. |
|
59 |
* ``-v {pkgVersion}``: *[obligatorio][entero]* Versión para el paquete generado. |
|
60 |
* ``-t``: *[optional]* Incluir los mapas temáticos instalados en el directorio del usuario. |
|
61 |
|
|
62 |
Un ejemplo de ejecución:: |
|
63 |
|
|
64 |
bash$ ./prepare-bundle.sh -g "/tmp/gvSIG-2.0" -v 3 |
|
65 |
|
|
66 |
Este script, dentro de su proceso, ejecuta el script *resources/customize-gvSIG.sh* que ajusta gvSIG para el funcionamiento en el OLPC. |
|
67 |
|
|
68 |
El script genera un directorio *target* que contiene el contenido que se usará para generar el *bundle*. Puede realizar, después de la ejecución del script, cualquier modificación que necesite hacer a mano. |
|
69 |
|
|
70 |
El parámetro ``-t`` incluye todos los *mapas temáticos* que estén instalados en el directorio local de gvSIG (localizados en el directorio *~/gvSIG/plugins/org.gvsig.educa.thematicmap.app.viewer*). |
|
71 |
|
|
72 |
Generar el paquete |
|
73 |
-------------------- |
|
74 |
|
|
75 |
En este paso se genera el fichero ``.xo``` de la actividad. Únicamente es necesario ejecutar el script *generate-bundle.sh* :: |
|
76 |
|
|
77 |
bash$ ./generate-bundle.sh |
|
78 |
|
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/prepare-bundle.sh | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
|
|
3 |
function usage() { |
|
4 |
echo "Prepare work folder to generate bundle" |
|
5 |
echo "" |
|
6 |
echo "Usage:" |
|
7 |
echo "" |
|
8 |
echo " $0 -g {path-to-gvsig-installation} -v {bundle-version} [-p {profile}] [-t]" |
|
9 |
echo "" |
|
10 |
echo "Options:" |
|
11 |
echo "" |
|
12 |
echo "-g {path-to-gvsig-installation}: path where gvSIG v2.0 is installed" |
|
13 |
echo "-v {bundle-version}: path where gvSIG v2.0 is installed" |
|
14 |
echo "-p {profile}: profile to use (default 'standard')" |
|
15 |
echo "-t Include Thematic Maps from ~/gvSIG/plugins/org.gvsig.educa.thematicmap.app.viewer" |
|
16 |
echo "" |
|
17 |
echo "Availables profiles:" |
|
18 |
echo "" |
|
19 |
curpath=$PWD |
|
20 |
cd "$SCRIPT_PATH/profiles" |
|
21 |
for profile in *.profile |
|
22 |
do |
|
23 |
profile_name=`echo "$profile" | sed "s/[.]profile//"` |
|
24 |
profile_desc=`cat $profile_name.description` |
|
25 |
echo " $profile_name : $profile_desc" |
|
26 |
done |
|
27 |
cd "$curpath" |
|
28 |
|
|
29 |
} |
|
30 |
|
|
31 |
#set -x |
|
32 |
|
|
33 |
SCRIPT_FILE=`readlink -f $0` |
|
34 |
SCRIPT_PATH=`dirname $0` |
|
35 |
PROFILE_TO_USE=standard |
|
36 |
|
|
37 |
while getopts "g:v:p:t" OPT |
|
38 |
do case "$OPT" in |
|
39 |
g) SOURCE_GVSIG_FOLDER="$OPTARG";; |
|
40 |
v) XO_PKG_VERSION="$OPTARG";; |
|
41 |
p) PROFILE_TO_USE="$OPTARG";; |
|
42 |
t) INCLUDE_THEMATIC_MAPS="true";; |
|
43 |
[?]) usage; |
|
44 |
exit 1;; |
|
45 |
esac |
|
46 |
done |
|
47 |
|
|
48 |
set +e |
|
49 |
|
|
50 |
if [ "x$SOURCE_GVSIG_FOLDER" == "x" ] ; then |
|
51 |
usage |
|
52 |
echo "" |
|
53 |
echo "ERROR: Missing -g option" |
|
54 |
exit 1; |
|
55 |
fi; |
|
56 |
|
|
57 |
if [ "x$SOURCE_GVSIG_FOLDER" == "x" ] ; then |
|
58 |
usage |
|
59 |
echo "" |
|
60 |
echo "ERROR: Missing -g option" |
|
61 |
exit 1; |
|
62 |
fi; |
|
63 |
|
|
64 |
if [ ! -d "$SOURCE_GVSIG_FOLDER" ] ; then |
|
65 |
usage |
|
66 |
echo "" |
|
67 |
echo "ERROR: $SOURCE_GVSIG_FOLDER is not a gvSIG installation folder" |
|
68 |
exit 1; |
|
69 |
fi; |
|
70 |
|
|
71 |
if [ ! -d "$SOURCE_GVSIG_FOLDER/gvSIG" ] ; then |
|
72 |
usage |
|
73 |
echo "" |
|
74 |
echo "ERROR: $SOURCE_GVSIG_FOLDER is not a gvSIG installation folder" |
|
75 |
exit 1; |
|
76 |
fi; |
|
77 |
|
|
78 |
if [ ! -f "$SOURCE_GVSIG_FOLDER/gvSIG.sh" ] ; then |
|
79 |
usage |
|
80 |
echo "" |
|
81 |
echo "ERROR: $SOURCE_GVSIG_FOLDER is not a gvSIG installation folder" |
|
82 |
exit 1; |
|
83 |
fi; |
|
84 |
|
|
85 |
if [ ! -d "$SOURCE_GVSIG_FOLDER/gvSIG/extensiones" ] ; then |
|
86 |
usage |
|
87 |
echo "" |
|
88 |
echo "ERROR: $SOURCE_GVSIG_FOLDER is not a gvSIG installation folder" |
|
89 |
exit 1; |
|
90 |
fi; |
|
91 |
|
|
92 |
if [ "x$XO_PKG_VERSION" == "x" ] ; then |
|
93 |
usage |
|
94 |
echo "" |
|
95 |
echo "ERROR: Missing -v option" |
|
96 |
exit 1; |
|
97 |
fi; |
|
98 |
|
|
99 |
expr "$XO_PKG_VERSION" + 1 2> /dev/null > /dev/null |
|
100 |
if [ ! $? = 0 ] ; then |
|
101 |
usage |
|
102 |
echo "" |
|
103 |
echo "ERROR: Invalid value for -v" |
|
104 |
exit 1; |
|
105 |
fi |
|
106 |
|
|
107 |
if [ "$XO_PKG_VERSION" -le 0 ] ; then |
|
108 |
usage |
|
109 |
echo "" |
|
110 |
echo "ERROR: Invalid value for -v" |
|
111 |
exit 1; |
|
112 |
fi; |
|
113 |
|
|
114 |
if [ ! -f "$SCRIPT_PATH/profiles/$PROFILE_TO_USE.profile" ] ; then |
|
115 |
usage |
|
116 |
echo "" |
|
117 |
echo "ERROR: Ivalid profile $PROFILE_TO_USE" |
|
118 |
exit 1; |
|
119 |
fi; |
|
120 |
|
|
121 |
echo "Playing profile ($PROFILE_TO_USE)..." |
|
122 |
set -e |
|
123 |
source "$SCRIPT_PATH/profiles/$PROFILE_TO_USE.profile" |
|
124 |
set -e |
|
125 |
|
|
126 |
WORK_FOLDER="$SCRIPT_PATH/target" |
|
127 |
|
|
128 |
# clean work folder (if any) |
|
129 |
if [ -e "$WORK_FOLDER" ] ; then |
|
130 |
echo "Cleaning work folder..." |
|
131 |
rm -r "$WORK_FOLDER" |
|
132 |
fi |
|
133 |
|
|
134 |
# create work folder |
|
135 |
echo "Creating work folder..." |
|
136 |
mkdir "$WORK_FOLDER" |
|
137 |
|
|
138 |
# copy base activity files |
|
139 |
ACTIVITY_FOLDER="$WORK_FOLDER/Batovi.activity" |
|
140 |
echo "Copying base activity files..." |
|
141 |
tar c --exclude-vcs --exclude-backups skeleton | tar x -C "$WORK_FOLDER" |
|
142 |
mv "$WORK_FOLDER/skeleton" "$ACTIVITY_FOLDER" |
|
143 |
|
|
144 |
|
|
145 |
# set bundle version |
|
146 |
echo "Updating bundle version ($XO_PKG_VERSION)...." |
|
147 |
cp "$ACTIVITY_FOLDER/activity/activity.info" "$WORK_FOLDER/tmp.info" |
|
148 |
sed "s/[$][{]version[}]/$XO_PKG_VERSION/" "$WORK_FOLDER"/tmp.info > "$ACTIVITY_FOLDER/activity/activity.info" |
|
149 |
rm "$WORK_FOLDER"/tmp.info |
|
150 |
info=`cat "$ACTIVITY_FOLDER/activity/activity.info"` |
|
151 |
if [ -e "$info" ] ; then |
|
152 |
echo "ERROR: in info file: Empty" |
|
153 |
fi |
|
154 |
|
|
155 |
# copy gvSIG files |
|
156 |
echo "Copying gvSIG app files (from $SOURCE_GVSIG_FOLDER)..." |
|
157 |
|
|
158 |
TARGET_GVSIG_FOLDER="$ACTIVITY_FOLDER/gvSIG" |
|
159 |
GVSIG_FILES=`ls $SOURCE_GVSIG_FOLDER` |
|
160 |
tar c --exclude-vcs --exclude-backups -C $SOURCE_GVSIG_FOLDER $GVSIG_FILES | tar x -C $TARGET_GVSIG_FOLDER |
|
161 |
|
|
162 |
# clean install folder |
|
163 |
echo "Clean gvSIG install folder..." |
|
164 |
rm -rf $TARGET_GVSIG_FOLDER/install/* |
|
165 |
|
|
166 |
# clean install folder |
|
167 |
echo "Clean gvSIG plugins install folder..." |
|
168 |
to_remove=`find $TARGET_GVSIG_FOLDER/gvSIG/extensiones -name "install" -type d` |
|
169 |
for file_to_remove in $to_remove |
|
170 |
do |
|
171 |
echo " $file_to_remove" |
|
172 |
rm -r "$file_to_remove" |
|
173 |
done |
|
174 |
|
|
175 |
# Call customizer script |
|
176 |
echo "Calling customized gvSIG Installation script ($SCRIPT_PATH/resources/customize-gvSIG.sh)..." |
|
177 |
echo "" |
|
178 |
set -e |
|
179 |
"$SCRIPT_PATH/resources/customize-gvSIG.sh" -g "$TARGET_GVSIG_FOLDER" -r "$SCRIPT_PATH/resources" -w "$WORK_FOLDER" -a "$ACTIVITY_FOLDER" |
|
180 |
echo "" |
|
181 |
set +e |
|
182 |
echo "customized script Done. Resuming..." |
|
183 |
|
|
184 |
|
|
185 |
|
|
186 |
# include thematic maps |
|
187 |
if [ "$INCLUDE_THEMATIC_MAPS" == "true" ] ; then { |
|
188 |
echo "Check for installed Thematic Maps..." |
|
189 |
|
|
190 |
# Check if there is any thematic map |
|
191 |
GVSIG_PLUGINS_FOLDER="$HOME/gvSIG/plugins" |
|
192 |
THEMATIC_MAPS_PLUGIN_FOLDER="$GVSIG_PLUGINS_FOLDER/org.gvsig.educa.thematicmap.app.viewer" |
|
193 |
THEMATIC_MAPS_INSTALL_FOLDER="$THEMATIC_MAPS_PLUGIN_FOLDER/thematicMaps" |
|
194 |
if [ -d "$THEMATIC_MAPS_INSTALL_FOLDER" ] ; then { |
|
195 |
THEMATIC_MAP_LIST=`ls $THEMATIC_MAPS_INSTALL_FOLDER` |
|
196 |
if [ ! -e "$THEMATIC_MAP_LIST" ] ; then { |
|
197 |
TARGET_THEMATICMAP_FOLDER="$ACTIVITY_FOLDER/post-install/user-gvsig-home/plugins/org.gvsig.educa.thematicmap.app.viewer" |
|
198 |
|
|
199 |
# create folder for plugins in post-install folder |
|
200 |
mkdir -p "$TARGET_THEMATICMAP_FOLDER" |
|
201 |
|
|
202 |
echo "Copying Thematic Maps..." |
|
203 |
# copy thematic maps |
|
204 |
tar c --exclude-vcs --exclude-backups -C "$THEMATIC_MAPS_PLUGIN_FOLDER" thematicMaps | tar x -C "$TARGET_THEMATICMAP_FOLDER" |
|
205 |
echo "Thematic Maps included:" |
|
206 |
echo "" |
|
207 |
ls "$TARGET_THEMATICMAP_FOLDER/thematicMaps" |
|
208 |
echo "" |
|
209 |
} |
|
210 |
else { |
|
211 |
# No found Thematic Maps installed |
|
212 |
echo "No Thematic Maps installed (none installed)..." |
|
213 |
} |
|
214 |
fi |
|
215 |
} |
|
216 |
else { |
|
217 |
# No found Thematic Maps install folder |
|
218 |
echo "No Thematic Maps installed (install folder $THEMATIC_MAPS_INSTALL_FOLDER not found)..." |
|
219 |
} |
|
220 |
fi |
|
221 |
} |
|
222 |
fi |
|
223 |
echo "Done." |
|
224 |
|
|
0 | 225 |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/profiles/minimum.profile | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
export GVSIG_INITIAL_MEM="30M" |
|
3 |
export GVSIG_MAX_MEM="75M" |
|
4 |
export GVSIG_MAX_PERM_SIZE="60M" |
|
0 | 5 |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/profiles/minimum.description | ||
---|---|---|
1 |
Configuration for a system with RAM < 512Mb |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/profiles/standard.profile | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
export GVSIG_INITIAL_MEM="90M" |
|
3 |
export GVSIG_MAX_MEM="280M" |
|
4 |
export GVSIG_MAX_PERM_SIZE="80M" |
|
0 | 5 |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/profiles/standard.description | ||
---|---|---|
1 |
Stardart configuration for a system with RAM >= 512Mb |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/README.rst | ||
---|---|---|
1 |
=============== |
|
2 |
gvSIG Educa |
|
3 |
=============== |
|
4 |
|
|
5 |
------------------------------------------------- |
|
6 |
Customization of gvSIG for education purpose |
|
7 |
------------------------------------------------- |
|
8 |
|
|
9 |
Description |
|
10 |
============== |
|
11 |
|
|
12 |
This file contensts information to generate a custom gvSIG instalation package for OLPC Operation Sistem *Sugar* |
|
13 |
|
|
14 |
Requirements |
|
15 |
============== |
|
16 |
|
|
17 |
* *Linux S.O.*: As *Sugar* is a Linux-base Operation System. |
|
18 |
|
|
19 |
Generate distribution package |
|
20 |
============================== |
|
21 |
|
|
22 |
This section explains how to generate the package (the ``.xo`` file). |
|
23 |
|
|
24 |
Install gvSIG 2.0 |
|
25 |
------------------- |
|
26 |
|
|
27 |
We need to install a gvSIG v2.0 in our system. On it, we install all plug-ins which we want to incluide in the OLPC distribution. |
|
28 |
|
|
29 |
See *Sugerencias_de_configuracion.rst* for information about packages to install. |
|
30 |
|
|
31 |
Clean previous compilations |
|
32 |
---------------------------- |
|
33 |
|
|
34 |
Before start clean the work folder of previous generating process (if any). Just remove ``target`` folder or execute the ``clean.sh`` script:: |
|
35 |
|
|
36 |
bash$ ./clean.sh |
|
37 |
|
|
38 |
|
|
39 |
Prepare bundle |
|
40 |
---------------- |
|
41 |
|
|
42 |
In this step we going to prepare a temporal folder where the package contents will be copied. To do it execute ``prepare-bundle.sh`` script which allows this parameters: |
|
43 |
|
|
44 |
* ``-g {path}``: *[mandatory]* Specifies where is the gvSIG 2.0 instalation to use as base |
|
45 |
* ``-p {profile}``: *[optiona default standard]* Specifies which profile must use to configure OLPC execution environ. |
|
46 |
* ``-v {pkgVersion}``: *[mandatory][integer]* Version for the target *Activity* package. |
|
47 |
* ``-t``: *[optional]* Include installed Thematic Maps |
|
48 |
|
|
49 |
An example of this command could be:: |
|
50 |
|
|
51 |
bash$ ./prepare-bundle.sh -g "/tmp/gvSIG-2.0" -v 3 |
|
52 |
|
|
53 |
This script also executes *resources/customize-gvSIG.sh* which adjust gvSIG configurations. |
|
54 |
|
|
55 |
This command generates a ``target`` folder with contents of bundle. You can make any change on it at this point in order of include extra content. |
|
56 |
|
|
57 |
The ``-t`` includes all Thematic Map installed in gvSIG user folder (located in *~/gvSIG/plugins/org.gvsig.educa.thematicmap.app.viewer* folder). |
|
58 |
|
|
59 |
Generate bundle |
|
60 |
----------------- |
|
61 |
|
|
62 |
In this step the final ``.xo`` activity bundle is generate. Just execute the script ``generate-bundle.sh``:: |
|
63 |
|
|
64 |
bash$ ./generate-bundle.sh |
|
65 |
|
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/skeleton/GvSIGActivity.py | ||
---|---|---|
1 |
import os, shutil, stat |
|
2 |
import gtk, gobject |
|
3 |
import popen2 |
|
4 |
from os import path as Path |
|
5 |
|
|
6 |
import logging |
|
7 |
import sugar.activity.activity as activity |
|
8 |
from sugar.activity.activity import Activity |
|
9 |
from sugar.datastore import datastore |
|
10 |
|
|
11 |
""" |
|
12 |
Alternative paths to locate JRE |
|
13 |
""" |
|
14 |
JAVA_HOME_PATHS=( |
|
15 |
#"/usr/lib/jvm/jre", # gcj path DOESN'T WORK!!! |
|
16 |
str(Path.join(Path.expanduser("~"),"Activities/Java.activity/jre")), # Java activity path |
|
17 |
) |
|
18 |
|
|
19 |
# LOG level config |
|
20 |
logging.basicConfig(level=logging.DEBUG) |
|
21 |
#logging.basicConfig(level=logging.INFO) |
|
22 |
|
|
23 |
|
|
24 |
""" |
|
25 |
gvSIG batovi activity |
|
26 |
|
|
27 |
Requires: |
|
28 |
|
|
29 |
* Sugar builds > 706 |
|
30 |
|
|
31 |
* A java installed or the Java activity installed |
|
32 |
|
|
33 |
For more information see: http://www.mediagala.com/rap/foro/viewtopic.php?f=8&t=166 |
|
34 |
|
|
35 |
On first _run_ executes son post-install actions. |
|
36 |
|
|
37 |
""" |
|
38 |
class GvSIGActivity(Activity): |
|
39 |
# gvSIG Home path (where is gvSIG activity) |
|
40 |
gvsig_activity=None |
|
41 |
|
|
42 |
# gvSIG Home path (where is gvSIG installation) |
|
43 |
gvsig_home=None |
|
44 |
|
|
45 |
|
|
46 |
#Java Home |
|
47 |
java_home=None |
|
48 |
|
|
49 |
|
|
50 |
def __init__(self, handle): |
|
51 |
logging.debug('Creating GvSIG handler.') |
|
52 |
|
|
53 |
Activity.__init__(self, handle) |
|
54 |
self.handle = handle |
|
55 |
|
|
56 |
# Register run() to run from gtk_main_loop |
|
57 |
# as soon as it gets idle. |
|
58 |
# Which is kludge to make it run after the loop has begun |
|
59 |
self.idleFunc = gobject.idle_add(self.run) |
|
60 |
|
|
61 |
def run(self): |
|
62 |
# Remove run() because we want it to run only once |
|
63 |
gobject.source_remove(self.idleFunc) |
|
64 |
|
|
65 |
# locate and check jre |
|
66 |
if not self.initializeJavaHome(): |
|
67 |
# Exiting with a error |
|
68 |
self.showMessageError("Can't found any JRE to run gvSIG:\nSee http://www.mediagala.com/rap/foro/viewtopic.php?f=8&t=166\nfor more information") |
|
69 |
logging.error("No JRE found!!!") |
|
70 |
logging.debug("Closing activity"); |
|
71 |
self.close(True) |
|
72 |
return |
|
73 |
|
|
74 |
# setup environ properties |
|
75 |
self.gvsig_activity=activity.get_bundle_path() |
|
76 |
self.gvsig_home=Path.join(self.gvsig_activity, 'gvSIG') |
|
77 |
|
|
78 |
os.environ['GVSIG_HOME']=self.gvsig_home |
|
79 |
os.environ['GVSIG_ACTIVITY']=self.gvsig_activity |
|
80 |
os.environ['JAVA_HOME']=self.java_home |
|
81 |
|
|
82 |
# do post-install actions |
|
83 |
self.postInstall() |
|
84 |
|
|
85 |
# identify gvSIG launcher |
|
86 |
gvSIG_sh = Path.join(activity.get_bundle_path(), 'gvSIG', 'gvSIG.sh') |
|
87 |
|
|
88 |
if not Path.exists(gvSIG_sh): |
|
89 |
raise Exception("Missing gvSIG launcher: %s" % gvSIG_sh) |
|
90 |
|
|
91 |
# check execution permission |
|
92 |
self.fixExcecutionFilePermission(gvSIG_sh) |
|
93 |
|
|
94 |
try: |
|
95 |
logging.info("Executing '%s'" % gvSIG_sh); |
|
96 |
|
|
97 |
# execute gvSIG.sh |
|
98 |
gvSIG_process = popen2.Popen4('%s' % gvSIG_sh, 16) |
|
99 |
|
|
100 |
# writing stout in log file |
|
101 |
logging.info(gvSIG_process.fromchild.read()) |
|
102 |
|
|
103 |
# wait until gvSIG exit |
|
104 |
rcode = gvSIG_process.wait() |
|
105 |
|
|
106 |
logging.info('gvSIG.sh returned with code=%d' % rcode) |
|
107 |
|
|
108 |
finally: |
|
109 |
logging.debug("Closing activity"); |
|
110 |
self.close(True) |
|
111 |
|
|
112 |
def showMessageError(self, message): |
|
113 |
md = gtk.MessageDialog(self, |
|
114 |
gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, |
|
115 |
gtk.BUTTONS_CLOSE, message) |
|
116 |
md.run() |
|
117 |
md.destroy() |
|
118 |
|
|
119 |
""" |
|
120 |
Initialize property ``java_home`` |
|
121 |
|
|
122 |
Try to locate a valid java in ``JAVA_HOME_PATHS`` list |
|
123 |
|
|
124 |
Check that existe a *bin/java* executable file inside of it. |
|
125 |
|
|
126 |
If not JRE found returns False. Otherwise returns True |
|
127 |
""" |
|
128 |
def initializeJavaHome(self): |
|
129 |
for jhome in JAVA_HOME_PATHS: |
|
130 |
logging.debug("check jre in %s" % jhome) |
|
131 |
if not Path.exists(jhome): |
|
132 |
logging.debug("%s not found" % jhome) |
|
133 |
continue |
|
134 |
if self.checkJavaExecutable(jhome): |
|
135 |
self.java_home=jhome |
|
136 |
logging.debug("ussing '%s' for JAVA_HOME" % jhome) |
|
137 |
return True |
|
138 |
else: |
|
139 |
logging.debug("No Java available in register paths: %s" % repr(JAVA_HOME_PATHS)) |
|
140 |
return False |
|
141 |
|
|
142 |
|
|
143 |
|
|
144 |
|
|
145 |
""" |
|
146 |
Check ``javaHome`` folder: check that exist a *bin/java* executable file |
|
147 |
|
|
148 |
Returns True/False |
|
149 |
""" |
|
150 |
def checkJavaExecutable(self, javaHome): |
|
151 |
javaExe=Path.join(javaHome,"bin","java") |
|
152 |
if not Path.exists(javaExe): |
|
153 |
return False |
|
154 |
return os.access(javaExe, os.X_OK) |
|
155 |
|
|
156 |
""" |
|
157 |
Run post install actions. |
|
158 |
|
|
159 |
This actions usually will be execute just once, in first activity run |
|
160 |
""" |
|
161 |
def postInstall(self): |
|
162 |
self.installInGvSIGUserHome() |
|
163 |
self.installInUserHome() |
|
164 |
self.execScripts() |
|
165 |
|
|
166 |
""" |
|
167 |
*Post Intall process:* Excecutes install scripts |
|
168 |
|
|
169 |
This actions usually will be execute just once, in first activity run. |
|
170 |
""" |
|
171 |
def execScripts(self): |
|
172 |
# check if ther is any file to copy to |
|
173 |
sourceFolder = Path.join(activity.get_bundle_path(), 'post-install', 'scripts') |
|
174 |
|
|
175 |
if not Path.exists(sourceFolder): |
|
176 |
# No files to execute |
|
177 |
return |
|
178 |
|
|
179 |
everyScriptOk = True |
|
180 |
|
|
181 |
# for all file/dir in souceFolder |
|
182 |
scriptFiles = os.listdir(sourceFolder) |
|
183 |
|
|
184 |
for aFile in scriptFiles: |
|
185 |
fext = Path.splitext(aFile)[1] |
|
186 |
aFilePath = Path.join(sourceFolder,aFile) |
|
187 |
if fext == ".py": |
|
188 |
# Exec python script |
|
189 |
execOk = self.execPython(aFilePath) |
|
190 |
if execOk: |
|
191 |
shutil.move(aFilePath,aFilePath+".done") |
|
192 |
else: |
|
193 |
everyScriptOk=False |
|
194 |
|
|
195 |
|
|
196 |
elif fext == ".sh": |
|
197 |
# Exec Shell script |
|
198 |
execOk = self.execShell(aFilePath) |
|
199 |
if execOk: |
|
200 |
shutil.move(aFilePath,aFilePath+".done") |
|
201 |
else: |
|
202 |
everyScriptOk=False |
|
203 |
|
|
204 |
elif fext == "done": |
|
205 |
# Nothing to do |
|
206 |
pass |
|
207 |
|
|
208 |
else: |
|
209 |
# Ignoring file |
|
210 |
logging.debug("Ignoring post-install script: " + aFilePath) |
|
211 |
|
|
212 |
|
|
213 |
if everyScriptOk: |
|
214 |
# rename folder to avoid execution on next application open |
|
215 |
shutil.move(sourceFolder, sourceFolder+".done") |
|
216 |
|
|
217 |
""" |
|
218 |
Excecutes a python script file |
|
219 |
""" |
|
220 |
def execPython(self,aFile): |
|
221 |
logging.debug("Executing python script '%s'" % aFile); |
|
222 |
try: |
|
223 |
# open file in read-only mode |
|
224 |
f = file(aFile,"r") |
|
225 |
|
|
226 |
# exec script |
|
227 |
try: |
|
228 |
exec f |
|
229 |
finally: |
|
230 |
f.close() |
|
231 |
|
|
232 |
return True |
|
233 |
except Exception, exc: |
|
234 |
logging.error("Excecuting file %s: %s" % (aFile,exc)); |
|
235 |
return False |
|
236 |
|
|
237 |
""" |
|
238 |
Fix (set) execution permission of a file |
|
239 |
""" |
|
240 |
def fixExcecutionFilePermission(self, aFile): |
|
241 |
# check execution permission |
|
242 |
if not os.access(aFile, os.X_OK): |
|
243 |
# set excecution permission |
|
244 |
os.chmod(aFile,os.stat(aFile)+stat.S_IEXEC) |
|
245 |
|
|
246 |
""" |
|
247 |
Excecutes a shell script file |
|
248 |
""" |
|
249 |
def execShell(self,aFile): |
|
250 |
logging.debug("Executing '%s'" % aFile); |
|
251 |
try: |
|
252 |
mProcess = popen2.Popen4('%s' % aFile, 16) |
|
253 |
logging.debug(mProcess.fromchild.read()) |
|
254 |
rcode = mProcess.wait() |
|
255 |
return rcode == 0 |
|
256 |
except Exception, exc: |
|
257 |
logging.error("Excecuting file %s: %s" % (aFile,exc)); |
|
258 |
return False |
|
259 |
|
|
260 |
|
|
261 |
""" |
|
262 |
*Post Intall process:* Install files in user home |
|
263 |
|
|
264 |
Move files from ``{activity_folder}/post-install/user-home`` to ``$HOME`` |
|
265 |
|
|
266 |
**NOTE**: if a file/dir already exist **will be ignored** (Keeping untouched original files) |
|
267 |
""" |
|
268 |
def installInUserHome(self): |
|
269 |
# check if ther is any file to copy to |
|
270 |
sourceFolder = Path.join(activity.get_bundle_path(), 'post-install', 'user-home') |
|
271 |
|
|
272 |
if not Path.exists(sourceFolder): |
|
273 |
# No files to copy |
|
274 |
return |
|
275 |
|
|
276 |
homeUserFolder = Path.expanduser("~") |
|
277 |
|
|
278 |
#merge folder |
|
279 |
self.mergeFolder(sourceFolder,homeUserFolder) |
|
280 |
|
|
281 |
#rename source folder to prevent rerun of this step |
|
282 |
os.rename(sourceFolder,sourceFolder+".done") |
|
283 |
|
|
284 |
#done |
|
285 |
return |
|
286 |
|
|
287 |
""" |
|
288 |
*Post Intall process:* Install files in the gvSIG user home folder |
|
289 |
|
|
290 |
Move files from ``{activity_folder}/post-install/user-gvsig-home`` to ``$HOME/gvSIG`` |
|
291 |
""" |
|
292 |
def installInGvSIGUserHome(self): |
|
293 |
# check if ther is any file to copy to |
|
294 |
sourceFolder = Path.join(activity.get_bundle_path(), 'post-install', 'user-gvsig-home') |
|
295 |
|
|
296 |
if not Path.exists(sourceFolder): |
|
297 |
# No files to copy |
|
298 |
return |
|
299 |
|
|
300 |
homeGvsigUserFolder = Path.expanduser("~/gvSIG") |
|
301 |
|
|
302 |
if not Path.exists(homeGvsigUserFolder): |
|
303 |
# Create gvSIG user home folder |
|
304 |
os.mkdir(homeGvsigUserFolder) |
|
305 |
|
|
306 |
|
|
307 |
#move files |
|
308 |
self.mergeFolder(sourceFolder,homeGvsigUserFolder) |
|
309 |
|
|
310 |
#rename source folder to prevent rerun of this step |
|
311 |
os.rename(sourceFolder,sourceFolder+".done") |
|
312 |
|
|
313 |
#done |
|
314 |
return |
|
315 |
|
|
316 |
""" |
|
317 |
Move files from ``sourceFolder`` into ``targetFolder`` |
|
318 |
|
|
319 |
``sourceFolder`` must be a folder |
|
320 |
``targetFolder`` must be a folder or not exists (so it will be created) |
|
321 |
``overrideTarget`` if it's ``False`` raise an exception when target already contains the file/dir to move. if ``ignoreExisting`` |
|
322 |
``ignoreExisting`` modifies ``overrideTarget`` option (when it's ``False``) to don't raise an exception, just skip file/folder |
|
323 |
""" |
|
324 |
def moveFiles(self,sourceFolder,targetFolder,overrideTarget=True,ignoreExisting=True): |
|
325 |
if not Path.exists(targetFolder): |
|
326 |
# Create target folder |
|
327 |
os.makedirs(targetFolder) |
|
328 |
# set overrideTarget to True because target is new |
|
329 |
overrideTarget=True |
|
330 |
elif not Path.isdir(targetFolder): |
|
331 |
raise Exception("%s must be a dir" % targetFolder) |
|
332 |
|
|
333 |
# for all file/dir in souceFolder |
|
334 |
toMoveList = os.listdir(sourceFolder) |
|
335 |
for toMove in toMoveList: |
|
336 |
|
|
337 |
target = Path.join(targetFolder,toMove) |
|
338 |
# check if exists target |
|
339 |
if Path.exists(target): |
|
340 |
if overrideTarget: |
|
341 |
if ignoreExisting: |
|
342 |
continue |
|
343 |
|
|
344 |
else: |
|
345 |
if ignoreExisting: |
|
346 |
continue |
|
347 |
else: |
|
348 |
raise Exception("%s alredy exists in target folder %s" % (toMove, targetFolder)) |
|
349 |
|
|
350 |
|
|
351 |
# move file/dir |
|
352 |
shutil.move(Path.join(sourceFolder, toMove), targetFolder) |
|
353 |
|
|
354 |
|
|
355 |
""" |
|
356 |
Merge folder content: Copy all missing folders and files from |
|
357 |
``sourceFolder`` to ``targetFolder``. |
|
358 |
|
|
359 |
Process doesn't override existing files in ``targetFolder`` |
|
360 |
""" |
|
361 |
def mergeFolder(self,sourceFolder,targetFolder): |
|
362 |
# get folder contents |
|
363 |
names = os.listdir(sourceFolder) |
|
364 |
|
|
365 |
if not Path.exists(targetFolder): |
|
366 |
# Create target folder if not exists |
|
367 |
os.makedirs(targetFolder) |
|
368 |
|
|
369 |
for name in names: |
|
370 |
srcname = Path.join(sourceFolder, name) |
|
371 |
dstname = Path.join(targetFolder, name) |
|
372 |
if Path.isdir(srcname): |
|
373 |
# Recursive call to mergeFolder |
|
374 |
self.mergeFolder(srcname,dstname) |
|
375 |
else: |
|
376 |
if not Path.exists(dstname): |
|
377 |
# Copy new file |
|
378 |
shutil.copy(srcname,dstname) |
|
379 |
else: |
|
380 |
# skip existing file |
|
381 |
continue |
|
382 |
|
|
383 |
|
|
384 |
|
|
385 |
|
|
386 |
|
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/skeleton/post-install/README.rst | ||
---|---|---|
1 |
=========================================== |
|
2 |
gvSIG batovi Activity Post-intall process |
|
3 |
=========================================== |
|
4 |
|
|
5 |
|
|
6 |
This folder contains all supported *post-intall* actions implemented in gvSIG activity. |
|
7 |
|
|
8 |
|
|
9 |
user-gvsig-home |
|
10 |
================ |
|
11 |
|
|
12 |
Files of this folder will be **merged** (copy only files than no exists on target folder) with *~/gvSIG* folder of user intallation in first gvSIG activity execution. |
|
13 |
|
|
14 |
|
|
15 |
After that this folder will be renamed to *user-gvsig-home.done*. |
|
16 |
|
|
17 |
|
|
18 |
user-home |
|
19 |
=========== |
|
20 |
|
|
21 |
Files of this folder will be **merged** (copy only files than no exists on target folder) to *user home* folder. |
|
22 |
|
|
23 |
After that this folder will be removed. |
|
24 |
|
|
25 |
scripts |
|
26 |
======== |
|
27 |
|
|
28 |
Excecutes contained scripts in first gvSIG activity execution. Only *Pyhon* (files ``.py``) and *Shell* (files ``.sh``) are allowed (other files will be ignored). |
|
29 |
|
|
30 |
Before all execution this environ variables will be set: |
|
31 |
|
|
32 |
* ``GVSIG_ACTIVITY``: root folder of gvSIG activity (usually ``~/Activities/org.gvsig.batovi.activity``) |
|
33 |
|
|
34 |
* ``GVSIG_HOME``: root folder of gvSIG installation (usually ``$GVSIG_ACTIVITY/gvSIG``) |
|
35 |
|
|
36 |
After the script excution will be renamed (adds ``.done``) to prevent future executions. |
|
37 |
|
|
38 |
When all script were executed, this folder will be renamed (adds ``.done``). |
|
39 |
|
|
40 |
See log file for problems in script executions. |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/skeleton/activity/activity.info | ||
---|---|---|
1 |
[Activity] |
|
2 |
name = gvSIG Batovi |
|
3 |
bundle_id = Batovi.Activity |
|
4 |
class = GvSIGActivity.GvSIGActivity |
|
5 |
icon = activity-gvsig |
|
6 |
activity_version = ${version} |
|
7 |
host_version = 1 |
|
8 |
show_launcher = yes |
|
9 |
|
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/skeleton/activity/activity-gvsig.svg | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
2 |
<!-- Created with Inkscape (http://www.inkscape.org/) --> |
|
3 |
|
|
4 |
<svg |
|
5 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
6 |
xmlns:cc="http://creativecommons.org/ns#" |
|
7 |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|
8 |
xmlns:svg="http://www.w3.org/2000/svg" |
|
9 |
xmlns="http://www.w3.org/2000/svg" |
|
10 |
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
|
11 |
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
|
12 |
width="55" |
|
13 |
height="55" |
|
14 |
id="svg4502" |
|
15 |
sodipodi:version="0.32" |
|
16 |
inkscape:version="0.48.2 r9819" |
|
17 |
version="1.0" |
|
18 |
sodipodi:docname="logo_gvsig.svg" |
|
19 |
inkscape:output_extension="org.inkscape.output.svg.inkscape"> |
|
20 |
<defs |
|
21 |
id="defs4504" /> |
|
22 |
<sodipodi:namedview |
|
23 |
id="base" |
|
24 |
pagecolor="#ffffff" |
|
25 |
bordercolor="#666666" |
|
26 |
borderopacity="1.0" |
|
27 |
gridtolerance="10000" |
|
28 |
guidetolerance="10" |
|
29 |
objecttolerance="10" |
|
30 |
inkscape:pageopacity="0.0" |
|
31 |
inkscape:pageshadow="2" |
|
32 |
inkscape:zoom="1" |
|
33 |
inkscape:cx="32.531924" |
|
34 |
inkscape:cy="23.680342" |
|
35 |
inkscape:document-units="px" |
|
36 |
inkscape:current-layer="layer3" |
|
37 |
width="55px" |
|
38 |
height="55px" |
|
39 |
inkscape:window-width="1440" |
|
40 |
inkscape:window-height="876" |
|
41 |
inkscape:window-x="0" |
|
42 |
inkscape:window-y="24" |
|
43 |
showgrid="false" |
|
44 |
inkscape:window-maximized="1"> |
|
45 |
<inkscape:grid |
|
46 |
id="GridFromPre046Settings" |
|
47 |
type="xygrid" |
|
48 |
originx="0px" |
|
49 |
originy="0px" |
|
50 |
spacingx="15px" |
|
51 |
spacingy="15px" |
|
52 |
color="#0000ff" |
|
53 |
empcolor="#0000ff" |
|
54 |
opacity="0.2" |
|
55 |
empopacity="0.4" |
|
56 |
empspacing="5" /> |
|
57 |
</sodipodi:namedview> |
|
58 |
<metadata |
|
59 |
id="metadata4507"> |
|
60 |
<rdf:RDF> |
|
61 |
<cc:Work |
|
62 |
rdf:about=""> |
|
63 |
<dc:format>image/svg+xml</dc:format> |
|
64 |
<dc:type |
|
65 |
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
|
66 |
<dc:title></dc:title> |
|
67 |
</cc:Work> |
|
68 |
</rdf:RDF> |
|
69 |
</metadata> |
|
70 |
<g |
|
71 |
inkscape:groupmode="layer" |
|
72 |
id="layer3" |
|
73 |
inkscape:label="gvSIG" |
|
74 |
style="display:inline"> |
|
75 |
<path |
|
76 |
inkscape:connector-curvature="0" |
|
77 |
d="m 39.045533,15.464691 5.008004,0.01002 -2.83453,2.78445 -2.173474,-2.794466 z" |
|
78 |
id="path3167" |
|
79 |
style="opacity:0.9;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" /> |
|
80 |
<path |
|
81 |
inkscape:connector-curvature="0" |
|
82 |
d="m 31.753879,43.809995 2.914658,-1.171873 -0.691105,1.582529 -0.470752,1.021633 -1.752801,-1.432289 z" |
|
83 |
id="path3169" |
|
84 |
style="opacity:0.9;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" /> |
|
85 |
<path |
|
86 |
inkscape:connector-curvature="0" |
|
87 |
d="m 32.754444,44.199731 c -1.006043,-0.811367 -0.942467,-0.909284 -0.900076,-0.946376 1.029815,0.665011 1.157454,2.59338 3.343757,-1.369367 0.04861,0 -0.19716,0.182445 -0.489271,0.808227 -0.749217,1.4631 -0.57733,2.576404 -1.95441,1.507516 z M 39.015523,14.29865 c 0.02911,0.04721 0.0029,0.113605 -0.10325,0.262168 m 0,0 c -0.235226,0.329008 -0.783149,1.239702 -1.246618,2.071982 l -0.436597,0.784028 -0.99873,2.172872 c -0.211322,0.662323 -0.149824,0.340818 -0.283311,0.695752 -0.851761,2.264795 -1.136771,4.0885 -0.876162,5.606343 0.15208,0.885747 1.103754,3.671021 0.740732,2.525289 -1.055611,-3.331599 -0.374263,-0.110081 0.46825,1.548953 l 0.506476,1.676798 c -0.376992,-1.104849 -0.0094,-0.01827 0.322667,0.546688 0.144246,0.245467 -0.251526,1.103205 -0.251526,1.252601 l -2.600479,3.843859 -1.904781,2.400568 c -1.047629,1.320312 -1.898975,2.425595 -1.89188,2.456183 0.0071,0.03059 0.299529,0.287225 0.649852,0.570303 0.414154,0.334657 0.623184,0.528457 0.59759,0.55405 -0.05919,0.05919 -1.073573,0.295913 -1.758876,0.410463 -1.214277,0.20297 -2.627521,0.284616 -3.851841,0.222524 -2.343425,-0.118842 -4.647166,-0.729425 -6.776012,-1.79591 -1.783328,-0.893392 -3.089809,-1.848315 -4.586564,-3.352376 -1.624587,-1.97553 -0.953207,-1.093241 -1.961815,-2.364074 C 11.22125,34.11736 10.268777,31.576881 9.8960536,28.715131 9.7899424,27.900417 9.7903578,25.45811 9.8967473,24.641457 10.300998,21.538365 11.386492,18.82179 13.193665,16.390529 c 0.771959,-1.072328 -0.136037,0.15859 1.024592,-1.249459 0.611433,-0.701827 1.638575,-1.638054 2.499035,-2.277838 2.419486,-1.798975 5.106641,-2.880747 8.169743,-3.2889027 0.805568,-0.1073415 2.589827,-0.1495905 3.451273,-0.081722 3.420086,0.2694485 6.629524,1.5090367 9.294084,3.5896747 0.491753,0.383988 1.317771,1.110414 1.383131,1.216368 m -1.560959,22.110078 c 0.743443,-1.368642 1.546847,-2.477745 2.43279,-3.358479 0.543554,-0.540358 0.946412,-0.86191 1.492751,-1.191485 0.187925,-0.113364 0.347133,-0.222732 0.353795,-0.243039 0.0067,-0.02031 -0.194006,-0.141267 -0.445928,-0.2688 -2.012917,-1.019018 -3.59431,-2.706785 -3.912617,-4.584878 -0.0568,-0.207256 0.04596,0.280857 -0.124777,-0.398347 l -0.05745,-1.255803 0.196786,-1.446482 c 1.076898,-2.372767 1.206196,-2.516959 2.617915,-4.202801 0.407242,-0.48632 1.36236,-1.555087 1.565091,-1.745254 0.143999,-0.135075 0.142508,-0.136329 0.444611,0.373919 1.765305,2.981576 2.429605,5.568978 2.273216,8.853986 -0.09665,2.030145 -0.366432,3.61138 -0.896776,5.25613 -0.995198,3.086407 -2.835522,5.77324 -5.317913,7.764032 -0.899273,0.721188 -2.663277,1.856756 -2.749838,1.770195 -0.08036,-0.08036 0.661546,-2.174539 1.24226,-3.506548 0.185851,-0.426293 0.337909,-0.81198 0.337909,-0.857085 z m 1.398,-22.009444 c 2.8125,-0.07498 0.209333,-0.147678 2.513796,-0.272677 0.851564,-0.223161 1.96777,-0.04869 2.50391,-0.12385 -0.7399,2.071371 -0.168365,1.140579 -0.854924,1.827405 -0.686559,0.686823 -2.221305,2.710631 -2.245305,2.710631" |
|
88 |
id="path2412" |
|
89 |
style="opacity:0.9;fill:none;stroke:#eebe0e;stroke-width:1.01694441;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|
90 |
sodipodi:nodetypes="ccccccccsccsssccsccscsssssccssccssssccsscsccccsssssssscccccsc" /> |
|
91 |
<path |
|
92 |
inkscape:connector-curvature="0" |
|
93 |
d="m 37.454564,36.40872 c 0.743443,-1.368643 1.546847,-2.477746 2.43279,-3.358479 0.543554,-0.540358 0.946412,-0.861911 1.492751,-1.191485 0.187925,-0.113364 0.347133,-0.222732 0.353795,-0.24304 0.0067,-0.02031 -0.194006,-0.141266 -0.445928,-0.268799 -2.012917,-1.019018 -3.212956,-2.611446 -3.912617,-4.584878 l -0.211641,-0.959123 c 0,0 -0.184842,-0.408725 0.226167,-2.141464 0.419943,-1.199861 1.309327,-2.627679 2.617915,-4.2028 0.405343,-0.487905 1.362361,-1.555088 1.565092,-1.745255 0.143998,-0.135076 0.142507,-0.136329 0.44461,0.373918 1.765306,2.981577 2.429605,5.56898 2.273216,8.853987 -0.09665,2.030145 -0.366432,3.61138 -0.896776,5.256131 -0.995198,3.086406 -2.835521,5.773238 -5.317912,7.764032 -0.587931,0.471501 -1.676121,1.213824 -2.310514,1.576147 -0.4333,0.247472 -0.417775,0.240983 -0.450374,0.188235 l 3.5e-5,-3.7e-5 c -0.06146,-0.09945 0.710462,-2.255581 1.253311,-3.500737 0.18585,-0.426292 0.337909,-0.809016 0.337909,-0.850498" |
|
94 |
id="path2410" |
|
95 |
style="opacity:0.9;fill:#3e83c3;stroke-width:25.21345139;stroke-miterlimit:4;stroke-dasharray:none" |
|
96 |
sodipodi:nodetypes="csscscccsssssssccsc" /> |
|
97 |
<path |
|
98 |
inkscape:connector-curvature="0" |
|
99 |
d="m 38.532721,14.407793 c 0.02821,0.04693 0.0028,0.112922 -0.100075,0.260591 m 0,0 c -0.227984,0.327031 -0.759034,1.232252 -1.208229,2.059531 l -0.423152,0.779316 -0.967975,2.159815 c -0.204814,0.658339 -0.145209,0.338769 -0.274585,0.691571 -0.825532,2.251184 -1.101765,4.063927 -0.84918,5.57265 0.147397,0.880422 0.207888,0.829618 0.65437,1.933026 0.270532,0.668576 -0.05279,0.341313 0.763786,1.990376 l 0.675684,1.287657 c -0.36538,-1.098208 0.237371,0.803143 0.374334,1.048822 0.136967,0.245677 0.187432,0.843867 0.187432,0.992362 l -3.444425,4.073469 -1.846122,2.386141 c -1.015368,1.312379 -1.840495,2.411021 -1.83362,2.441424 0.0071,0.03039 0.290304,0.285499 0.62984,0.566875 0.401399,0.332643 0.603993,0.525281 0.579186,0.550718 -0.05738,0.05884 -1.040514,0.294133 -1.70471,0.407995 -1.176884,0.201755 -2.546606,0.282908 -3.733226,0.221191 -2.271253,-0.118132 -4.504052,-0.725046 -6.567338,-1.785119 -1.728412,-0.888022 -2.994658,-1.837211 -4.445323,-3.332227 -1.574555,-1.963658 -0.923851,-1.086672 -1.9014,-2.349867 -1.503627,-2.256711 -2.426764,-4.781923 -2.788011,-7.626475 -0.102841,-0.809818 -0.102439,-3.237448 6.73e-4,-4.049193 0.391801,-3.084444 1.443869,-5.784691 3.195389,-8.201343 0.748189,-1.065882 -0.131846,0.157639 0.99304,-1.241949 0.592603,-0.697611 1.588114,-1.628211 2.422078,-2.264149 2.344977,-1.788164 4.949384,-2.863436 7.918155,-3.269138 0.780762,-0.1066957 2.510073,-0.1486915 3.344992,-0.08123 3.314765,0.2678291 6.425367,1.4999688 9.007873,3.5681018 0.476609,0.381681 1.494986,0.96972 1.340537,1.209059" |
|
100 |
id="path2412-0" |
|
101 |
style="opacity:0.9;fill:#eebe0e;fill-opacity:1;stroke:none" |
|
102 |
sodipodi:nodetypes="cccsccsssccsccscsssssccssccssssc" /> |
|
103 |
<path |
|
104 |
style="fill:#ffffff;fill-opacity:1;stroke:none" |
|
105 |
d="m 43.5746,14.52427 -4.065864,-0.08839 c -1.473139,3.240906 -7.080337,8.589903 -1.90035,18.163806 -2.268556,3.962783 -4.435019,6.09836 -6.584932,9.501746 l 2.253903,1.811963 c 1.753035,-2.268634 1.569667,-2.495936 3.623922,-7.689787 1.459857,-2.14221 1.900097,-3.277945 4.154252,-4.419418 -1.656469,-0.763306 -3.061836,-2.341526 -3.800698,-3.668116 -0.525075,-1.592748 -0.796986,-3.819661 0.08838,-5.61266 0.99004,-1.454308 2.187197,-3.412551 2.96101,-4.110059 0.966867,-1.027473 2.165514,-2.681112 3.270373,-3.889085 z" |
|
106 |
id="path4065" |
|
107 |
inkscape:connector-curvature="0" |
|
108 |
sodipodi:nodetypes="ccccccccccc" /> |
|
109 |
</g> |
|
110 |
</svg> |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/generate-bundle.sh | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
|
|
3 |
function usage() { |
|
4 |
echo "Generate bundle" |
|
5 |
echo "" |
|
6 |
echo "Usage:" |
|
7 |
echo " $0" |
|
8 |
} |
|
9 |
|
|
10 |
SCRIPT_FILE=`readlink -f $0` |
|
11 |
SCRIPT_PATH=`dirname $0` |
|
12 |
|
|
13 |
WORK_FOLDER="$SCRIPT_PATH/target" |
|
14 |
ACTIVITY_FOLDER_NAME="Batovi.activity" |
|
15 |
ACTIVITY_FOLDER="$WORK_FOLDER/$ACTIVITY_FOLDER_NAME" |
|
16 |
TARGET_FILE_NAME="org.gvsig.educa.batovi.xo" |
|
17 |
TARGET_FILE="$WORK_FOLDER/$TARGET_FILE_NAME" |
|
18 |
|
|
19 |
|
|
20 |
if [ ! -d "$ACTIVITY_FOLDER" ] ; then |
|
21 |
usage |
|
22 |
echo "" |
|
23 |
echo "Work folder does not exist. Missing 'prepare-bundle.sh' execution?" |
|
24 |
exit 1; |
|
25 |
fi |
|
26 |
if [ -f "$TARGET_FILE" ] ; then |
|
27 |
echo "Cleaning previso bundle..." |
|
28 |
rm "$TARGET_FILE" |
|
29 |
fi |
|
30 |
|
|
31 |
# Generate MANIFEST file |
|
32 |
echo "Creating MANIFEST..." |
|
33 |
cd "$ACTIVITY_FOLDER" |
|
34 |
find ./ | sed "s,^./,$ACTIVITY_FOLDER_NAME/,g" > MANIFEST |
|
35 |
|
|
36 |
echo "Adjusting scripts permission..." |
|
37 |
# Adjust shell script permission |
|
38 |
find . -name '*.sh' -exec chmod a+x {} ';' |
|
39 |
|
|
40 |
# Adjust python script permission |
|
41 |
find . -name '*.py' -exec chmod a+x {} ';' |
|
42 |
|
|
43 |
# Generate .xo file |
|
44 |
echo "Generating bundle file..." |
|
45 |
cd .. |
|
46 |
zip -r $TARGET_FILE_NAME $ACTIVITY_FOLDER_NAME |
|
47 |
|
|
48 |
echo "Generated bundle file $TARGET_FILE" |
|
49 |
echo "Done." |
|
0 | 50 |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/resources/fix_gdal_links.sh | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# Fixes symbolic link of GDAL library (if any) |
|
4 |
OUT_FILE="$0.sh_out" |
|
5 |
|
|
6 |
touch "$OUT_FILE" |
|
7 |
|
|
8 |
echo "Check for $GVSIG_HOME/native/libgdal.so" >> "$OUT_FILE" |
|
9 |
if [ -f "$GVSIG_HOME/native/libgdal.so"] ; then |
|
10 |
rm "Delete $GVSIG_HOME/native/libgdal.so" &>> "$OUT_FILE" |
|
11 |
rm "$GVSIG_HOME/native/libgdal.so" &>> "$OUT_FILE" |
|
12 |
fi; |
|
13 |
echo "Check for $GVSIG_HOME/native/libgdal.so.1" >> "$OUT_FILE" |
|
14 |
if [ -f "$GVSIG_HOME/libgdal.so.1"] ; then |
|
15 |
rm "Delete $GVSIG_HOME/native/libgdal.so.1" &>> "$OUT_FILE" |
|
16 |
rm "$GVSIG_HOME/native/libgdal.so.1" &>> "$OUT_FILE" |
|
17 |
fi; |
|
18 |
echo "Check for $GVSIG_HOME/native/libgdal.so.1.*" >> "$OUT_FILE" |
|
19 |
GDAL_LIB=`ls $GVSIG_HOME/native/libgdal.so.1.*` |
|
20 |
echo "Found: $GDAL_LIB" >> "$OUT_FILE" |
|
21 |
if [ -f "$GDAL_LIB" ] ; then |
|
22 |
echo "ln -s $GDAL_LIB $GVSIG_HOME/native/libgdal.so" >> "$OUT_FILE" |
|
23 |
ln -s "$GDAL_LIB" "$GVSIG_HOME/native/libgdal.so" &>> "$OUT_FILE" |
|
24 |
echo "ln -s $GDAL_LIB $GVSIG_HOME/native/libgdal.so.1" >> "$OUT_FILE" |
|
25 |
ln -s "$GDAL_LIB" "$GVSIG_HOME/native/libgdal.so.1" &>> "$OUT_FILE" |
|
26 |
fi |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/resources/customize-gvSIG.sh | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
|
|
3 |
function usage() { |
|
4 |
|
|
5 |
echo "Customize gvSIG installation" |
|
6 |
echo "" |
|
7 |
echo "Usage:" |
|
8 |
echo "" |
|
9 |
echo " $0 -g {path-to-gvsig-tocustomize} -r {path-to-resources-folder} -w {path-to-work-folder} -a {path-to-activity-folder}" |
|
10 |
echo "" |
|
11 |
echo "Options:" |
|
12 |
echo "" |
|
13 |
echo "-g {path-to-gvsig-tocustomize}: path where gvSIG v2.0 is to customize" |
|
14 |
echo "-r {path-to-resources-folder}: path to resources folder" |
|
15 |
echo "-w {path-to-work-folder}: path to work folder" |
|
16 |
echo "-a {path-to-activity-folder}: path to work activity folder" |
|
17 |
} |
|
18 |
|
|
19 |
|
|
20 |
## Replace a regular expression in a file by a string |
|
21 |
# |
|
22 |
# Params: |
|
23 |
# * File |
|
24 |
# * Regular expression |
|
25 |
# * Final string |
|
26 |
# |
|
27 |
function replaceInFile(){ |
|
28 |
FILE_TO_REPLACE="$1" |
|
29 |
BACKUP_FILE="$FILE_TO_REPLACE.back" |
|
30 |
RE_FOR_SED="$2" |
|
31 |
FINAL_STRING="$3" |
|
32 |
|
|
33 |
cp "$FILE_TO_REPLACE" "$BACKUP_FILE" |
|
34 |
sed "s/$RE_FOR_SED/$FINAL_STRING/" "$BACKUP_FILE" > "$FILE_TO_REPLACE" |
|
35 |
rm "$BACKUP_FILE" |
|
36 |
} |
|
37 |
|
|
38 |
#set -x |
|
39 |
|
|
40 |
while getopts "g:r:w:a:" OPT |
|
41 |
do case "$OPT" in |
|
42 |
g) export TARGET_GVSIG_FOLDER="$OPTARG";; |
|
43 |
r) export RESOURCE_FOLDER="$OPTARG";; |
|
44 |
w) export WORK_FOLDER="$OPTARG";; |
|
45 |
a) export ACTIVITY_FOLDER="$OPTARG";; |
|
46 |
[?]) usage; |
|
47 |
exit 1;; |
|
48 |
esac |
|
49 |
done |
|
50 |
|
|
51 |
set +e |
|
52 |
|
|
53 |
if [ "x$TARGET_GVSIG_FOLDER" == "x" ] ; then |
|
54 |
usage |
|
55 |
echo "" |
|
56 |
echo "ERROR: Missing -g option" |
|
57 |
exit 1; |
|
58 |
fi; |
|
59 |
|
|
60 |
if [ ! -d "$TARGET_GVSIG_FOLDER" ] ; then |
|
61 |
usage |
|
62 |
echo "" |
|
63 |
echo "ERROR: $TARGET_GVSIG_FOLDER is not a gvSIG installation folder" |
|
64 |
exit 1; |
|
65 |
fi; |
|
66 |
|
|
67 |
if [ ! -d "$TARGET_GVSIG_FOLDER/gvSIG" ] ; then |
|
68 |
usage |
|
69 |
echo "" |
|
70 |
echo "ERROR: $TARGET_GVSIG_FOLDER is not a gvSIG installation folder" |
|
71 |
exit 1; |
|
72 |
fi; |
|
73 |
|
|
74 |
if [ ! -f "$TARGET_GVSIG_FOLDER/gvSIG.sh" ] ; then |
|
75 |
usage |
|
76 |
echo "" |
|
77 |
echo "ERROR: $TARGET_GVSIG_FOLDER is not a gvSIG installation folder" |
|
78 |
exit 1; |
|
79 |
fi; |
|
80 |
|
|
81 |
if [ ! -d "$TARGET_GVSIG_FOLDER/gvSIG/extensiones" ] ; then |
|
82 |
usage |
|
83 |
echo "" |
|
84 |
echo "ERROR: $TARGET_GVSIG_FOLDER is not a gvSIG installation folder" |
|
85 |
exit 1; |
|
86 |
fi; |
|
87 |
|
|
88 |
if [ "x$RESOURCE_FOLDER" == "x" ] ; then |
|
89 |
usage |
|
90 |
echo "" |
|
91 |
echo "ERROR: Missing -r option" |
|
92 |
exit 1; |
|
93 |
fi; |
|
94 |
|
|
95 |
if [ ! -d "$RESOURCE_FOLDER" ] ; then |
|
96 |
usage |
|
97 |
echo "" |
|
98 |
echo "ERROR: $RESOURCE_FOLDER is not a folder" |
|
99 |
exit 1; |
|
100 |
fi; |
|
101 |
|
|
102 |
if [ "x$WORK_FOLDER" == "x" ] ; then |
|
103 |
usage |
|
104 |
echo "" |
|
105 |
echo "ERROR: Missing -w option" |
|
106 |
exit 1; |
|
107 |
fi; |
|
108 |
|
|
109 |
if [ ! -d "$WORK_FOLDER" ] ; then |
|
110 |
usage |
|
111 |
echo "" |
|
112 |
echo "ERROR: $WORK_FOLDER is not a folder" |
|
113 |
exit 1; |
|
114 |
fi; |
|
115 |
|
|
116 |
if [ "x$ACTIVITY_FOLDER" == "x" ] ; then |
|
117 |
usage |
|
118 |
echo "" |
|
119 |
echo "ERROR: Missing -a option" |
|
120 |
exit 1; |
|
121 |
fi; |
|
122 |
|
|
123 |
if [ ! -d "$ACTIVITY_FOLDER" ] ; then |
|
124 |
usage |
|
125 |
echo "" |
|
126 |
echo "ERROR: $ACTIVITY_FOLDER is not a folder" |
|
127 |
exit 1; |
|
128 |
fi; |
|
129 |
|
|
130 |
|
|
131 |
echo "Removing unused files..." |
|
132 |
rm "$TARGET_GVSIG_FOLDER/uninstall" |
|
133 |
rm "$TARGET_GVSIG_FOLDER/README.txt" |
|
134 |
rm "$TARGET_GVSIG_FOLDER/LEEME.txt" |
|
135 |
if [ ! -n `ls "$TARGET_GVSIG_FOLDER/install/"` ] ; then |
|
136 |
rm $TARGET_GVSIG_FOLDER/install/* |
|
137 |
fi |
|
138 |
|
|
139 |
echo "Adding andami-config.xml..." |
|
140 |
cp "$RESOURCE_FOLDER/andami-config.xml" "$ACTIVITY_FOLDER/post-install/user-gvsig-home" |
|
141 |
|
|
142 |
echo "Fixing gvSIG theme files..." |
|
143 |
cp "$RESOURCE_FOLDER/one_pixel.png" "$TARGET_GVSIG_FOLDER/gvSIG/extensiones/org.gvsig.app/theme/gvsig-proj-black-wallpaper.png" |
|
144 |
|
|
145 |
echo "Adjusting removing JAVA_HOME from gvSIG.sh (will be initialized at activity startup)..." |
|
146 |
replaceInFile "$TARGET_GVSIG_FOLDER/gvSIG.sh" "export[ ]JAVA_HOME=.*$" "#export JAVA_HOME=INITIALIZED BY ACTIVITY" |
|
147 |
|
|
148 |
echo "Adjusting JVM memory settings..." |
|
149 |
if [ -n "$GVSIG_INITIAL_MEM" ] ; then |
|
150 |
echo " GVSIG_INITIAL_MEM=$GVSIG_INITIAL_MEM" |
|
151 |
replaceInFile "$TARGET_GVSIG_FOLDER/gvSIG.sh" "GVSIG_INITIAL_MEM=[0-9]*[MG]" "GVSIG_INITIAL_MEM=$GVSIG_INITIAL_MEM" |
|
152 |
fi |
|
153 |
if [ -n "$GVSIG_MAX_MEM" ] ; then |
|
154 |
echo " GVSIG_MAX_MEM=$GVSIG_MAX_MEM" |
|
155 |
replaceInFile "$TARGET_GVSIG_FOLDER/gvSIG.sh" "GVSIG_MAX_MEM=[0-9]*[MG]" "GVSIG_MAX_MEM=$GVSIG_MAX_MEM" |
|
156 |
fi |
|
157 |
if [ -n "$GVSIG_MAX_PERM_SIZE" ] ; then |
|
158 |
echo " GVSIG_MAX_PERM_SIZE=$GVSIG_MAX_PERM_SIZE" |
|
159 |
replaceInFile "$TARGET_GVSIG_FOLDER/gvSIG.sh" "GVSIG_MAX_PERM_SIZE=[0-9]*[MG]" "GVSIG_MAX_PERM_SIZE=$GVSIG_MAX_PERM_SIZE" |
|
160 |
fi |
|
161 |
|
|
162 |
if [ -d "$TARGET_GVSIG_FOLDER/gvSIG/extensiones/org.gvsig.educa.batovi.app.skin" ] ; then |
|
163 |
echo "Adding plugin-persistence to set Skin to Batovi.app.skin..." |
|
164 |
cp "$RESOURCE_FOLDER/plugins-persistence-2_0.xml" "$ACTIVITY_FOLDER/post-install/user-gvsig-home" |
|
165 |
fi |
|
166 |
|
|
167 |
GDAL_FILES=`ls $TARGET_GVSIG_FOLDER/native/libgdal.so* 2> /dev/null` |
|
168 |
if [ -n "$GDAL_FILES" ] ; then |
|
169 |
echo "Removing gdal symbolic links" |
|
170 |
rm $TARGET_GVSIG_FOLDER/native/libgdal.so $TARGET_GVSIG_FOLDER/native/libgdal.so.1 |
|
171 |
|
|
172 |
echo "Copying post-install script to fix gdal symbolic links" |
|
173 |
cp "$RESOURCE_FOLDER/fix_gdal_links.sh" "$ACTIVITY_FOLDER/post-install/scripts/" |
|
174 |
fi |
|
175 |
|
|
176 |
#echo "Resizing png images (x2)" |
|
177 |
#find "$TARGET_GVSIG_FOLDER/gvSIG/extensiones" -name '*.png' -print -exec mogrify -resize 200% {} ';' |
|
178 |
|
|
179 |
echo "Resizing png images..." |
|
180 |
images=`find "$TARGET_GVSIG_FOLDER/gvSIG/extensiones" -name '*.png'` |
|
181 |
for image in $images |
|
182 |
do |
|
183 |
img_size=`file $image | grep " [0-9]* x [0-9]*" -o | grep -o "[0-9]*"` |
|
184 |
ratio="" |
|
185 |
for aSize in $img_size |
|
186 |
do |
|
187 |
if [ $aSize -le 32 ] ; then |
|
188 |
ratio="200%" |
|
189 |
break |
|
190 |
fi |
|
191 |
if [ $aSize -le 64 ] ; then |
|
192 |
ratio="150%" |
|
193 |
break |
|
194 |
fi |
|
195 |
if [ $aSize -le 128 ] ; then |
|
196 |
ratio="125%" |
|
197 |
break |
|
198 |
fi |
|
199 |
done |
|
200 |
if [ -n "$ratio" ] ; then |
|
201 |
image_caption=`echo "$image" | sed "s/.*[/]gvSIG[/]extensiones[/]//"` |
|
202 |
echo "$image_caption [ $ratio ]" |
|
203 |
mogrify -resize "$ratio" "$image" |
|
204 |
fi |
|
205 |
done |
|
206 |
|
|
207 |
|
|
208 |
|
|
0 | 209 |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/resources/andami-config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<andami-config locale-language="es" locale-country="" locale-variant="" lookAndFeel="com.sun.java.swing.plaf.gtk.GTKLookAndFeel" pluginsDirectory="gvSIG/extensiones"> |
|
3 |
<andami update="true"/> |
|
4 |
<plugin name="org.gvsig.app" update="false"/> |
|
5 |
</andami-config> |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/resources/plugins-persistence-2_0.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xml-tag xmlns="http://www.gvsig.gva.es"> |
|
3 |
<xml-tag> |
|
4 |
<property key="Skin-Selected" value="org.gvsig.educa.batovi.app.skin.BatoviSkin" /> |
|
5 |
<property key="DefaultBrowser" value="Firefox" /> |
|
6 |
<property key="com.iver.andami.pluginName" value="org.gvsig.coreplugin" /> |
|
7 |
</xml-tag> |
|
8 |
<xml-tag> |
|
9 |
<property key="MDIFrameSize" value="1200 ,900" /> |
|
10 |
<property key="MDIFramePos" value="0 ,0" /> |
|
11 |
<property key="MDIFrameState" value="6" /> |
|
12 |
<property key="com.iver.andami.pluginName" value="Andami.Launcher" /> |
|
13 |
</xml-tag> |
|
14 |
</xml-tag> |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/clean.sh | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
|
|
3 |
SCRIPT_FILE=`readlink -f $0` |
|
4 |
SCRIPT_PATH=`dirname $0` |
|
5 |
WORK_FOLDER="$SCRIPT_PATH/target" |
|
6 |
|
|
7 |
# clean work folder (if any) |
|
8 |
if [ -e "$WORK_FOLDER" ] ; then |
|
9 |
echo "Cleaning work folder..." |
|
10 |
rm -r "$WORK_FOLDER" |
|
11 |
fi |
|
12 |
|
|
0 | 13 |
org.gvsig.educa.batovi/branches/1.0/org.gvsig.educa.batovi/org.gvsig.educa.batovi.activity/Sugerencias_de_configuracion.rst | ||
---|---|---|
1 |
=============== |
|
2 |
gvSIG Educa |
|
3 |
=============== |
|
4 |
|
|
5 |
------------------------------------------------------------------------ |
|
6 |
Adaptación de gvSIG con fines educativos: Sugerencias de configuración |
|
7 |
------------------------------------------------------------------------ |
|
8 |
|
|
9 |
|
|
10 |
Preparar una actividad para el OLPC |
|
11 |
==================================== |
|
12 |
|
|
13 |
Para preparar una actividad (un fichero ``.xo``) hay que seguir los pasos del fichero *LEEME.rst*. En uno hya que prepara una instalación de gvSIG v2.0. |
|
14 |
|
|
15 |
Pero, ¿Cómo debe de estar la instalación?. En este documento sugerimos los paquetes a incluir y los pasos adicionales necesarios. |
|
16 |
|
|
17 |
Los pasos son: |
|
18 |
|
|
19 |
# `Descargar el instalador`_ de gvSIG |
|
20 |
# `Instalar los add-ons`_ a incluir |
|
21 |
# `Otras configuraciones`_ |
|
22 |
|
|
23 |
Descargar el instalador |
|
24 |
======================== |
|
25 |
|
|
26 |
Descargar de la página de descargas oficial la última versión de gvSIG v2.0 para linux que esté disponible, dar permisos de ejecución al fichero y arrancar la instalación. |
|
27 |
|
|
28 |
Instalar los add-ons |
|
29 |
===================== |
|
30 |
|
|
31 |
Seguir las acciones del asistente hasta alcanzar el instalador de complementos. |
|
32 |
|
|
33 |
En esta sección haremos sugerencias de paquetes dependiendo de: |
|
34 |
|
|
35 |
* `Configuración Básica`_ Para equipos escasos de recurso, solo visionado de cartografía. |
|
36 |
* `Configuración Estándar`_ Configuración estándar para visionado de cartografía. |
|
37 |
|
|
38 |
* `Configuración con edición`_ Configuración que permita el visionado y creación de cartografía y mapas temáticos. |
|
39 |
|
|
40 |
Configuración Básica |
|
41 |
---------------------- |
|
42 |
|
|
43 |
Una configuración mínima que permita visualizar cartografía y mapas temáticos con capas vectoriales sería: |
|
44 |
|
|
45 |
* Add-on manager |
|
46 |
* Application gvSIG |
|
47 |
* Default icon set |
|
48 |
* Formats: GML/KML |
|
49 |
* Formats: WFS |
|
50 |
* Internationalization support |
|
51 |
* Online basic help |
|
52 |
* Skin management framework |
|
53 |
* Thematic Maps viewer document |
|
54 |
* Tools: Center view to point |
|
55 |
* Tools: Hyperlink |
|
56 |
* Tools: Locator by attribute |
|
57 |
* |
|
58 |
|
|
59 |
|
|
60 |
Esta configuración, junto al uso del *profile* ``minimum``, podría servir para equipos de unos 512Mb de RAM. Requerirá en disco sobre 40Mb (más los mapas temáticos que se incluyan). |
|
61 |
|
|
62 |
|
|
63 |
Configuración Estándar |
|
64 |
----------------------- |
|
65 |
|
|
66 |
Una configuración estándar que permita visualizar cartografía y mapas temáticos con capas vectoriales y raster, además de algunas utilidades (como generar mapas) sería: |
|
67 |
|
|
68 |
* Add-on manager |
|
69 |
* Application gvSIG |
|
70 |
* Default icon set |
|
71 |
* Document: Layout |
|
72 |
* Document: Table |
|
73 |
* Formats: Gdal |
|
74 |
* Formats: GML/KML |
|
75 |
* Formats: WFS |
|
76 |
* Internationalization support |
|
77 |
* Online basic help |
|
78 |
* Skin management framework |
|
79 |
* Thematic Maps viewer document |
|
80 |
* Tools: Center view to point |
|
81 |
* Tools: Geometry editing |
|
82 |
* Tools: Hyperlink |
|
83 |
* Tools: Locator by attribute |
|
84 |
* Tools: New Layer |
|
85 |
* Transformation: Event theme |
|
86 |
* Transformation: Join |
|
87 |
* Transforms framework |
|
88 |
* Web Catalog Service support |
|
89 |
* Web Gazetteer Service client |
|
90 |
* y el *Soporte Raster* (ver `Instalar soporte Raster`_ ) |
|
91 |
|
|
92 |
Esta instalación ocupará en disco unos 120Mb (más los mapas temáticos que se incluyan). |
|
93 |
|
|
94 |
.. admonition:: Recordar |
|
95 |
|
|
96 |
Despues de instalar cualquier paquete es necesario reiniciar gvSIG (cerrar **y volver a arrancar**) |
|
97 |
|
|
98 |
|
|
99 |
Configuración con edición |
|
100 |
---------------------------------- |
|
101 |
|
|
102 |
Una configuración estándar que permita visualizar y preparar cartografía y mapas temáticos con capas vectoriales y raster, además de algunas utilidades (como generar mapas) sería: |
|
103 |
|
|
104 |
* Add-on manager |
|
105 |
* Application gvSIG |
|
106 |
* Database conectors |
|
107 |
* Default icon set |
|
108 |
* Document: Layout |
|
109 |
* Document: Table |
|
110 |
* Export framework |
|
111 |
* Formats: Gdal |
|
112 |
* Formats: GML/KML |
|
113 |
* Formats: WFS |
|
114 |
* Internationalization support |
|
115 |
* Online basic help |
|
116 |
* Skin management framework |
|
117 |
* Thematic Maps generator |
|
118 |
* Thematic Maps viewer document |
|
119 |
* Tools: Center view to point |
|
120 |
* Tools: Export to annotation |
|
121 |
* Tools: Field calculator |
|
122 |
* Tools: Geometry editing |
|
123 |
* Tools: Geometry measurement |
|
124 |
* Tools: Hyperlink |
|
125 |
* Tools: Import marker symbols tool |
|
126 |
* Tools: Install marker symbols tool |
|
127 |
* Tools: Locator by attribute |
|
128 |
* Tools: New layer |
|
129 |
* Tools: Selection tools |
Also available in: Unified diff