Revision 43332

View differences:

tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3

  
4
    <modelVersion>4.0.0</modelVersion>
5
    <artifactId>org.gvsig.desktop.framework</artifactId>
6
    <packaging>pom</packaging>
7
    <name>${project.artifactId}</name>
8
    <parent>
9
        <groupId>org.gvsig</groupId>
10
        <artifactId>org.gvsig.desktop</artifactId>
11
        <version>2.0.190</version>
12
    </parent>
13

  
14
    <modules>
15
        <module>org.gvsig.andami</module>
16
        <module>org.gvsig.andami.updater</module>
17
    </modules>
18

  
19
    <description>Contains the launcher and plugin framework used in gvSIG.</description>
20
</project>
21

  
0 22

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/test/java/org/gvsig/andami/AllTests.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.andami;
25

  
26
import junit.framework.Test;
27
import junit.framework.TestSuite;
28

  
29
public class AllTests {
30

  
31
	public static Test suite() {
32
		TestSuite suite = new TestSuite("Test for com.iver.andami");
33
		//$JUnit-BEGIN$
34

  
35
		//$JUnit-END$
36
		return suite;
37
	}
38

  
39
}
0 40

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/andami-config.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

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

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

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<andami-config locale-language="es" locale-country="ES" locale-variant="es" pluginsDirectory="c:\tirar">
27
	<andami update="yes"/>
28
	<plugin name="com.iver.cit.gvsig" update="yes"/>
29
	<plugin name="com.iver.core" update="no"/>
30
	<andami-options>
31
	  <option name="CustomOption1" value="customValue1"/>
32
	  <icon-theme name="DefaultTheme" resource="iconThemes/default" basedir="iconThemes" />
33
	</andami-options>
34
</andami-config>
0 35

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/plugin-persistence.xsd
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

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

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

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27

  
28
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
29
  <xs:element name="bookmark">
30
    <xs:complexType>
31
      <xs:sequence>
32
        <xs:element ref="xml-entity" />
33
      </xs:sequence>
34
      <xs:attribute name="text" type="xs:string" use="required" />
35
    </xs:complexType>
36
  </xs:element>
37

  
38
  <xs:element name="bookmarks">
39
    <xs:complexType>
40
      <xs:sequence>
41
        <xs:element ref="bookmark" />
42
      </xs:sequence>
43
    </xs:complexType>
44
  </xs:element>
45

  
46
  <xs:element name="plugin">
47
    <xs:complexType>
48
      <xs:sequence>
49
        <xs:element ref="xml-entity" />
50
        <xs:element ref="bookmarks" />
51
        <xs:element ref="windows" />
52
      </xs:sequence>
53
      <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
54
      <xs:attribute name="lastUpdate" type="xs:NMTOKEN" use="required" />
55
    </xs:complexType>
56
  </xs:element>
57

  
58
  <xs:element name="plugins-status">
59
    <xs:complexType>
60
      <xs:sequence>
61
        <xs:element ref="plugin" />
62
      </xs:sequence>
63
    </xs:complexType>
64
  </xs:element>
65

  
66
  <xs:element name="property">
67
    <xs:complexType>
68
      <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
69
      <xs:attribute name="value" type="xs:string" use="required" />
70
    </xs:complexType>
71
  </xs:element>
72

  
73
  <xs:element name="window">
74
    <xs:complexType>
75
      <xs:attribute name="rectangle" type="xs:string" use="required" />
76
      <xs:attribute name="id" type="xs:NMTOKEN" use="required" />
77
    </xs:complexType>
78
  </xs:element>
79

  
80
  <xs:element name="windows">
81
    <xs:complexType>
82
      <xs:sequence>
83
        <xs:element ref="window" maxOccurs="unbounded" />
84
      </xs:sequence>
85
    </xs:complexType>
86
  </xs:element>
87

  
88
  <xs:element name="xml-entity">
89
    <xs:complexType>
90
      <xs:sequence>
91
        <xs:element ref="property" maxOccurs="unbounded" />
92
      </xs:sequence>
93
    </xs:complexType>
94
  </xs:element>
95

  
96
</xs:schema>
0 97

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/plugin-config.xsd
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

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

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

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27

  
28
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
29

  
30
<!--
31
	action-tool => Button which fires the execution of this extension
32

  
33
	action-command	Text to identify different action-tools inside a plugin
34
	text		Button's text.
35
	name			Button name (to retrive it)
36
	icon		Tool icon
37
	last		If true, a separator is added.
38
	tooltip		Tooltip
39
	enable-text Text that describes the necessary conditions to enable a tool
40
	position    The position inside the toolbar
41
-->
42
  <xs:element name="action-tool">
43
    <xs:complexType>
44
      <xs:attribute name="text" type="xs:string" use="optional" />
45
      <xs:attribute name="name" type="xs:string" use="optional" />
46
      <xs:attribute name="action-command" type="xs:string" use="optional" />
47
      <xs:attribute name="icon" type="xs:string" use="required" />
48
      <xs:attribute name="last" type="xs:boolean" use="optional" />
49
      <xs:attribute name="tooltip" type="xs:string" use="optional" />
50
      <xs:attribute name="enable-text" type="xs:string" use="optional" />
51
      <xs:attribute name="position" type="xs:int" use="optional" />
52
    </xs:complexType>
53
  </xs:element>
54

  
55
<!--
56
	Plugin dependencies from other plugins
57
	plugin-name		Name of the other plugin (name of the directory.)
58
					Example; com.iver.cig.gvsig
59
-->
60
  <xs:element name="depends">
61
    <xs:complexType>
62
      <xs:attribute name="plugin-name" type="xs:string" use="required" />
63
    </xs:complexType>
64
  </xs:element>
65

  
66
<!--
67
	Extension to Andami
68

  
69
	class-name		Class that handles the extension
70
	menu			Menus installed by the extension
71
	tool-bar		Toolbar installed by this plugin
72
	priority	Orden en el que se procesaran las extensiones durante la
73
				carga de Andami. Se inicializan primero y se instalan sus controles
74
				en las barras de tareas primero. La prioridad es
75
				mayor cuanto más grande es el valor del atributo
76
-->
77

  
78

  
79
	<xs:element name="extension" type="extension-type"/>
80
	<xs:complexType name="extension-type">
81
		<xs:complexContent>
82
		<xs:extension base="skin-extension-type">
83
	    <xs:attribute name="priority" type="xs:int" use="optional" />
84
		<xs:attribute name="active" type="xs:boolean" use="optional" />
85
		<xs:attribute name="description" type="xs:string" use="optional" />
86
		<xs:attribute name="alwaysvisible" type="xs:boolean" use="optional" />
