Revision 40142

View differences:

tags/extensions/org.gvsig.installer.app/2.0/buildNumber.properties
1
#maven.buildNumber.plugin properties file
2
#Fri Feb 08 11:25:57 CET 2013
3
buildNumber=2082
tags/extensions/org.gvsig.installer.app/2.0/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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
	<modelVersion>4.0.0</modelVersion>
5
	<artifactId>org.gvsig.installer.app</artifactId>
6
	<packaging>pom</packaging>
7
	<version>2.0</version>
8
	<name>org.gvsig.installer.app</name>
9
	<description>gvSIG plugin to create a installers or install plugins in gvSIG</description>
10
	
11
	<url>https://devel.gvsig.org/redmine/projects/gvsig-desktop</url>
12
	
13
    <parent>
14
        <groupId>org.gvsig</groupId>
15
        <artifactId>org.gvsig.maven.base.extension.pom</artifactId>
16
        <version>1.0.9</version>
17
    </parent>
18
    <scm>
19
        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/tags/extensions/org.gvsig.installer.app/2.0</connection>
20
        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/tags/extensions/org.gvsig.installer.app/2.0</developerConnection>
21
        <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/tags/extensions/org.gvsig.installer.app/2.0</url>
22
    </scm>
23
	<developers>
24
		<developer>
25
			<id>jjdelcerro</id>
26
			<name>Joaqu?n Jos? del Cerro</name>
27
			<email>jjdelcerro@gvsig.org</email>
28
			<roles>
29
				<role>Architect</role>
30
			</roles>
31
		</developer>
32
		<developer>
33
			<id>jpiera</id>
34
			<name>Jorge Piera Llodr?</name>
35
			<email>jpiera@gvsig.org</email>
36
			<roles>
37
				<role>Architect</role>
38
				<role>Developer</role>
39
			</roles>
40
		</developer>
41
	</developers>
42
	<repositories>
43
		<repository>
44
			<id>gvsig-public-http-repository</id>
45
			<name>gvSIG maven public HTTP repository</name>
46
            <url>http://devel.gvsig.org/m2repo/j2se</url>
47
			<releases>
48
				<enabled>true</enabled>
49
				<updatePolicy>daily</updatePolicy>
50
				<checksumPolicy>warn</checksumPolicy>
51
			</releases>
52
			<snapshots>
53
				<enabled>true</enabled>
54
				<updatePolicy>daily</updatePolicy>
55
				<checksumPolicy>warn</checksumPolicy>
56
			</snapshots>
57
		</repository>
58
	</repositories>
59
    <dependencyManagement>
60
        <dependencies>          
61
            <dependency>
62
                <groupId>org.gvsig</groupId>
63
                <artifactId>org.gvsig.core.maven.dependencies</artifactId>
64
                <version>2.0.1</version>
65
                <type>pom</type>
66
                <scope>import</scope>
67
            </dependency>
68
        </dependencies>
69
    </dependencyManagement>
70
    
71
    <build>
72
    	<plugins>
73
		    <plugin>
74
		      <artifactId>maven-release-plugin</artifactId>
75
		      <version>2.0</version>
76
		      <configuration>
77
		        <tagBase>https://devel.gvsig.org/svn/gvsig-desktop/tags/extensions/${artifactId}</tagBase>
78
		      </configuration>
79
		    </plugin>			
80
    	</plugins>
81
    </build>
82
    
83
	<modules>
84
		<module>org.gvsig.installer.app.extension</module>
85
	</modules>
86
	<properties>
87
		<package.info.state>final</package.info.state>
88
		<!-- alpha-devel -->
89
	</properties>
90
</project>
0 91

  
tags/extensions/org.gvsig.installer.app/2.0/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
		<fileSet>
28
			<directory>src/main/resources</directory>
29
			<outputDirectory>${extension.install.dir.name}
30
			</outputDirectory>
31
		</fileSet>	
32
	</fileSets>
33
	<files>
34
		<file>
35
			<source>package.info</source>
36
			<outputDirectory>${extension.install.dir.name}
37
			</outputDirectory>
38
		</file>
39
	</files>
40
	<dependencySets>
41
		<dependencySet>
42
			<outputDirectory>${extension.install.dir.name}/${library-dir}
43
			</outputDirectory>
44
			<includes>
