Revision 34108
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/buildNumber.properties | ||
---|---|---|
1 |
#maven.buildNumber.plugin properties file |
|
2 |
#Tue Oct 26 12:06:29 CEST 2010 |
|
3 |
buildNumber=2020 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<groupId>org.gvsig</groupId> |
|
7 |
<artifactId>org.gvsig.installer.app</artifactId> |
|
8 |
<packaging>pom</packaging> |
|
9 |
<version>2.0-SNAPSHOT</version> |
|
10 |
<name>org.gvsig.installer.app</name> |
|
11 |
<description>gvSIG plugin to create a installers or install plugins in gvSIG</description> |
|
12 |
<url>http://gvsig-desktop.forge.osor.eu/downloads/pub/projects/gvSIG-desktop/docs/reference/org.gvsig.installer.app/${pom.version}</url> |
|
13 |
<parent> |
|
14 |
<groupId>org.gvsig</groupId> |
|
15 |
<artifactId>gvsig-base-extension-pom</artifactId> |
|
16 |
<version>2.0-SNAPSHOT</version> |
|
17 |
</parent> |
|
18 |
|
|
19 |
<scm> |
|
20 |
<connection>scm:svn:https://svn.forge.osor.eu/svn/gvsig-desktop/branches/v2_0_0_prep/extensions/org.gvsig.installer.app</connection> |
|
21 |
<developerConnection>scm:svn:https://svn.forge.osor.eu/svn/gvsig-desktop/branches/v2_0_0_prep/extensions/org.gvsig.installer.app</developerConnection> |
|
22 |
<url>https://forge.osor.eu/plugins/scmsvn/viewcvs.php/branches/v2_0_0_prep/extensions/org.gvsig.installer.app/?root=gvsig-desktop</url> |
|
23 |
</scm> |
|
24 |
|
|
25 |
<developers> |
|
26 |
<developer> |
|
27 |
<id>jjdelcerro</id> |
|
28 |
<name>Joaqu?n Jos? del Cerro</name> |
|
29 |
<email>jjdelcerro@gvsig.org</email> |
|
30 |
<roles> |
|
31 |
<role>Architect</role> |
|
32 |
</roles> |
|
33 |
</developer> |
|
34 |
<developer> |
|
35 |
<id>jpiera</id> |
|
36 |
<name>Jorge Piera Llodr?</name> |
|
37 |
<email>jpiera@gvsig.org</email> |
|
38 |
<roles> |
|
39 |
<role>Architect</role> |
|
40 |
<role>Developer</role> |
|
41 |
</roles> |
|
42 |
</developer> |
|
43 |
</developers> |
|
44 |
|
|
45 |
<distributionManagement> |
|
46 |
<site> |
|
47 |
<id>gvsig-repository</id> |
|
48 |
<url>scp://shell.forge.osor.eu/home/groups/gvsig-desktop/www/downloads/pub/projects/gvSIG-desktop/docs/reference/org.gvsig.installer.app/${pom.version}</url> |
|
49 |
</site> |
|
50 |
</distributionManagement> |
|
51 |
<repositories> |
|
52 |
<repository> |
|
53 |
<id>gvsig-public-http-repository</id> |
|
54 |
<name>gvSIG maven public HTTP repository</name> |
|
55 |
<url>http://gvsig-desktop.forge.osor.eu/downloads/pub/projects/gvSIG-desktop/maven-repository</url> |
|
56 |
<releases> |
|
57 |
<enabled>true</enabled> |
|
58 |
<updatePolicy>daily</updatePolicy> |
|
59 |
<checksumPolicy>warn</checksumPolicy> |
|
60 |
</releases> |
|
61 |
<snapshots> |
|
62 |
<enabled>true</enabled> |
|
63 |
<updatePolicy>daily</updatePolicy> |
|
64 |
<checksumPolicy>warn</checksumPolicy> |
|
65 |
</snapshots> |
|
66 |
</repository> |
|
67 |
</repositories> |
|
68 |
<build> |
|
69 |
<plugins> |
|
70 |
<plugin> |
|
71 |
<groupId>org.apache.maven.plugins</groupId> |
|
72 |
<artifactId>maven-release-plugin</artifactId> |
|
73 |
<configuration> |
|
74 |
<tagBase>https://svn.forge.osor.eu/svn/gvsig-desktop/tags</tagBase> |
|
75 |
</configuration> |
|
76 |
</plugin> |
|
77 |
</plugins> |
|
78 |
</build> |
|
79 |
<dependencyManagement> |
|
80 |
<dependencies> |
|
81 |
<dependency> |
|
82 |
<groupId>org.gvsig</groupId> |
|
83 |
<artifactId>org.gvsig.core.maven.dependencies</artifactId> |
|
84 |
<version>2.0.0-SNAPSHOT</version> |
|
85 |
<type>pom</type> |
|
86 |
<scope>import</scope> |
|
87 |
</dependency> |
|
88 |
<dependency> |
|
89 |
<groupId>org.gvsig</groupId> |
|
90 |
<artifactId>org.gvsig.i18n</artifactId> |
|
91 |
<version>2.0-SNAPSHOT</version> |
|
92 |
</dependency> |
|
93 |
<dependency> |
|
94 |
<groupId>org.gvsig</groupId> |
|
95 |
<artifactId>org.gvsig.installer.lib</artifactId> |
|
96 |
<version>1.0.0-SNAPSHOT</version> |
|
97 |
</dependency> |
|
98 |
<dependency> |
|
99 |
<groupId>org.gvsig</groupId> |
|
100 |
<artifactId>org.gvsig.installer.lib.api</artifactId> |
|
101 |
<version>1.0.0-SNAPSHOT</version> |
|
102 |
</dependency> |
|
103 |
<dependency> |
|
104 |
<groupId>org.gvsig</groupId> |
|
105 |
<artifactId>org.gvsig.installer.lib.impl</artifactId> |
|
106 |
<version>1.0.0-SNAPSHOT</version> |
|
107 |
</dependency> |
|
108 |
<dependency> |
|
109 |
<groupId>org.gvsig</groupId> |
|
110 |
<artifactId>org.gvsig.installer.lib.spi</artifactId> |
|
111 |
<version>1.0.0-SNAPSHOT</version> |
|
112 |
</dependency> |
|
113 |
<dependency> |
|
114 |
<groupId>org.gvsig</groupId> |
|
115 |
<artifactId>org.gvsig.installer.prov</artifactId> |
|
116 |
<version>1.0.0-SNAPSHOT</version> |
|
117 |
</dependency> |
|
118 |
<dependency> |
|
119 |
<groupId>org.gvsig</groupId> |
|
120 |
<artifactId>org.gvsig.installer.prov.plugin</artifactId> |
|
121 |
<version>1.0.0-SNAPSHOT</version> |
|
122 |
</dependency> |
|
123 |
<dependency> |
|
124 |
<groupId>org.gvsig</groupId> |
|
125 |
<artifactId>org.gvsig.installer.swing</artifactId> |
|
126 |
<version>1.0.0-SNAPSHOT</version> |
|
127 |
</dependency> |
|
128 |
<dependency> |
|
129 |
<groupId>org.gvsig</groupId> |
|
130 |
<artifactId>org.gvsig.installer.swing.api</artifactId> |
|
131 |
<version>1.0.0-SNAPSHOT</version> |
|
132 |
</dependency> |
|
133 |
<dependency> |
|
134 |
<groupId>org.gvsig</groupId> |
|
135 |
<artifactId>org.gvsig.installer.swing.impl</artifactId> |
|
136 |
<version>1.0.0-SNAPSHOT</version> |
|
137 |
</dependency> |
|
138 |
<dependency> |
|
139 |
<groupId>org.gvsig</groupId> |
|
140 |
<artifactId>org.gvsig.installer.main</artifactId> |
|
141 |
<version>1.0.0-SNAPSHOT</version> |
|
142 |
</dependency> |
|
143 |
<dependency> |
|
144 |
<groupId>jwizardcomponent</groupId> |
|
145 |
<artifactId>jwizardcomponent</artifactId> |
|
146 |
<version>1.2.2</version> |
|
147 |
</dependency> |
|
148 |
<dependency> |
|
149 |
<groupId>org.gvsig</groupId> |
|
150 |
<artifactId>org.gvsig.ui</artifactId> |
|
151 |
<version>2.0-SNAPSHOT</version> |
|
152 |
</dependency> |
|
153 |
<dependency> |
|
154 |
<groupId>org.apache.xmlgraphics</groupId> |
|
155 |
<artifactId>batik-gui-util</artifactId> |
|
156 |
<version>1.7</version> |
|
157 |
</dependency> |
|
158 |
<dependency> |
|
159 |
<groupId>org.apache.xmlgraphics</groupId> |
|
160 |
<artifactId>batik-xml</artifactId> |
|
161 |
<version>1.7</version> |
|
162 |
</dependency> |
|
163 |
<dependency> |
|
164 |
<groupId>org.apache.ant</groupId> |
|
165 |
<artifactId>ant</artifactId> |
|
166 |
<version>1.7.0</version> |
|
167 |
</dependency> |
|
168 |
<dependency> |
|
169 |
<groupId>org.gvsig</groupId> |
|
170 |
<artifactId>org.gvsig.app</artifactId> |
|
171 |
<version>2.0-SNAPSHOT</version> |
|
172 |
</dependency> |
|
173 |
<dependency> |
|
174 |
<groupId>org.gvsig</groupId> |
|
175 |
<artifactId>org.gvsig.andami</artifactId> |
|
176 |
<version>2.0-SNAPSHOT</version> |
|
177 |
</dependency> |
|
178 |
</dependencies> |
|
179 |
</dependencyManagement> |
|
180 |
|
|
181 |
<modules> |
|
182 |
<module>org.gvsig.installer.app.extension</module> |
|
183 |
</modules> |
|
184 |
|
|
185 |
<properties> |
|
186 |
<build-dir>${basedir}/../build</build-dir> |
|
187 |
</properties> |
|
188 |
</project> |
|
0 | 189 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/package.info | ||
---|---|---|
1 |
# |
|
2 |
#Mon Nov 08 14:41:02 CET 2010 |
|
3 |
state=devel |
|
4 |
name=org.gvsig.installer.app.extension |
|
5 |
official=true |
|
6 |
code=org.gvsig.installer.app.extension |
|
7 |
operating-system=all |
|
8 |
architecture=all |
|
9 |
java-version=j1_5 |
|
10 |
gvSIG-version=2.0.0 |
|
11 |
version=2.0-SNAPSHOT |
|
12 |
type=plugin |
|
13 |
build=2021 |
|
14 |
description=gvSIG plugin to create a installers or install plugins in gvSIG |
|
15 |
model-version=1.0.0 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/GvSIGFolders.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.installer.app.extension; |
|
23 |
|
|
24 |
import java.io.File; |
|
25 |
|
|
26 |
import org.gvsig.andami.Launcher; |
|
27 |
|
|
28 |
/** |
|
29 |
* Gets the main gvSIG application folders. |
|
30 |
* |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
*/ |
|
34 |
public class GvSIGFolders { |
|
35 |
|
|
36 |
/** |
|
37 |
* Returns the gvSIG main application folder. |
|
38 |
* |
|
39 |
* @return the gvSIG main application folder |
|
40 |
*/ |
|
41 |
public File getApplicationFolder() { |
|
42 |
// TODO: check if there is a better way to handle this |
|
43 |
return new File(System.getProperty("user.dir")); |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* Returns the gvSIG plugins folder. |
|
48 |
* |
|
49 |
* @return the gvSIG plugins folder |
|
50 |
*/ |
|
51 |
public File getPluginsFolder() { |
|
52 |
return new File(Launcher.getAndamiConfig().getPluginsDirectory()) |
|
53 |
.getAbsoluteFile(); |
|
54 |
} |
|
55 |
|
|
56 |
/** |
|
57 |
* Returns the default gvSIG folder with the installable package bundles. |
|
58 |
* |
|
59 |
* @return the default gvSIG folder with the installable package bundles |
|
60 |
*/ |
|
61 |
public File getInstallFolder() { |
|
62 |
return new File(getApplicationFolder(), "install"); |
|
63 |
} |
|
64 |
|
|
65 |
} |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/utils/WindowInstallerListener.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Prodevelop} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.installer.app.extension.utils; |
|
29 |
|
|
30 |
import org.gvsig.andami.PluginServices; |
|
31 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
32 |
import org.gvsig.installer.swing.api.wizard.InstallerWizardActionListener; |
|
33 |
import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel; |
|
34 |
|
|
35 |
/** |
|
36 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
37 |
*/ |
|
38 |
public class WindowInstallerListener implements InstallerWizardActionListener { |
|
39 |
|
|
40 |
private IWindow window = null; |
|
41 |
|
|
42 |
public WindowInstallerListener(IWindow window) { |
|
43 |
super(); |
|
44 |
this.window = window; |
|
45 |
} |
|
46 |
|
|
47 |
public void closeWizard() { |
|
48 |
PluginServices.getMDIManager().closeWindow(window); |
|
49 |
} |
|
50 |
|
|
51 |
public void cancel(InstallerWizardPanel installerWizard) { |
|
52 |
PluginServices.getMDIManager().closeWindow(window); |
|
53 |
} |
|
54 |
|
|
55 |
public void finish(InstallerWizardPanel installerWizard) { |
|
56 |
PluginServices.getMDIManager().closeWindow(window); |
|
57 |
} |
|
58 |
|
|
59 |
} |
|
0 | 60 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageExtension.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Prodevelop} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.installer.app.extension.execution; |
|
29 |
|
|
30 |
import java.net.MalformedURLException; |
|
31 |
import java.net.URL; |
|
32 |
|
|
33 |
import org.slf4j.Logger; |
|
34 |
import org.slf4j.LoggerFactory; |
|
35 |
|
|
36 |
import org.gvsig.andami.PluginServices; |
|
37 |
import org.gvsig.andami.plugins.Extension; |
|
38 |
import org.gvsig.installer.app.extension.GvSIGFolders; |
|
39 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
|
40 |
|
|
41 |
/** |
|
42 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
43 |
*/ |
|
44 |
public class InstallPackageExtension extends Extension { |
|
45 |
|
|
46 |
private static final Logger LOG = LoggerFactory |
|
47 |
.getLogger(InstallPackageExtension.class); |
|
48 |
|
|
49 |
public void execute(String actionCommand) { |
|
50 |
GvSIGFolders folders = new GvSIGFolders(); |
|
51 |
try { |
|
52 |
PluginServices.getMDIManager().addCentredWindow( |
|
53 |
new InstallPackageWindow(folders.getApplicationFolder(), |
|
54 |
folders.getPluginsFolder(), folders.getInstallFolder())); |
|
55 |
} catch (Exception e) { |
|
56 |
LOG.error("Error creating the wizard to install a package ", e); |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
public void initialize() { |
|
61 |
|
|
62 |
// TODO: move to user preferences or an external configuration file |
|
63 |
String packageDownloadURL = |
|
64 |
"http://gvsig-desktop.forge.osor.eu/gvSIG-desktop/dists/2.0.0/packages.gvspki"; |
|
65 |
|
|
66 |
try { |
|
67 |
SwingInstallerLocator.getSwingInstallerManager() |
|
68 |
.setDefaultDownloadURL(new URL(packageDownloadURL)); |
|
69 |
} catch (MalformedURLException e) { |
|
70 |
LOG.error( |
|
71 |
"Error creating the default packages download URL pointing to" |
|
72 |
+ packageDownloadURL, e); |
|
73 |
} |
|
74 |
} |
|
75 |
|
|
76 |
public boolean isEnabled() { |
|
77 |
return true; |
|
78 |
} |
|
79 |
|
|
80 |
public boolean isVisible() { |
|
81 |
return true; |
|
82 |
} |
|
83 |
|
|
84 |
} |
|
0 | 85 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageWindow.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Prodevelop} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.installer.app.extension.execution; |
|
29 |
|
|
30 |
import java.awt.BorderLayout; |
|
31 |
import java.awt.Dimension; |
|
32 |
import java.io.File; |
|
33 |
|
|
34 |
import javax.swing.JPanel; |
|
35 |
|
|
36 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
37 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
|
38 |
import org.gvsig.i18n.Messages; |
|
39 |
import org.gvsig.installer.app.extension.utils.WindowInstallerListener; |
|
40 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
|
41 |
import org.gvsig.installer.swing.api.execution.InstallPackageWizard; |
|
42 |
import org.gvsig.installer.swing.api.execution.InstallPackageWizardException; |
|
43 |
import org.gvsig.tools.locator.LocatorException; |
|
44 |
|
|
45 |
/** |
|
46 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
47 |
*/ |
|
48 |
public class InstallPackageWindow extends JPanel implements IWindow { |
|
49 |
|
|
50 |
private static final long serialVersionUID = 4719868181091291809L; |
|
51 |
WindowInfo windowInfo = null; |
|
52 |
|
|
53 |
public InstallPackageWindow(File applicationFolder, File pluginsFolder, |
|
54 |
File installFolder) throws LocatorException, |
|
55 |
InstallPackageWizardException { |
|
56 |
super(); |
|
57 |
InstallPackageWizard installPackageWizard = |
|
58 |
SwingInstallerLocator.getSwingInstallerManager() |
|
59 |
.createInstallPackageWizard(applicationFolder, pluginsFolder, |
|
60 |
installFolder); |
|
61 |
installPackageWizard |
|
62 |
.setWizardActionListener(new WindowInstallerListener(this)); |
|
63 |
this.setLayout(new BorderLayout()); |
|
64 |
add(installPackageWizard, BorderLayout.CENTER); |
|
65 |
} |
|
66 |
|
|
67 |
public WindowInfo getWindowInfo() { |
|
68 |
if (windowInfo == null) { |
|
69 |
windowInfo = |
|
70 |
new WindowInfo(WindowInfo.MODELESSDIALOG |
|
71 |
| WindowInfo.ICONIFIABLE | WindowInfo.RESIZABLE); |
|
72 |
Dimension dim = getPreferredSize(); |
|
73 |
windowInfo.setWidth((int) dim.getWidth()); |
|
74 |
windowInfo.setHeight((int) dim.getHeight()); |
|
75 |
windowInfo.setTitle(Messages.getText("install_package")); |
|
76 |
} |
|
77 |
return windowInfo; |
|
78 |
} |
|
79 |
|
|
80 |
public Object getWindowProfile() { |
|
81 |
return WindowInfo.DIALOG_PROFILE; |
|
82 |
} |
|
83 |
|
|
84 |
} |
|
0 | 85 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/creation/MakePluginPackageWindow.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Prodevelop} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.installer.app.extension.creation; |
|
29 |
|
|
30 |
import java.awt.BorderLayout; |
|
31 |
import java.awt.Dimension; |
|
32 |
import java.io.File; |
|
33 |
|
|
34 |
import javax.swing.JPanel; |
|
35 |
|
|
36 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
37 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
|
38 |
import org.gvsig.i18n.Messages; |
|
39 |
import org.gvsig.installer.app.extension.utils.WindowInstallerListener; |
|
40 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
|
41 |
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard; |
|
42 |
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException; |
|
43 |
import org.gvsig.tools.locator.LocatorException; |
|
44 |
|
|
45 |
/** |
|
46 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
47 |
*/ |
|
48 |
public class MakePluginPackageWindow extends JPanel implements IWindow { |
|
49 |
|
|
50 |
private static final long serialVersionUID = 3423389124323013058L; |
|
51 |
WindowInfo windowInfo = null; |
|
52 |
|
|
53 |
public MakePluginPackageWindow(File applicationFolder, File pluginsFolder, |
|
54 |
File installFolder) throws LocatorException, |
|
55 |
MakePluginPackageWizardException { |
|
56 |
super(); |
|
57 |
MakePluginPackageWizard makePluginPackageWizard = |
|
58 |
SwingInstallerLocator.getSwingInstallerManager() |
|
59 |
.createMakePluginPackageWizard(applicationFolder, |
|
60 |
pluginsFolder, installFolder); |
|
61 |
makePluginPackageWizard |
|
62 |
.setWizardActionListener(new WindowInstallerListener(this)); |
|
63 |
this.setLayout(new BorderLayout()); |
|
64 |
add(makePluginPackageWizard, BorderLayout.CENTER); |
|
65 |
} |
|
66 |
|
|
67 |
public WindowInfo getWindowInfo() { |
|
68 |
if (windowInfo == null) { |
|
69 |
windowInfo = |
|
70 |
new WindowInfo(WindowInfo.MODELESSDIALOG |
|
71 |
| WindowInfo.ICONIFIABLE | WindowInfo.RESIZABLE); |
|
72 |
Dimension dim = getPreferredSize(); |
|
73 |
windowInfo.setWidth((int) dim.getWidth()); |
|
74 |
windowInfo.setHeight((int) dim.getHeight()); |
|
75 |
windowInfo.setTitle(Messages.getText("make_plugin_package")); |
|
76 |
} |
|
77 |
return windowInfo; |
|
78 |
} |
|
79 |
|
|
80 |
public Object getWindowProfile() { |
|
81 |
return WindowInfo.DIALOG_PROFILE; |
|
82 |
} |
|
83 |
} |
|
0 | 84 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/java/org/gvsig/installer/app/extension/creation/MakePluginPackageExtension.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Prodevelop} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.installer.app.extension.creation; |
|
29 |
|
|
30 |
import org.slf4j.Logger; |
|
31 |
import org.slf4j.LoggerFactory; |
|
32 |
|
|
33 |
import org.gvsig.andami.PluginServices; |
|
34 |
import org.gvsig.andami.plugins.Extension; |
|
35 |
import org.gvsig.app.ApplicationLocator; |
|
36 |
import org.gvsig.app.extension.Version; |
|
37 |
import org.gvsig.installer.app.extension.GvSIGFolders; |
|
38 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
|
39 |
|
|
40 |
/** |
|
41 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a> |
|
42 |
*/ |
|
43 |
public class MakePluginPackageExtension extends Extension { |
|
44 |
|
|
45 |
private static final Logger LOG = LoggerFactory |
|
46 |
.getLogger(MakePluginPackageExtension.class); |
|
47 |
|
|
48 |
public void execute(String actionCommand) { |
|
49 |
GvSIGFolders folders = new GvSIGFolders(); |
|
50 |
|
|
51 |
try { |
|
52 |
PluginServices.getMDIManager().addCentredWindow( |
|
53 |
new MakePluginPackageWindow(folders.getApplicationFolder(), |
|
54 |
folders.getPluginsFolder(), folders.getInstallFolder())); |
|
55 |
} catch (Exception e) { |
|
56 |
LOG.error("Error creating teh wizard to create an installer ", e); |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
public void initialize() { |
|
61 |
|
|
62 |
} |
|
63 |
|
|
64 |
@Override |
|
65 |
public void postInitialize() { |
|
66 |
super.postInitialize(); |
|
67 |
Version version = ApplicationLocator.getManager().getVersion(); |
|
68 |
SwingInstallerLocator.getSwingInstallerManager().setApplicationVersion( |
|
69 |
version.getFormat()); |
|
70 |
} |
|
71 |
|
|
72 |
public boolean isEnabled() { |
|
73 |
return true; |
|
74 |
} |
|
75 |
|
|
76 |
public boolean isVisible() { |
|
77 |
return true; |
|
78 |
} |
|
79 |
|
|
80 |
} |
|
0 | 81 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/resources/locale/text.properties | ||
---|---|---|
1 |
make_plugin_package=Hacer un instalable de un plugin |
|
2 |
make_plugin_package_description=Crea un instalable de un plugin instalado |
|
3 |
install_package=Instalar un nuevo paquete |
|
4 |
install_package_description=instala un nuevo paquete (plugin, traducciones, tema, etc.) en gvSIG |
|
0 | 5 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/resources/locale/text_en.properties | ||
---|---|---|
1 |
make_plugin_package=Make a plugin installer |
|
2 |
make_plugin_package_description=Create an installer from an installed plugin |
|
3 |
install_package=Install a new bundle |
|
4 |
install_package_description=Installs a new bundle (plugin, translations, theme, etc.) in gvSIG |
|
0 | 5 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/src/main/resources/config/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<libraries library-dir="lib"/> |
|
4 |
<depends plugin-name="org.gvsig.app"/> |
|
5 |
<resourceBundle name="text"/> |
|
6 |
<extensions> |
|
7 |
<extension class-name="org.gvsig.installer.app.extension.creation.MakePluginPackageExtension" |
|
8 |
description="This extension is used to create a bundle for a plugin package from the current gvSIG application." |
|
9 |
active="true"> |
|
10 |
<menu text="tools/Development/make_plugin_package" |
|
11 |
tooltip="make_plugin_package_description" |
|
12 |
action-command="" /> |
|
13 |
</extension> |
|
14 |
<extension class-name="org.gvsig.installer.app.extension.execution.InstallPackageExtension" |
|
15 |
description="This extension is used to install a package from a bundle in gvSIG" |
|
16 |
active="true"> |
|
17 |
<menu text="tools/install_package" |
|
18 |
tooltip="install_package_description" |
|
19 |
action-command="" /> |
|
20 |
</extension> |
|
21 |
</extensions> |
|
22 |
</plugin-config> |
|
0 | 23 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.installer.app.extension</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>org.gvsig.installer.app.extension</name> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.installer.app</artifactId> |
|
12 |
<version>2.0-SNAPSHOT</version> |
|
13 |
</parent> |
|
14 |
<profiles> |
|
15 |
<profile> |
|
16 |
<id>gvsig-install</id> |
|
17 |
<activation> |
|
18 |
<activeByDefault>true</activeByDefault> |
|
19 |
</activation> |
|
20 |
<properties> |
|
21 |
<!-- gvSIG installation folder --> |
|
22 |
<gvsig.install.dir>${basedir}/../../build/product</gvsig.install.dir> |
|
23 |
</properties> |
|
24 |
</profile> |
|
25 |
</profiles> |
|
26 |
<dependencies> |
|
27 |
<dependency> |
|
28 |
<groupId>org.gvsig</groupId> |
|
29 |
<artifactId>org.gvsig.app</artifactId> |
|
30 |
</dependency> |
|
31 |
<dependency> |
|
32 |
<groupId>org.gvsig</groupId> |
|
33 |
<artifactId>org.gvsig.andami</artifactId> |
|
34 |
</dependency> |
|
35 |
<dependency> |
|
36 |
<groupId>org.gvsig</groupId> |
|
37 |
<artifactId>org.gvsig.installer.lib.api</artifactId> |
|
38 |
</dependency> |
|
39 |
<dependency> |
|
40 |
<groupId>org.gvsig</groupId> |
|
41 |
<artifactId>org.gvsig.installer.lib.impl</artifactId> |
|
42 |
<scope>runtime</scope> |
|
43 |
</dependency> |
|
44 |
<dependency> |
|
45 |
<groupId>org.gvsig</groupId> |
|
46 |
<artifactId>org.gvsig.installer.lib.spi</artifactId> |
|
47 |
</dependency> |
|
48 |
<dependency> |
|
49 |
<groupId>org.gvsig</groupId> |
|
50 |
<artifactId>org.gvsig.installer.prov.plugin</artifactId> |
|
51 |
</dependency> |
|
52 |
<dependency> |
|
53 |
<groupId>org.gvsig</groupId> |
|
54 |
<artifactId>org.gvsig.installer.swing.api</artifactId> |
|
55 |
</dependency> |
|
56 |
<dependency> |
|
57 |
<groupId>org.gvsig</groupId> |
|
58 |
<artifactId>org.gvsig.installer.swing.impl</artifactId> |
|
59 |
<scope>runtime</scope> |
|
60 |
</dependency> |
|
61 |
</dependencies> |
|
62 |
<properties> |
|
63 |
<build-dir>${basedir}/../../build</build-dir> |
|
64 |
</properties> |
|
65 |
</project> |
|
0 | 66 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/distribution/distribution.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
<formats> |
|
4 |
<format>dir</format> |
|
5 |
</formats> |
|
6 |
<fileSets> |
|
7 |
<fileSet> |
|
8 |
<directory>src/main/resources/config</directory> |
|
9 |
<outputDirectory>${extension.install.dir.name} |
|
10 |
</outputDirectory> |
|
11 |
</fileSet> |
|
12 |
<fileSet> |
|
13 |
<directory>src/main/resources/images</directory> |
|
14 |
<outputDirectory>${extension.install.dir.name}/images |
|
15 |
</outputDirectory> |
|
16 |
</fileSet> |
|
17 |
<fileSet> |
|
18 |
<directory>src/main/resources/about</directory> |
|
19 |
<outputDirectory>${extension.install.dir.name} |
|
20 |
</outputDirectory> |
|
21 |
</fileSet> |
|
22 |
<fileSet> |
|
23 |
<directory>src/main/resources/locale</directory> |
|
24 |
<outputDirectory>${extension.install.dir.name} |
|
25 |
</outputDirectory> |
|
26 |
</fileSet> |
|
27 |
</fileSets> |
|
28 |
<files> |
|
29 |
<file> |
|
30 |
<source>package.info</source> |
|
31 |
<outputDirectory>${extension.install.dir.name} |
|
32 |
</outputDirectory> |
|
33 |
</file> |
|
34 |
</files> |
|
35 |
<dependencySets> |
|
36 |
<dependencySet> |
|
37 |
<outputDirectory>${extension.install.dir.name}/${library-dir} |
|
38 |
</outputDirectory> |
|
39 |
<includes> |
|
40 |
<include>org.gvsig:org.gvsig.installer**</include> |
|
41 |
<include>org.apache.xmlgraphics:batik-gui-util:jar</include> |
|
42 |
</includes> |
|
43 |
</dependencySet> |
|
44 |
</dependencySets> |
|
45 |
</assembly> |
|
0 | 46 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/org.gvsig.installer.app.extension/buildNumber.properties | ||
---|---|---|
1 |
#maven.buildNumber.plugin properties file |
|
2 |
#Mon Nov 08 14:40:56 CET 2010 |
|
3 |
buildNumber=2021 |
|
0 | 4 |
tags/v2_0_0_Build_2021/extensions/org.gvsig.installer.app/distribution/distribution.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
</assembly> |
|
0 | 3 |
Also available in: Unified diff