87
	  </xs:extension>
88
	</xs:complexContent>
89
  </xs:complexType>
90

  
91
<!--
92
	Extension's section of the plugin
93
-->
94
  <xs:element name="extensions">
95
    <xs:complexType>
96
      <xs:sequence>
97
        <xs:element ref="extension" maxOccurs="unbounded" />
98
        <xs:element ref="skin-extension" minOccurs="0" maxOccurs="unbounded" />
99
      </xs:sequence>
100

  
101
    </xs:complexType>
102
  </xs:element>
103

  
104
<!--
105
	Main application's Icon
106

  
107
	text 	Title of main window.
108
	src	    path to an icon file
109
-->
110
  <xs:element name="icon">
111
    <xs:complexType>
112
      <xs:attribute name="text" type="xs:string" use="required" />
113
      <xs:attribute name="src" type="xs:string" use="required" />
114
    </xs:complexType>
115
  </xs:element>
116

  
117
<!--
118
	label => In this element you can put the mesages that must appear in the
119
			status bar
120

  
121
	size	Size in pixels of the status label
122
	id		Id assigned to this label
123
-->
124
  <xs:element name="label">
125
    <xs:complexType>
126
      <xs:attribute name="size" type="xs:int" use="required" />
127
      <xs:attribute name="id" type="xs:NMTOKEN" use="required" />
128
    </xs:complexType>
129
  </xs:element>
130

  
131
<!--
132
	Group of labels on the status bar. The order from up to down in xml file
133
	stands for the order right to left in Andami's principal frame.
134

  
135
	class-name	When the active view is an instance of class-name, this
136
			labelSet will be shown.
137
-->
138
  <xs:element name="label-set">
139
    <xs:complexType>
140
      <xs:sequence>
141
        <xs:element ref="label" maxOccurs="unbounded" />
142
      </xs:sequence>
143
      <xs:attribute name="class-name" type="xs:NMTOKEN" use="required" />
144
    </xs:complexType>
145
  </xs:element>
146

  
147
<!--
148
	jars that are used by this plugin
149
	library-dir     Relative path where the jar files are. Usually ./ or ./lib
150
-->
151
  <xs:element name="libraries">
152
    <xs:complexType>
153
      <xs:attribute name="library-dir" type="xs:string" use="required" />
154
    </xs:complexType>
155
  </xs:element>
156

  
157
<!--
158
	action-command	Text to identify different menus inside the same plugin
159

  
160
	key		    Abreviatura de teclado del menu
161
	icon		Menu Icon
162
	enable-text Texto con la descripción de las condiciones que se tienen que dar
163
				para que se visualice la opción
164
	tooltip		Tooltip
165
	mnemonic	Accelerator key
166
	text 		Menu Text
167
	is_separator true means to add a JSeparator to the parent menu defined by text
168
-->
169
  <xs:element name="menu">
170
    <xs:complexType>
171
      <xs:attribute name="action-command" type="xs:string" use="optional" />
172
      <xs:attribute name="key" type="xs:string" use="optional" />
173
      <xs:attribute name="icon" type="xs:string" use="optional" />
174
      <xs:attribute name="tooltip" type="xs:string" use="optional" />
175
      <xs:attribute name="enable-text" type="xs:string" use="optional" />
176
      <xs:attribute name="mnemonic" type="xs:string" use="optional" />
177
      <xs:attribute name="text" type="xs:string" use="required" />
178
      <xs:attribute name="position" type="xs:int" use="optional" />
179
	  <xs:attribute name="is_separator" type="xs:boolean" use="optional" />
180
    </xs:complexType>
181
  </xs:element>
182

  
183
<!--
184
	XML File Root
185

  
186
	name		Plugin's Name
187
	updateURL	URL of zip-file with a new plugin's version.
188
-->
189
  <xs:element name="plugin-config">
190
    <xs:complexType>
191
      <xs:sequence>
192
        <xs:element ref="icon" minOccurs="0"/>
193
        <xs:element ref="depends" minOccurs="0" maxOccurs="unbounded"/>
194
        <xs:element ref="resourceBundle" minOccurs="0"/>
195
        <xs:element ref="label-set" minOccurs="0" maxOccurs="unbounded"/>
196
        <xs:element ref="libraries"/>
197
        <xs:element ref="popup-menus" minOccurs="0"/>
198
        <xs:element ref="extensions" />
199
      </xs:sequence>
200
      <xs:attribute name="update-url" type="xs:string" use="optional" />
201
    </xs:complexType>
202
  </xs:element>
203

  
204
<!--
205
	Popup menu by the plugin. The plugin must register itself as a
206
	popup-menu listener.
207
-->
208
  <xs:element name="popup-menu">
209
    <xs:complexType>
210
      <xs:sequence>
211
        <xs:element ref="menu" maxOccurs="unbounded" />
212
      </xs:sequence>
213
      <xs:attribute name="name" type="xs:string" use="required" />
214
    </xs:complexType>
215
  </xs:element>
216

  
217
<!--
218
	Section to define popup-menus
219
-->
220
  <xs:element name="popup-menus">
221
    <xs:complexType>
222
      <xs:sequence>
223
        <xs:element ref="popup-menu" maxOccurs="unbounded" />
224
      </xs:sequence>
225
    </xs:complexType>
226
  </xs:element>
227

  
228
<!--
229
	Properties file with translations used by the tool.
230

  
231
	name	Name of resource bundle file
232
-->
233
  <xs:element name="resourceBundle">
234
    <xs:complexType>
235
      <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
236
    </xs:complexType>
237
  </xs:element>
238

  
239
<!--
240
	tool button that remains pressed when it is selected.
241

  
242
	text		Button's text.
243
	name			Button name (to retrive it)
244
	action-command	Text to identify the different action-tools inside a plugin.
245

  
246
	group		Group where the selectable-tool belongs. It will be only one selectable-tool
247
				selected inside the group.
248
	is-default  If true, the selectable-tool will be selected by default.
249
	icon		Icon to use.
250
	last		If true, after the tool it will appears a separator.
251
	tooltip		Tooltip
252
	position	The position inside the toolbar
253
-->
254
  <xs:element name="selectable-tool">
255
    <xs:complexType>
256
      <xs:attribute name="text" type="xs:string" use="optional" />
257
      <xs:attribute name="name" type="xs:string" use="optional" />
258
      <xs:attribute name="action-command" type="xs:string" use="optional" />
259
      <xs:attribute name="is-default" type="xs:boolean" use="optional" />
260
      <xs:attribute name="last" type="xs:boolean" use="optional" />
261
      <xs:attribute name="icon" type="xs:string" use="required" />