45
				<include>org.gvsig:org.gvsig.installer.app.extension:jar</include>		
46
			</includes>
47
		</dependencySet>		
48
	</dependencySets>
49
</assembly>
0 50

  
tags/extensions/org.gvsig.installer.app/2.0/org.gvsig.installer.app.extension/buildNumber.properties
1
#maven.buildNumber.plugin properties file
2
#Fri Feb 08 11:25:57 CET 2013
3
buildNumber=2076
tags/extensions/org.gvsig.installer.app/2.0/org.gvsig.installer.app.extension/src/main/resources/locale/text.properties
1
make_plugin_package=Crear paquete instalaci?n de plugin
2
make_plugin_package_description=Crea un paquete de instalaci?n de un plugin instalado
3
addons_manager=Administrador de complementos
4
addons_manager_description=Muestra el administrador de complementos (plugin, traducciones, temas, etc.) de gvSIG
5
_select_an_option=Seleccione una opci?n
6
_Cant_install_packege=No se puede instalar el paquete
7
_Finished=Finalizado
8
_this_is_not_an_official_package=Este no es un paquete oficial
9
_this_is_not_a_final_package=Este no es un paquete final
10
_Creating_index=Creando ?ndice
11
_Compressing=Comprimiendo
12
_Cant_create_package=No se puede crear el paquete
13
_Installer_progress=Progreso de instalaci?n
14
_Cant_download_package_files=No se pueden descargar los archivos del paquete
15
_Downloading=Descargando
16
_Downloading_error=Error descargando
17
_Download_progress=Progreso de descarga
18
_Start_download=Iniciar descarga
0 19

  
tags/extensions/org.gvsig.installer.app/2.0/org.gvsig.installer.app.extension/src/main/resources/locale/text_en.properties
1
make_plugin_package=Create plugin installation package
2
make_plugin_package_description=Create an installation package from an already installed plugin
3
addons_manager=Addons manager
4
addons_manager_description=Show the addons manager
5
_select_an_option=Select an option
6
_Cant_install_packege=Can't install package
7
_Finished=Finished
8
_this_is_not_an_official_package=This is not an official package
9
_this_is_not_a_final_package=This is not a final package
10
_Creating_index=Creating index
11
_Compressing=Compressing
12
_Cant_create_package=Can't create package
13
_Installer_progress=Installation progress
14
_Cant_download_package_files=Can't download package files
15
_Downloading=Downloading
16
_Downloading_error=Downloading error
17
_Download_progress=Download progress
18
_Start_download=Start download
19

  
0 20

  
tags/extensions/org.gvsig.installer.app/2.0/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
			<action 
11
			    name= "tools-devel-pack-plugin"
12
				label="_pack_plugin"
13
				tooltip="_Create_a_package_of_a_plugin"
14
				action-command="tools-devel-pack-plugin" 
15
				icon="tools-devel-pack-plugin"
16
				position="908500600"/>
17
				
18
			<menu
19
				name="tools-devel-pack-plugin" 
20
				text="tools/Development/make_plugin_package"
21
				 />			
22
		</extension>
23
		
24
			<extension class-name="org.gvsig.installer.app.extension.execution.InstallPackageExtension"
25
			description="This extension is used to install a package from a bundle in gvSIG"
26
			active="true">
27

  
28
			<action 
29
			    name= "tools-addonsmanager"
30
				label="_addons_manager"
31
				tooltip="_show_the_addons_manager"
32
				action-command="tools-addonsmanager" 
33
				icon="tools-addonsmanager"
34
				position="900100000"/>
35

  
36
			<menu
37
				name="tools-addonsmanager" 
38
				text="tools/addons_manager"
39
				/>			
40
		</extension>
41
	</extensions>