262
      <xs:attribute name="tooltip" type="xs:string" use="optional" />
263
      <xs:attribute name="enable-text" type="xs:string" use="optional" />
264
      <xs:attribute name="group" type="xs:string" use="optional" default="unico" />
265
      <xs:attribute name="position" type="xs:int" use="optional" />
266
    </xs:complexType>
267
  </xs:element>
268

  
269
<!--
270
	Extension plugin to andami
271

  
272
	class-name		Class which handles the plugin
273
	menu			Menus installed by the plugin
274
	tool-bar		Toolbar of the plugin. If it doesn't exist, it will be created.
275
	combo-button	combo-button to be added to the status bar
276
	combo-scale		combo-scale to be added to the status bar
277
-->
278
  <xs:element name="skin-extension" type="skin-extension-type"/>
279

  
280
  <xs:complexType name="skin-extension-type">
281
    <xs:sequence>
282
      <xs:element ref="menu" minOccurs="0" maxOccurs="unbounded" />
283
      <xs:element ref="tool-bar" minOccurs="0" maxOccurs="unbounded" />
284
      <xs:element ref="combo-button" minOccurs="0" maxOccurs="unbounded" />
285
      <xs:element ref="combo-scale" minOccurs="0" maxOccurs="unbounded" />
286
    </xs:sequence>
287
    <xs:attribute name="class-name" type="xs:NMTOKEN" use="required" />
288
  </xs:complexType>
289

  
290
<!--
291
	tool-bar => Application's main toolbar
292

  
293
	name	Toolbar name. This way, other plugins can refer to this toolbar
294
			and add tools to this toolbar.
295
	position	Used to order the toolbars. Toolbars with higher position are
296
				placed on the right side, toolbars with lower position are
297
				placed on the left. If it's omitted, the default value is 50.
298

  
299
	combo-button	combo-button to be added to the toolbar
300
	commbo-scale	combo-scale to be added to the toolbar
301
	visible			(Not supported yet). Determines whether the toolbar is
302
					visible by default.	In the future it will be possible to
303
					hide/show toolbars, and this attribute will set its	initial
304
					status.	Note: if the toolBar is defined in several
305
					extensions, the	extension with highest priority will decide
306
					the toolbar's visibility.
307
-->
308
  <xs:element name="tool-bar">
309
    <xs:complexType>
310
      <xs:sequence>
311
        <xs:element ref="action-tool" minOccurs="0" maxOccurs="unbounded" />
312
        <xs:element ref="selectable-tool" minOccurs="0" maxOccurs="unbounded" />
313
        <xs:element ref="combo-button" minOccurs="0" maxOccurs="unbounded" />
314
        <xs:element ref="combo-scale" minOccurs="0" maxOccurs="unbounded" />
315
      </xs:sequence>
316
      <xs:attribute name="name" type="xs:string" use="required" />
317
      <xs:attribute name="position" type="xs:int" use="optional" default="50" />
318
      <xs:attribute name="is-visible" type="xs:boolean" use="optional" default="true" />
319
    </xs:complexType>
320
  </xs:element>
321

  
322
 <!--
323
 	combo-scale => A combo box with numeric values, and editable.
324

  
325
 	name		A name to identify the combo-scale.
326

  
327
 	label		The label to be displayed on the left of the combo
328

  
329
 	elements    A semicolon separated list of the combo box' elements
330

  
331
 	value		The initial selected value. If ommited, the first element is selected
332

  
333
	action-command	Text to identify the different action-tools inside a plugin.
334
 -->
335
  <xs:element name="combo-scale">
336
  	<xs:complexType>
337
  		<xs:attribute name="name" type="xs:string" use="required" />
338
  		<xs:attribute name="label" type="xs:string" use="optional" />
339
  		<xs:attribute name="elements" use="required" />
340
  		<xs:attribute name="value" use="optional" />
341
  		<xs:attribute name="action-command" type="xs:string" use="required" />
342
  		<xs:attribute name="position" use="optional" />
343
  	</xs:complexType>
344
  </xs:element>
345
<!--
346
	combo-button => A combo button (drop-down list of selectable buttons).
347

  
348
	name		A name to identify the combo-button
349

  
350
-->
351
  <xs:element name="combo-button">
352
  	<xs:complexType>
353
  		<xs:sequence>
354
        	<xs:element ref="combo-button-element" minOccurs="0" maxOccurs="unbounded" />
355
      	</xs:sequence>
356
  		<xs:attribute name="name" type="xs:string" use="required" />
357
  		<xs:attribute name="position" use="optional" />
358
  	</xs:complexType>
359
  </xs:element>
360

  
361
<!--
362
	combo-button-element => An entry (icon) on the combo-button list
363

  
364
	action-command	Text to identify the different action-tools inside a plugin.
365

  
366
	icon		Icon to use.
367
-->
368
	<xs:element name="combo-button-element">
369
		<xs:complexType>
370
			<xs:attribute name="icon" type="xs:string" use="required"/>
371
			<xs:attribute name="action-command"  type="xs:string"  use="required"/>
372
		</xs:complexType>
373
	</xs:element>
374

  
375
</xs:schema>
0 376

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/sample-plugins-persistence.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

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

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

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<plugins-status>
28
	<plugin name="gvsig" lastUpdate="237628686">
29
		<xml-entity name="config">
30
			<property name="dataDirectory" value="c:\"/>
31
			<xml-entity>
32
				<property name="dataDirectory" value="c:\"/>
33
				<property name="dataDirectory" value="c:\"/>
34
				<property name="dataDirectory" value="c:\"/>
35
			</xml-entity>
36
		</xml-entity>
37
		<bookmarks>
38
			<bookmark text="Recientes/raster">
39
				<xml-entity>
40
					<property name="projection" value="EPSG:3403"/>
41
					<property name="boundinBox" value="12,12,115,115"/>
42
				</xml-entity>
43
			</bookmark>
44
		</bookmarks>
45
		<windows>
46
			<window id="0" rectangle="0,0,150,150"/>
47
			<window id="2" rectangle="50,50,150,150"/>
48
			<window id="8" rectangle="100,100,150,150"/>
49
			<window id="12" rectangle="150,150,150,150"/>
50
		</windows>
51
	</plugin>
52
	<tool-bars>
53
		<tool-bar name="gvsig.herramientas" x-position="0" y-position="1"/>
54
		<tool-bar name="gvsig.herramientas" x-position="0" y-position="0"/>
55
	</tool-bars>
56
</plugins-status>
0 57

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/sample-config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

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

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

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<plugin-config>
28
	<icon src="images/logoGVA.gif" text="gvSIG"/>
29
	<resourceBundle name="text"/>
30
	<import plugin-name="com.iver.cit.gvsig" />
31
	<labelSet class="com.iver.cit.gvsig.gui.View">
32
		<label id="1" size="100"/>
33
		<label id="2" size="230"/>
34
	</labelSet>
35
	<libraries>
36
		<library file="com.iver.cit.gvsig.jar"/>
37
		<library file="wmsclient.jar"/>	
38
	</libraries>
39
	<extensions>
40
		<extension>
41
			<class name="com.iver.cit.gvsig.ProjectExtension"/>
42
			<menu text="Archivo/nuevo_proyecto" 
43
				key="n" mnemonic="n" 
44
				tooltip="nuevo_tooltip"
45
				action-command="NUEVO" icon="images/new.png"/>
46
			<menu text="Archivo/abrir_proyecto" 
47
				key="a" mnemonic="a" 
48
				tooltip="abrir_tooltip"
49
				action-command="ABRIR" icon="images/open.png"/>
50
			<menu text="Archivo/guardar_proyecto" 
51
				key="g" mnemonic="g" 
52
				tooltip="guardar_tooltip"
53
				action-command="GUARDAR" icon="images/save.png"/>
54

  
55
			<toolBar>
56
				<tool icon="images/new.png" tooltip="nuevo_tooltip"
57
					action-command="NUEVO"/>
58
				<tool icon="images/open.png" tooltip="abrir_tooltip"
59
					action-command="ABRIR"/>
60
				<tool icon="images/save.png" tooltip="guardar_tooltip"
61
					action-command="GUARDAR"/>
62

  
63
				<!-- these will be added to the containing toolbar -->
64
				<combo-scale
65
					name="JPEG Quality"
66
					elements="15;30;60;70;80;90;100"
67
					value="80"
68
					action-command="JPEG_QUALITY" />
69

  
70
				<combo-button
71
					name="Copy/paste tools">
72
				  <combo-button-element icon="images/scissor.png" action-command="CUT" />
73
				  <combo-button-element icon="images/paste.png" action-command="PASTE" />
74
				  <combo-button-element icon="images/copy.png" action-command="COPY" />
75
				</combo-button>
76
			</toolBar>
77

  
78
		</extension>
79

  
80
		<extension>
81
			<class name="com.iver.cit.gvsig.ZoomPrev"/>
82
			<menu text="Vista/Zoom_Previo" icon="images/ZoomPrevio.png"/>
83
			<tool-bar name="Herramientas">
84
				<action-tool icon="images/ZoomPrevio.png" action-command="ZOOM_PREV" tooltip="Zoom_Previo" position="11"/>
85
			</tool-bar>
86
			
87
			<!-- these will be added to the status-bar (because they are not contained in any toolbar) -->					
88
			<combo-scale 
89
		  		name="Scale"
90
		  		label="Scale:"
91
		  		elements="1000;2000;5000;10000;25000;50000;100000;200000;500000;1000000;2000000;5000000"
92
	  			value="10000"
93
	  			action-command="CHANGE_SCALE" />
94

  
95
			<combo-button
96
				name="Tool Mode">
97
			  <combo-button-element icon="images/once.png" action-command="USE_ONCE" />
98
			  <combo-button-element icon="images/sticky-tool.png" action-command="UNTIL_CHANGED" />
99
			</combo-button>
100
		</extension>
101
		<extension processing-position="2">
102
			<class name="com.iver.cit.gvsig.ViewControls"/>
103
			<menus>
104
				<menu text="Vista/Zoom_Completo" action-command="FULL" icon="images/MapContents.png" tooltip="Zoom completo a la v?sta"/>
105
				<menu text="Vista/Zoom_Select" action-command="ZOOM_SELECT" icon="image/Select.png"/>
106
				<menu text="Vista/Encuadre" action-command="ENCUADRE" icon="images/encuadre.png"/>
107
				<menu text="Vista/Seleccion_por_tema" action-command="SELECTIONBYSHAPE"/>
108
				<menu text="Vista/configurar_localizador" action-command="CONFIG_LOCATOR"/>		
109
				<menu text="Vista/propiedades" action-command="PROPERTIES"/>
110
			</menus>
111
			<tool-bar name="Herramientas" y-position="1">
112
				<action-tool icon="images/MapContents.png" action-command="FULL" tooltip="Zoom_Completo" position="1"/>
113
				<action-tool icon="images/encuadre.png" action-command="ENCUADRE" tooltip="gestion_encuadre" last="true" position="2"/>			
114
				<selectable-tool group="grupo1" default="true" icon="images/ZoomIn.png" action-command="ZOOM_IN" tooltip="Zoom_M?s" position="3"/>
115
				<selectable-tool group="grupo1" icon="images/ZoomOut.png" action-command="ZOOM_OUT" position="4"/>
116
				<selectable-tool group="grupo1" icon="images/Pan.png" action-command="PAN"  tooltip="Encuadre" position="5"/>
117
				<selectable-tool group="grupo1" icon="images/Identify.png" action-command="INFO"  tooltip="informacion" position="6" />
118
				<selectable-tool group="grupo2" icon="images/Distancia.png" action-command="MEDICION"  tooltip="medir_distancias" position="7"/>
119
				<selectable-tool group="grupo2" icon="images/Poligono16.png" action-command="AREA"  tooltip="medir_area" position="8"/>
120
				<selectable-tool group="grupo2" default="true" icon="images/Select.png" action-command="SELPOINT"  tooltip="seleccionar_por_punto" position="9"/>
121
				<selectable-tool group="grupo2" icon="images/SelEspacial2b.png" action-command="SELRECT"  tooltip="seleccionar_por_rectangulo" position="10"/>
122
			</tool-bar>
123
		</extension>
124
		<extension>
125
			<class name="com.iver.cit.gvsig.ThemeControls"/>
126
			<menu text="Tema/propiedades"/>
127
		</extension>
128
	</extensions>
129

  
130
	<file-extensions>
131
		<file-extension description="DGNfiles" ends-with="dgn" dialog="openLayer">
132
			<class name="com.iver.cit.gvsig.DGNFileExtension"/>
133
		</file-extension>
134
		<file-extension description="Rasterfiles" ends-with="ecw,tif,tiff,jpg,png" dialog="openLayer">
135
			<class name="com.iver.cit.gvsig.RasterFileExtension"/>
136
		</file-extension>
137
	</file-extensions>
138
</plugin-config>
0 139

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/castor.properties
1
org.exolab.castor.indent=true
0 2

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/castor/andami-config.xsd
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

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

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

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27

  
28
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
29
  <xs:element name="andami">
30
    <xs:complexType>
31
      <xs:attribute name="update" type="xs:boolean" use="required" />