42
</plugin-config>
0 43

  
tags/extensions/org.gvsig.installer.app/2.0/org.gvsig.installer.app.extension/src/main/resources/defaultDownloadsURLs
1
http://downloads.gvsig.org/download/gvsig-desktop/
2
http://downloads.gvsig.org/download/gvsig-desktop/dists/<%Version%>/builds/<%Build%>/packages.gvspki
3
http://gis-lab.info/programs/gvsig/gvsig-desktop
4
http://www.i3geo.com.br/gvsig/gvsig-desktop
5
http://www.geocuba.mirrors.gvsig2/gvsig-desktop
6
http://download.osgeo.org/gvsig/gvsig-desktop
7
http://www.lapig.iesa.ufg.br/ftp/gvSIG/gvsig-desktop
8
http://elogeo.nottingham.ac.uk/gvsig/gvsig-desktop
tags/extensions/org.gvsig.installer.app/2.0/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&aacute;</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/extensions/org.gvsig.installer.app/2.0/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.io.BufferedReader;
31
import java.io.InputStream;
32
import java.io.InputStreamReader;
33
import java.net.MalformedURLException;
34

  
35
import org.gvsig.andami.IconThemeHelper;
36
import org.gvsig.andami.PluginServices;
37
import org.gvsig.andami.PluginsLocator;
38
import org.gvsig.andami.PluginsManager;
39
import org.gvsig.andami.plugins.Extension;
40
import org.gvsig.app.ApplicationLocator;
41
import org.gvsig.app.ApplicationManager;
42
import org.gvsig.app.extension.InitializeApplicationExtension;
43
import org.gvsig.app.extension.Version;
44
import org.gvsig.installer.lib.api.InstallerLocator;
45
import org.gvsig.installer.lib.api.InstallerManager;
46
import org.gvsig.installer.lib.api.PackageInfo;
47
import org.gvsig.installer.swing.api.SwingInstallerLocator;
48
import org.gvsig.installer.swing.api.SwingInstallerManager;
49

  
50
import org.slf4j.Logger;
51
import org.slf4j.LoggerFactory;
52

  
53
/**
54
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
55
 */
56
public class InstallPackageExtension extends Extension {
57

  
58
	private static final Logger LOG = LoggerFactory
59
			.getLogger(InstallPackageExtension.class);
60

  
61
	public void execute(String actionCommand) {
62
		if ("tools-addonsmanager".equalsIgnoreCase(actionCommand)) {
63
			PluginsManager manager = PluginsLocator.getManager();
64
			try {
65
				PluginServices.getMDIManager().addCentredWindow(
66
						new InstallPackageWindow(
67
								manager.getApplicationFolder(), manager
68
										.getInstallFolder()));
69
			} catch (Error e) {
70
				LOG.error("Error creating the wizard to install a package ", e);
71
			} catch (Exception e) {
72
				LOG.error("Error creating the wizard to install a package ", e);
73
			}
74
		}
75
	}
76

  
77
	public void initialize() {
78
	    ApplicationManager application = ApplicationLocator.getManager(); 
79
		Version version = application.getVersion();
80
		
81
		InstallerLocator.getInstallerManager().setVersion(version.asInstallerVersion());
82
		try {
83
			IconThemeHelper.registerIcon("action", "tools-addonsmanager", this);
84
	    	
85
			SwingInstallerManager manager = SwingInstallerLocator
86
					.getSwingInstallerManager();
87
			
88
			try {
89
	            PluginsManager pm = PluginsLocator.getManager();
90
	            PackageInfo packageInfo = pm.getPackageInfo(InitializeApplicationExtension.class);
91
	                
92
	             if( packageInfo!=null && (packageInfo.getState().startsWith(InstallerManager.STATE.BETA) ||
93
	                    packageInfo.getState().startsWith(InstallerManager.STATE.RC) ||
94
	                    packageInfo.getState().equalsIgnoreCase(InstallerManager.STATE.FINAL)) ) {
95

  
96
	                    String installURL = manager.getInstallerManager().getDownloadBaseURL().toString()
97
	                        + "dists/<%Version%>/builds/<%Build%>/packages.gvspki";   
98
	                    manager.addDefaultDownloadURL(installURL);
99
	                }
100
			} catch (Throwable th) {
101
			    LOG.info("Error. Can't select default gvspki", th);
102
			}
103
	         
104
			InputStream is = this.getClass().getResourceAsStream(
105
					"/defaultDownloadsURLs");
106
			BufferedReader in = new BufferedReader(new InputStreamReader(is));
107
			String line = null;
108
			for (line = in.readLine(); line != null; line = in.readLine()) {
109
				try {
110
					manager.addDefaultDownloadURL(line);
111
				} catch (MalformedURLException e) {
112
					LOG.error(
113
							"Error creating the default packages download URL pointing to "
114
									+ line, e);
115
				}
116
			}
117
			manager.getInstallerManager().setVersion(version.getFormat());
118
		} catch (Throwable e) {
119
			LOG.error("Error reading the default packages download URL file "
120
					+ "/defaultDownloadsURLs", e);
121
		}
122
	}
123

  
124
	public boolean isEnabled() {
125
		return true;
126
	}
127

  
128
	public boolean isVisible() {
129
		return true;
130
	}
131

  
132
}
0 133

  
tags/extensions/org.gvsig.installer.app/2.0/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.AbstractInstallPackageWizard;
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&aacute;</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 installFolder)
54
			throws LocatorException, InstallPackageWizardException {
55
		super();
56
		AbstractInstallPackageWizard installPackageWizard = SwingInstallerLocator
57
				.getSwingInstallerManager().createInstallPackageWizard(
58
						applicationFolder, installFolder);
59
		installPackageWizard
60
				.setWizardActionListener(new WindowInstallerListener(this));
61
		this.setLayout(new BorderLayout());
62
		add(installPackageWizard, BorderLayout.CENTER);
63
	}