32
    </xs:complexType>
33
  </xs:element>
34

  
35
  <xs:element name="andami-config">
36
    <xs:complexType>
37
      <xs:sequence>
38
        <xs:element ref="andami" />
39
        <xs:element ref="plugin" maxOccurs="unbounded" />
40
        <xs:element ref="andami-options" minOccurs="0" maxOccurs="1" />
41
      </xs:sequence>
42
      <xs:attribute name="locale-language" type="xs:string" use="optional" />
43
      <xs:attribute name="locale-country" type="xs:string" use="optional" />
44
      <xs:attribute name="locale-variant" type="xs:string" use="optional" />
45
      <xs:attribute name="lookAndFeel" type="xs:string" use="optional" />
46
      <xs:attribute name="pluginsDirectory" type="xs:string" use="required" />
47
    </xs:complexType>
48
  </xs:element>
49

  
50
  <xs:element name="plugin">
51
    <xs:complexType>
52
      <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
53
      <xs:attribute name="update" type="xs:boolean" use="required" />
54
    </xs:complexType>
55
  </xs:element>
56
  
57
  <xs:element name="andami-options">
58
    <xs:complexType>
59
      <xs:sequence>
60
        <xs:element ref="option" minOccurs="0" maxOccurs="unbounded" />
61
        <xs:element ref="icon-theme" minOccurs="0" maxOccurs="1" />
62
      </xs:sequence>
63
    </xs:complexType>
64
  </xs:element>
65
  
66
  <xs:element name="icon-theme">
67
    <xs:complexType>
68
      <xs:attribute name="name" type="xs:string" use="required" />
69
      <xs:attribute name="description" type="xs:string" use="optional" />
70
      <xs:attribute name="version" type="xs:string" use="optional" />
71
      <xs:attribute name="resource" type="xs:string" use="optional" />
72
      <xs:attribute name="basedir" type="xs:string" use="required" />
73
    </xs:complexType>
74
  </xs:element>
75

  
76
  <xs:element name="option">
77
    <xs:complexType>
78
      <xs:attribute name="name" type="xs:string" use="required" />
79
      <xs:attribute name="value" type="xs:string" use="required" />
80
    </xs:complexType>
81
  </xs:element>
82
</xs:schema>
0 83

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources-application/tools/debian.control
1
Package: gvsig-desktop
2
Version: ${GVSIG_VERSION}-${GVSIG_BUILDNUMBER}-1
3
Source: http://devel.gvsig.org/svn/gvsig-desktop/tags/org.gvsig.desktop-${CORE_VERSION}/
4
Maintainer: gvSIG association <info@gvsig.com>
5
Section: graphics
6
Homepage: http://www.gvsig.com/en/products/gvsig-desktop
7
Priority: optional
8
Architecture: ${GVSIG_ARCHITECTURE}
9
Depends: default-jre (>=1)
10
Description: A powerful, user-friendly, interoperable GIS used by thousands of users worldwide.
11
 It is easy to work in a variety of formats with gvSIG  Desktop, vector and raster files, databases and remote services. There are always available all kinds of tools to analyze and manage your geographic information.
12
 .
13
 gvSIG Desktop is designed to be an easily extensible solution, allowing  thus continually improving the software application and developing tailor made solutions.
14
 .
15
 gvSIG Desktop is open source software, GNU / GPL license, this makes its free use, distribution, study and improvement.
16

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources-application/tools/gvSIG.config
1

  
2
###
3
GVSIG_HOME_FOLDER="$GVSIG_INSTALL_FOLDER/home/gvSIG"
4
GVSIG_JAVA_PARAMS="-DgvSIG.home=$GVSIG_INSTALL_FOLDER/home"
5
###
6

  
7
# Initial gvSIG memory (M=Megabytes, G=Gigabytes)
8
GVSIG_INITIAL_MEM=256M
9
# Maximum gvSIG memory (M=Megabytes, G=Gigabytes)
10
GVSIG_MAX_MEM=1024M
11
# Maximum permanent memory size: needed to load classes and statics
12
GVSIG_MAX_PERM_SIZE=128M
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources-application/tools/make-portable
1
#!/bin/bash
2
#############################################################################
3
# Require la siguiente estructura de carpetas:
4
#
5
# - packages
6
#   - custom (carpeta con los paquetes adicionales a incluir en la portable)
7
#   - exclude (fichero con los codigos de paquetes a excluir)
8
# - standard
9
#   - gvSIG-desktop*-lin-x86-online.zip
10
#   - gvSIG-desktop*-lin-x86_64-online.zip
11
#   - gvSIG-desktop*-win-x86-online.zip
12
#   - gvSIG-desktop*-win-x86_64-online.zip
13
#   - gvSIG-desktop*-lin-x86.gvspkg
14
#   - gvSIG-desktop*-lin-x86_64.gvspkg
15
#   - gvSIG-desktop*-win-x86.gvspkg
16
#   - gvSIG-desktop*-win-x86_64.gvspkg
17
# - patchs
18
#   - patchs.sh (se ejecuta antes que los scripts de ant y zipear la instalacion)
19
# - make-portable
20
#
21
# Y se ejecutara el archivo "make-portable" desde ese directorio.
22
#
23
# Al final se crean las carpetas y archivos:
24
#
25
# - target/gvsig-desktop-VERSION-lin-x86
26
# - target/gvsig-desktop-VERSION-lin-x86_64
27
# - target/gvsig-desktop-VERSION-win-x86
28
#
29
# - target/gvsig-desktop-VERSION-lin-x86.zip
30
# - target/gvsig-desktop-VERSION-lin-x86_64.zip
31
# - target/gvsig-desktop-VERSION-win-x86.zip
32
#
33
##############################################################################
34

  
35
#set -x
36

  
37
#function handle_error() {
38
#    echo "FAILED: line $1, exit code $2"
39
#    exit 1
40
#}
41
#
42
#trap 'handle_error $LINENO $?' ERR
43

  
44
set -e
45

  
46
cd "$(dirname $0)"
47
SCRIPT_NAME=$(basename $0)
48

  
49
export BASEFOLDER="$PWD"
50
export TARGET="$BASEFOLDER/target"
51
export PATCHSFOLDER=$BASEFOLDER/patchs
52

  
53
function logger_info() {
54
    echo "$*"
55
}
56

  
57
function logger_warn() {
58
    echo "$*"
59
}
60

  
61
function get_package_info() {
62
  PACKAGE_PATH="$1"
63

  
64
  #
65
  # A veces en el zip los archivos comienzan por "/" y otras no.
66
  # Asi que lo primero que hacemos es comprobar eso.
67
  #
68
  local prefix=""
69
  local line=""
70
  # El flag -Z1 muestra los ficheros unicamente, similar a -l pero
71
  # sin ningun tipo de cabezaras, resumenes o informacion adicional
72
  # por cada fichero. Solo el nombre con ruta de cada fichero.
73
  local x=$(unzip -Z1 "$PACKAGE_PATH" "*/package.info")
74
  if [ "${x:0:1}" == "/" ] ; then
75
    prefix="/"
76
  fi
77
  #
78
  # Usamos una redireccion y no un pipe ya que los elementos de un pipe se
79
  # ejecutan en un subshell separado y la asignacion a las variables dentro del
80
  # while solo tendria efecto en ese subshell.
81
  #
82
  # Atencion al parametro W del unzip, ya que si lo quitamos y en el zip hay
83
  # mas de un "package.info" nos los sacaria todos, y los resultados no serian
84
  # los esperados. Solo tenemos que leer el "package.info" que hay en el primer
85
  # subdirectorio del zip.
86
  # Con el tr intentamos eliminar lo \r ya que algunos package.info generados
87
  # desde windows tienen \r.
88
  #
89
  PACKE_INFO_CONTENTS=$(unzip -lpWc "$PACKAGE_PATH" "${prefix}*/package.info" | tr -d '\r')
90
  while read line ; do
91
    case "$line" in
92
    type=*)
93
      PACKAGE_TYPE=${line#type=}
94
      ;;
95
    version=*)
96
      PACKAGE_VERSION=${line#version=}
97
      ;;
98
    code=*)
99
      PACKAGE_CODE=${line#code=}
100
      ;;
101
    esac
102
  done <<END_OF_PACKAGE_INFO_CONTENTS
103
$PACKE_INFO_CONTENTS
104
END_OF_PACKAGE_INFO_CONTENTS
105
}
106

  
107

  
108
function install_symbols() {
109
    INSTALL_FOLDER="$1"
110

  
111
    cd "$INSTALL_FOLDER"
112
    mkdir -p "home/gvSIG/plugins/org.gvsig.app.mainplugin/Symbols"
113
    cd "home/gvSIG/plugins/org.gvsig.app.mainplugin/Symbols"
114
    rm -rf "$PACKAGE_CODE"
115
    logger_info "Install symbols $PACKAGE_CODE $PACKAGE_VERSION"
116
    unzip -qq "$PACKAGE_PATH" 2>&1 | sed "/warning:  stripped absolute path/d"
117
}
118

  
119
function install_script() {
120
    INSTALL_FOLDER="$1"
121

  
122
    cd "$INSTALL_FOLDER"
123
    mkdir -p "home/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/scripts/addons"
124
    cd "home/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/scripts/addons"
125
    rm -rf "$PACKAGE_CODE"
126
    logger_info "Install script $PACKAGE_CODE $PACKAGE_VERSION"
127
    unzip -qq "$PACKAGE_PATH" 2>&1 | sed "/warning:  stripped absolute path/d"
128
}
129

  
130
function install_jCRS_EPSG() {
131
    INSTALL_FOLDER="$1"
132

  
133
    cd "$INSTALL_FOLDER"
134
    mkdir -p "gvSIG/extensiones/org.gvsig.projection.app.jcrs/db/EPSG"
135
    cd "gvSIG/extensiones/org.gvsig.projection.app.jcrs/db/EPSG"
136
    rm -rf "$PACKAGE_CODE"
137
    logger_info "Install jCRS EPSG data base $PACKAGE_CODE $PACKAGE_VERSION"
138
    unzip -qq "$PACKAGE_PATH" 2>&1 | sed "/warning:  stripped absolute path/d"
139
}
140

  
141
function install_plugin() {
142
    INSTALL_FOLDER="$1"
143

  
144
    cd "$INSTALL_FOLDER/gvSIG/extensiones"
145
    rm -rf "$PACKAGE_CODE"
146
    logger_info "Install plugin $PACKAGE_CODE $PACKAGE_VERSION"
147
    unzip -qq "$PACKAGE_PATH" 2>&1 | sed "/warning:  stripped absolute path/d"
148
}
149

  
150
function install_translations() {
151
    INSTALL_FOLDER="$1"
152

  
153
    cd "$INSTALL_FOLDER/i18n"
154
    rm -rf "$PACKAGE_CODE"
155
    logger_info "Install translations $PACKAGE_CODE $PACKAGE_VERSION"
156
    unzip -qq "$PACKAGE_PATH" 2>&1 | sed "/warning:  stripped absolute path/d"
157
}
158

  
159
function run_plugins_install_scripts() {
160
    INSTALL_FOLDER="$1"
161

  
162
    logger_info ""
163
    logger_info "Running plugins install scripts"
164
    cd "$INSTALL_FOLDER/gvSIG/extensiones"
165
    for PLUGIN_CODE in *
166
    do
167
        if [ -f "$INSTALL_FOLDER/gvSIG/extensiones/$PLUGIN_CODE/install/install.xml" ] ; then
168
            logger_info "Running custom install script of $PLUGIN_CODE"
169
            cd $INSTALL_FOLDER
170
            ant -Dgvsig_dir="$INSTALL_FOLDER" -Dextensions_dir="$INSTALL_FOLDER/gvSIG/extensiones" -f "$INSTALL_FOLDER/gvSIG/extensiones/$PLUGIN_CODE/install/install.xml"
171
        fi
172
    done
173
}
174

  
175
function install_packages() {
176
    INSTALL_FOLDER="$1"
177
    PACKAGES_FOLDER="$2"
178

  
179
    logger_info ""
180
    logger_info "Processing $(basename $PACKAGES_FOLDER) packages"
181
    for PACKAGE_PATH in $PACKAGES_FOLDER/*.gvspkg
182
    do
183
      if [ -f "$PACKAGE_PATH" ] ; then
184
        PACKAGE_NAME="$(basename $PACKAGE_PATH)"
185
        get_package_info $PACKAGE_PATH
186
        if include_package $PACKAGE_CODE ; then
187
          case $PACKAGE_TYPE in
188
          plugin)
189
            install_plugin "$INSTALL_FOLDER"
190
            ;;
191
          jCRS_EPSG)
192
            install_jCRS_EPSG "$INSTALL_FOLDER"
193
            ;;
194
          symbols)
195
            install_symbols "$INSTALL_FOLDER"
196
            ;;
197
          Script)
198
            install_script "$INSTALL_FOLDER"
199
            ;;
200
          translations)
201
            install_translations "$INSTALL_FOLDER"
202
            ;;
203
          *)
204
            echo "ERROR: Type of package $PACKAGE_TYPE of $PACKAGE_NAME not supported."
205
            exit 1
206
            ;;
207
          esac
208
        else
209
          logger_info "Exclude package $PACKAGE_CODE"
210
          cp "$PACKAGE_PATH" "$INSTALL_FOLDER/install"
211
        fi
212
      fi
213
    done
214
}
215

  
216
function include_package() {
217
    set +e
218
    egrep  "^$1\$" "$BASEFOLDER/packages/excludes" >/dev/null
219
    FOUND=$?
220
    set -e
221
    if [ "$FOUND" == 1 ] ; then
222
        return 0
223
    fi
224
    return 1
225
}
226

  
227

  
228
function remove_excluded_packages() {
229
    logger_info "Checking plugins to remove"
230
    cd "$INSTALL_FOLDER/gvSIG/extensiones"
231
    while read line; do
232
        if [ -d "$line" ] ; then
233
            logger_info "Removing plugin $line"
234
            rm -rf "$line"
235
        fi
236
    done < "$BASEFOLDER/packages/excludes"
237
}
238

  
239
function install_portable_configuration_files() {
240
    logger_info "Install portable configuration file (gvSIG.config)"
241
    cp "$INSTALL_FOLDER/tools/gvSIG.config" "$INSTALL_FOLDER"
242
    chmod a+x "$INSTALL_FOLDER/gvSIG.sh"
243
}
244

  
245
function zipfolder() {
246
    echo zip -qyr9 "$1" "$2"
247
    if type zip >/dev/null 2>/dev/null
248
    then
249
  zip -qyr9 "$1" "$2"
250
    else
251
      echo "
252

  
253
  WARNING: zip command not found.
254
           $1 not compressed.
255

  
256
"
257
    fi
258
}
259

  
260
function expandsVarsOnFile() {
261
  sed 's/\${INSTALL_DRIVE}/./
262
s/\${INSTALL_PATH}/./' "$1" >"$1.tmp"
263
  mv "$1.tmp" "$1"
264
}
265

  
266
function mkdist() {
267
    cd $BASEFOLDER/standard
268

  
269
    # OS code (lin/win/darwin) + distribution + version
270
    export PORTABLE_OS="$1"
271

  
272
    # OS family code (lin/win/darwin)
273
    export PORTABLE_OSFAMILY="${PORTABLE_OS/_*/}"