64

  
65
	public WindowInfo getWindowInfo() {
66
		if (windowInfo == null) {
67
			windowInfo = new WindowInfo(WindowInfo.MODELESSDIALOG
68
					| WindowInfo.ICONIFIABLE | WindowInfo.RESIZABLE);
69
			Dimension dim = getPreferredSize();
70
			windowInfo.setWidth((int) dim.getWidth());
71
			windowInfo.setHeight((int) dim.getHeight());
72
			windowInfo.setTitle(Messages.getText("install_package"));
73
		}
74
		return windowInfo;
75
	}
76

  
77
	public Object getWindowProfile() {
78
		return WindowInfo.DIALOG_PROFILE;
79
	}
80

  
81
}
0 82

  
tags/extensions/org.gvsig.installer.app/2.0/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.PluginsLocator;
35
import org.gvsig.andami.PluginsManager;
36
import org.gvsig.andami.plugins.Extension;
37
import org.gvsig.app.ApplicationLocator;
38
import org.gvsig.app.extension.Version;
39
import org.gvsig.installer.swing.api.SwingInstallerLocator;
40

  
41
/**
42
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
43
 */
44
public class MakePluginPackageExtension extends Extension {
45

  
46
	private static final Logger LOG = LoggerFactory
47
			.getLogger(MakePluginPackageExtension.class);
48

  
49
	public void execute(String actionCommand) {
50
		if ("tools-devel-pack-plugin".equalsIgnoreCase(actionCommand)) {
51
			PluginsManager manager = PluginsLocator.getManager();
52

  
53
			try {
54
				PluginServices.getMDIManager().addCentredWindow(
55
						new MakePluginPackageWindow(manager
56
								.getApplicationFolder(), manager
57
								.getInstallFolder()));
58
			} catch (Exception e) {
59
				LOG.error("Error creating teh wizard to create an installer ",
60
						e);
61
			}
62
		}
63
	}
64

  
65
	public void initialize() {
66

  
67
	}
68

  
69
	@Override
70
	public void postInitialize() {
71
		super.postInitialize();
72
		Version version = ApplicationLocator.getManager().getVersion();
73
		SwingInstallerLocator.getSwingInstallerManager().setApplicationVersion(
74
				version.getFormat());
75
	}
76

  
77
	public boolean isEnabled() {
78
		return true;
79
	}
80

  
81
	public boolean isVisible() {
82
		return true;
83
	}
84

  
85
}
0 86

  
tags/extensions/org.gvsig.installer.app/2.0/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&aacute;</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 installFolder)
54
			throws LocatorException, MakePluginPackageWizardException {
55
		super();
56
		MakePluginPackageWizard makePluginPackageWizard = SwingInstallerLocator
57
				.getSwingInstallerManager().createMakePluginPackageWizard(
58
						applicationFolder, installFolder);
59
		makePluginPackageWizard
60
				.setWizardActionListener(new WindowInstallerListener(this));
61
		this.setLayout(new BorderLayout());
62
		add(makePluginPackageWizard, BorderLayout.CENTER);
63
	}
64

  
65
	public WindowInfo getWindowInfo() {
66
		if (windowInfo == null) {
67
			windowInfo = new WindowInfo(WindowInfo.MODELESSDIALOG
68
					| WindowInfo.ICONIFIABLE | WindowInfo.RESIZABLE);
69
			Dimension dim = getPreferredSize();
70
			windowInfo.setWidth((int) dim.getWidth());
71
			windowInfo.setHeight((int) dim.getHeight());
72
			windowInfo.setTitle(Messages.getText("make_plugin_package"));
73
		}
74
		return windowInfo;
75
	}
76

  
77
	public Object getWindowProfile() {
78
		return WindowInfo.DIALOG_PROFILE;
79
	}
80
}
0 81

  
tags/extensions/org.gvsig.installer.app/2.0/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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
	<modelVersion>4.0.0</modelVersion>
5
	<artifactId>org.gvsig.installer.app.extension</artifactId>
6
	<packaging>jar</packaging>
7
	<name>Add-ons manager</name>
8
	<parent>
9
		<groupId>org.gvsig</groupId>
10
		<artifactId>org.gvsig.installer.app</artifactId>
11
		<version>2.0</version>
12
	</parent>
13
	<profiles>
14
    	<profile>
15
    		<id>gvsig-install</id>
16
    		<activation>
17
    			<activeByDefault>true</activeByDefault>
18
    		</activation>
19
    		<properties>
20
				<!--  gvSIG installation folder -->
21
    			<gvsig.install.dir>${basedir}/../../build/product</gvsig.install.dir>
22
    		</properties>
23
    	</profile>
24
   	</profiles>
25
	<dependencies>
26
		<dependency>
27
			<groupId>org.gvsig</groupId>
28
			<artifactId>org.gvsig.app</artifactId>
29
            <version>2.0</version>
30
            <scope>compile</scope>
31
		</dependency>
32
        <dependency>
33
            <groupId>org.gvsig</groupId>
34
            <artifactId>org.gvsig.andami</artifactId>
35
            <scope>compile</scope>
36
        </dependency>
37
        <dependency>
38
            <groupId>org.gvsig</groupId>
39
            <artifactId>org.gvsig.tools.lib</artifactId>
40
            <scope>compile</scope>
41
        </dependency>
42
        <dependency>
43
            <groupId>org.gvsig</groupId>
44
            <artifactId>org.gvsig.i18n</artifactId>
45
            <scope>compile</scope>
46
        </dependency>
47
		<dependency>
48
			<groupId>org.gvsig</groupId>
49
			<artifactId>org.gvsig.installer.lib.api</artifactId>
50
			<version>1.0.1</version>
51
            <scope>compile</scope>
52
		</dependency>
53
		<dependency>
54
			<groupId>org.gvsig</groupId>
55
			<artifactId>org.gvsig.installer.lib.impl</artifactId>
56
			<version>1.0.1</version>
57
			<scope>runtime</scope>
58
		</dependency>
59
		<dependency>
60
			<groupId>org.gvsig</groupId>
61
			<artifactId>org.gvsig.installer.lib.spi</artifactId>
62
			<version>1.0.1</version>
63
            <scope>compile</scope>
64
		</dependency>
65
		<dependency>
66
			<groupId>org.gvsig</groupId>
67
			<artifactId>org.gvsig.installer.prov.plugin</artifactId>
68
			<version>1.0.1</version>
69
            <scope>compile</scope>
70
		</dependency>
71
		<dependency>
72
			<groupId>org.gvsig</groupId>
73
			<artifactId>org.gvsig.installer.swing.api</artifactId>
74
			<version>1.0.1</version>
75
            <scope>compile</scope>
76
		</dependency>
77
		<dependency>
78
			<groupId>org.gvsig</groupId>
79
			<artifactId>org.gvsig.installer.swing.impl</artifactId>
80
			<version>1.0.1</version>
81
			<scope>runtime</scope>
82
		</dependency>
83
        <dependency>
84
            <groupId>org.slf4j</groupId>
85
            <artifactId>slf4j-api</artifactId>
86
            <scope>compile</scope>
87
        </dependency>        
88
	</dependencies>
89
	<properties>
90
		<package.info.categories>Addon Management</package.info.categories>
91
	</properties>
92
</project>
0 93

  
tags/extensions/org.gvsig.installer.app/2.0/distribution/distribution.xml
1
<assembly>
2
</assembly>
0 3

  

Also available in: Unified diff