274

  
275
    # OS name (linux/windows/darwin) for show only
276
    export PORTABLE_OSNAME="$2"
277

  
278
    # Architectute X86, x86_64
279
    export PORTABLE_PLATFORM="$3"
280

  
281
    # OS used to locate the online zip
282
    export ONLINE_OS
283
    case "$PORTABLE_OSFAMILY" in
284
    darwin)
285
        ONLINE_OS="lin"
286
        ;;
287
    lin)
288
        ONLINE_OS="lin"
289
        ;;
290
    win)
291
        ONLINE_OS="win"
292
        ;;
293
    *)
294
        ONLINE_OS="$PORTABLE_OS"
295
        ;;
296
    esac
297

  
298
    export PORTABLE_VERSION=$(expr *${ONLINE_OS}-${PORTABLE_PLATFORM}-online.zip : "gvSIG-desktop-\\([0-9.]*-[0-9]*\\)")
299
    export PORTABLE_STATUS=$(expr *${ONLINE_OS}-${PORTABLE_PLATFORM}-online.zip : "gvSIG-desktop-[0-9.]*-[0-9]*-\\([a-zA-Z]*[0-9]*\)")
300
    export PORTABLE_NAME="gvSIG-desktop-$PORTABLE_VERSION-${PORTABLE_STATUS}-${PORTABLE_OS}-${PORTABLE_PLATFORM}"
301

  
302
    export INSTALL_FOLDER="$TARGET/$PORTABLE_NAME"
303

  
304
    logger_info "
305
=
306
=    Creating portable for ${PORTABLE_OSNAME} (${PORTABLE_OSFAMILY}/${PORTABLE_OS}/${PORTABLE_PLATFORM} - online os ${ONLINE_OS})
307
=
308
    "
309
    logger_info "Removing previous files"
310
    rm -rf "$TARGET/gvsig-desktop"
311
    rm -rf "$INSTALL_FOLDER"
312
    rm -f  "$TARGET/${PORTABLE_NAME}.zip"
313
    rm -rf "$TARGET/packages-${PORTABLE_OS}-${PORTABLE_PLATFORM}"
314

  
315
    logger_info "Uncompressing ${PORTABLE_OSNAME} (${ONLINE_OS}) base files"
316
    cd $TARGET
317
    mkdir $PORTABLE_NAME
318
    cd $PORTABLE_NAME
319
    unzip -qq "$BASEFOLDER/standard/gvSIG-desktop-$PORTABLE_VERSION-$PORTABLE_STATUS-${ONLINE_OS}-${PORTABLE_PLATFORM}-online.zip"
320
    #mv gvSIG-desktop-${PORTABLE_VERSION} $PORTABLE_NAME
321

  
322
    logger_info "Uncompressing ${PORTABLE_OSNAME}-${PORTABLE_PLATFORM} package set"
323
    mkdir -p "$TARGET/packages-${PORTABLE_OS}-${PORTABLE_PLATFORM}"
324
    cd "$TARGET/packages-${PORTABLE_OS}-${PORTABLE_PLATFORM}"
325
    unzip -qq "$BASEFOLDER/standard/gvSIG-desktop-${PORTABLE_VERSION}-${PORTABLE_STATUS}-${PORTABLE_OS}-${PORTABLE_PLATFORM}.gvspks"
326

  
327
    echo Removing package "$TARGET/packages-${PORTABLE_OS}-${PORTABLE_PLATFORM}/gvSIG-desktop-2.3.0-org.gvsig.gdal.app.mainplugin-"*-all-all-j1_7.gvspkg
328
    rm -f "$TARGET/packages-${PORTABLE_OS}-${PORTABLE_PLATFORM}/gvSIG-desktop-2.3.0-org.gvsig.gdal.app.mainplugin-"*-all-all-j1_7.gvspkg
329

  
330
    install_packages "$INSTALL_FOLDER" "$TARGET/packages-${PORTABLE_OS}-${PORTABLE_PLATFORM}"
331

  
332
    install_packages "$INSTALL_FOLDER" "$BASEFOLDER/packages/custom"
333

  
334
    install_portable_configuration_files
335

  
336
    remove_excluded_packages
337

  
338
    if [ -f $PATCHSFOLDER/patchs.sh ] ; then
339
        chmod a+x $PATCHSFOLDER/patchs.sh
340
        logger_info "Appling patch to the instalation."
341
        source $PATCHSFOLDER/patchs.sh
342
    fi
343

  
344
    run_plugins_install_scripts $INSTALL_FOLDER
345

  
346
    case "$PORTABLE_OSFAMILY" in
347
    darwin)
348
        mkdir "$INSTALL_FOLDER/Contents"
349
        mkdir "$INSTALL_FOLDER/Contents/MacOS"
350
        echo '#!/bin/bash
351
x=$(dirname $0)
352
x=$(dirname $x)
353
x=$(dirname $x)
354
exec "$x/gvSIG.sh"
355
' >"$INSTALL_FOLDER/Contents/MacOS/${PORTABLE_NAME}"
356
        chmod a+x "$INSTALL_FOLDER/Contents/MacOS/${PORTABLE_NAME}"
357
        mv "$INSTALL_FOLDER" "${INSTALL_FOLDER}.app"
358
        INSTALL_FOLDER="${INSTALL_FOLDER}.app"
359
        PORTABLE_NAME="${PORTABLE_NAME}.app"
360
        ;;
361
    win)
362
        expandsVarsOnFile "${INSTALL_FOLDER}/gvsig-desktop.vbs"
363
        expandsVarsOnFile "${INSTALL_FOLDER}/gvsig-desktop.cmd"
364
        expandsVarsOnFile "${INSTALL_FOLDER}/gvsig-package-installer.cmd"
365
        ;;
366
    esac
367

  
368
    logger_info "Compresing ${PORTABLE_OSNAME}-${PORTABLE_PLATFORM} portable (this take a moment)"
369
    cd "$TARGET"
370
    zipfolder "${PORTABLE_NAME}.zip" "${PORTABLE_NAME}"
371

  
372
    logger_info "Removing temporary package folder"
373
    rm -rf $TARGET/packages-${PORTABLE_OS}-${PORTABLE_PLATFORM}
374

  
375
    logger_info "
376

  
377
    Portable ${PORTABLE_OSNAME}-${PORTABLE_PLATFORM} created.
378

  
379
    "
380
}
381

  
382

  
383
function main() {
384
    mkdist darwin_macos_10.11 darwin x86_64
385
    mkdist lin_ubuntu_14.04 linux x86
386
    mkdist lin_ubuntu_14.04 linux x86_64
387
    mkdist lin linux x86
388
    mkdist lin linux x86_64
389
    mkdist win windows x86
390
    mkdist win windows x86_64
391
    echo "Creation ended"
392
}
393

  
394
mkdir -p "$TARGET"
395
main | tee "$TARGET/${SCRIPT_NAME}.log"
0 396

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources-application/tools/allow-vbs-run-as-admin.reg
1
Windows Registry Editor Version 5.00
2

  
3
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VBSFile\Shell\runas\Command]
4
@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
5
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,\
6
  53,00,63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,\
7
  00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00
8

  
9

  
tags/org.gvsig.desktop-2.0.190/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources-application/tools/gvsig-debcreate
1
#!/bin/bash
2
#
3

  
4
#set -x
5

  
6
if [ ! -f "gvSIG.sh" ] ; then
7
  echo "Usage: $0"
8
  echo "  Current folder can be a gvSIG installation"
9
  exit -1
10
fi
11

  
12
GVSIG_INSTALL_FOLDER="$PWD"
13
TARGET_FOLDER="/tmp/gvsig-deb"
14

  
15
function message() {
16
  echo $@
17
}
18

  
19

  
20
initArchitecture() {
21
  architecture=""
22
  cd "$GVSIG_INSTALL_FOLDER"
23
  eval $(find . -name package.info -exec grep "architecture=[^a]" {} ';' | sort | head -n 1)
24
  if [ "${architecture}" == "" ] ; then
25
    echo "Can't determine the gvSIG installation architecture." >&2
26
    exit 1
27
  fi
28
  if [ "${architecture/*x86_64*/x86_64}" == "x86_64" ] ; then
29
    GVSIG_ARCHITECTURE="amd64"
30
  else
31
    GVSIG_ARCHITECTURE="x86"
32
  fi
33
  cd - >/dev/null
34
}
35

  
36
CORE_VERSION=$(echo lib/org.gvsig.andami-*.jar)
37
CORE_VERSION=${CORE_VERSION/lib\/org.gvsig.andami-/}
38
CORE_VERSION=${CORE_VERSION/.jar/}
39
GVSIG_VERSION=$(sed -n 's/^version=\(.*\)/\1/p' package.info)
40
GVSIG_BUILDNUMBER=$(sed -n 's/^buildNumber=\(.*\)/\1/p' package.info)
41
initArchitecture
42

  
43

  
44
sudo rm -rf "$TARGET_FOLDER"
45
mkdir -p "$TARGET_FOLDER/DEBIAN"
46
sed "s/\${GVSIG_ARCHITECTURE}/${GVSIG_ARCHITECTURE}/
47
s/\${GVSIG_VERSION}/${GVSIG_VERSION}/
48
s/\${GVSIG_BUILDNUMBER}/${GVSIG_BUILDNUMBER}/
49
s/\${CORE_VERSION}/${CORE_VERSION}/" "$GVSIG_INSTALL_FOLDER/tools/debian.control" >"$TARGET_FOLDER/DEBIAN/control"
50

  
51
#=============================
52
# Load debian.control values
53
#
54
typeset -l Package
55
eval $(sed -n 's/\([A-Za-z0-9]*\)[ ]*:[ ]*\(.*\)/\1="\2"/p' "$TARGET_FOLDER/DEBIAN/control")
56

  
57
#=============================
58
# Prepare target folder
59

  
60
message "Prepare package folder in $TARGET_FOLDER"
61

  
62
mkdir -p "$TARGET_FOLDER/DEBIAN"
63
mkdir -p "$TARGET_FOLDER/usr/bin"
64
mkdir -p "$TARGET_FOLDER/usr/share/applications"
65
mkdir -p "$TARGET_FOLDER/usr/share/menu"
66
mkdir -p "$TARGET_FOLDER/usr/share/pixmaps"
67
mkdir -p "$TARGET_FOLDER/usr/local/bin"
68
mkdir -p "$TARGET_FOLDER/usr/local/lib/${Package}/${Version}-${Architecture}"
69

  
70
#===========================================
71
# Create gvsig launcher in /usr/local/bin
72

  
73
message "Create gvsig launcher in $TARGET_FOLDER/usr/local/bin"
74
echo "#!/bin/sh
75
exec /usr/local/lib/${Package}/default/gvSIG.sh \$@
76
" > "$TARGET_FOLDER/usr/local/bin/${Package}"
77

  
78
#============================================
79
# Link gvSIG launcher to /usr/bin
80

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff