Revision 42685

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/Launcher.java
3636 3636
            if (line.hasOption("installURLFile")) {
3637 3637
                installURLFile = line.getOptionValue("installURLFile");
3638 3638
            } else {
3639
                installURLFile = myArgs[1] + "/org.gvsig.installer.app.mainplugin/defaultDownloadsURLs";
3639
                installURLFile = "gvsig-installer-urls.config";
3640 3640
            }
3641 3641

  
3642 3642
            if (!hasAllMandatoryOptions) {
......
3662 3662
        initializeInstallerManager();
3663 3663

  
3664 3664
        InstallerManager installerManager = InstallerLocator.getInstallerManager();
3665
        
3666
//        try {
3667
//            logger.info("Loading plugins configurations");
3668
//            this.loadPluginConfigs();
3669
//        } catch (Throwable ex) {
3670
//            logger.warn("Can't load plugins configurations", ex);
3671
//        }
3672
//
3673
//        try {
3674
//            logger.info("Loading plugins");
3675
//            this.loadPluginServices();
3676
//        } catch (Throwable ex) {
3677
//            logger.warn("Can't load plugins", ex);
3678
//        }
3665 3679

  
3666
        try {
3667
            logger.info("Loading plugins configurations");
3668
            this.loadPluginConfigs();
3669
        } catch (Throwable ex) {
3670
            logger.warn("Can't load plugins configurations", ex);
3671
        }
3672

  
3673
        try {
3674
            logger.info("Loading plugins");
3675
            this.loadPluginServices();
3676
        } catch (Throwable ex) {
3677
            logger.warn("Can't load plugins", ex);
3678
        }
3679

  
3680 3680
        AndamiConfig config = getAndamiConfig();
3681 3681

  
3682 3682
        initializeIdentityManagement(new File(config.getPluginsDirectory()).getAbsoluteFile());
3683 3683

  
3684 3684
        initializeLibraries();
3685 3685

  
3686
//        config.setLocaleLanguage(locale.getLanguage());
3687
//        config.setLocaleCountry(locale.getCountry());
3688
//        config.setLocaleVariant(locale.getVariant());
3689 3686
        packageInfo = getPackageInfo(myArgs[1]);
3690 3687

  
3691 3688
        // set the gvSIG version to the install manager, to compose the download URL
trunk/org.gvsig.desktop/org.gvsig.desktop.installer/org.gvsig.desktop.installer.izpack/src/main/izpack/include/pack_all_platforms.xml
1
 
1

  
2 2
    <pack name="gvSIG desktop commons" required="yes">
3 3
      <description>Core common files for all platforms</description>
4 4
      <file src="${product.folder}/gvSIG.sh" targetdir="$INSTALL_PATH"/>
......
12 12
      <file src="${product.folder}/LEEME.txt" targetdir="$INSTALL_PATH"/>
13 13
      <file src="${product.folder}/LICENSE.txt" targetdir="$INSTALL_PATH"/>
14 14
      <file src="${product.folder}/README.txt" targetdir="$INSTALL_PATH"/>
15
      
15
      <file src="${product.folder}/gvsig-installer-urls.config" targetdir="$INSTALL_PATH"/>
16

  
16 17
      <fileset dir="${product.folder}/update" targetdir="${INSTALL_PATH}/update" override="true"/>
17 18
      <fileset dir="${product.folder}/i18n" targetdir="${INSTALL_PATH}/i18n" override="true"/>
18 19
      <fileset dir="${product.folder}/install" targetdir="${INSTALL_PATH}/install" override="true"/>
......
21 22
      <fileset dir="${product.folder}/icon-theme" targetdir="${INSTALL_PATH}/icon-theme" override="true"/>
22 23
      <fileset dir="${product.folder}/native" targetdir="${INSTALL_PATH}/native" override="true"/>
23 24
      <fileset dir="${product.folder}/tools" targetdir="${INSTALL_PATH}/tools" override="true"/>
24
      <fileset dir="${product.folder}/gvSIG/extensiones/org.gvsig.coreplugin.app.mainplugin" targetdir="${INSTALL_PATH}/gvSIG/extensiones/org.gvsig.coreplugin.app.mainplugin" override="true"/>
25
      <fileset dir="${product.folder}/gvSIG/extensiones/org.gvsig.installer.app.mainplugin" targetdir="${INSTALL_PATH}/gvSIG/extensiones/org.gvsig.installer.app.mainplugin" override="true"/>
25

  
26 26
      <file src="${product.folder}/gvSIG/README.txt" targetdir="${INSTALL_PATH}/gvSIG"/>
27
      
28
      <executable targetfile="$INSTALL_PATH/gvSIG.sh" stage="never" keep="true"/>      
27

  
28
      <executable targetfile="$INSTALL_PATH/gvSIG.sh" stage="never" keep="true"/>
29 29
    </pack>
30
    
30

  
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageExtension.java
32 32
import java.io.InputStream;
33 33
import java.io.InputStreamReader;
34 34
import java.net.MalformedURLException;
35
import java.util.logging.Level;
36 35

  
37 36
import org.gvsig.andami.IconThemeHelper;
38
import org.gvsig.andami.Launcher;
39 37
import org.gvsig.andami.PluginServices;
40 38
import org.gvsig.andami.PluginsLocator;
41 39
import org.gvsig.andami.PluginsManager;
......
149 147
                    .getSwingInstallerManager();
150 148

  
151 149
            try {
150
                manager.setDefaultDownloadURL(
151
                        new File( pm.getApplicationFolder(),"gvsig-installer-urls.config")
152
                );
153
                manager.setDefaultDownloadURL(
154
                        new File( pm.getPlugin(this).getPluginDirectory(),"defaultDownloadsURLs")
155
                );
152 156
                if (packageInfo != null && (packageInfo.getState().startsWith(InstallerManager.STATE.BETA)
153 157
                        || packageInfo.getState().startsWith(InstallerManager.STATE.RC)
154 158
                        || packageInfo.getState().equalsIgnoreCase(InstallerManager.STATE.FINAL))) {
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/pom.xml
46 46
        <groupId>org.slf4j</groupId>
47 47
        <artifactId>slf4j-api</artifactId>
48 48
        <scope>compile</scope>
49
    </dependency>        
49
    </dependency>
50 50

  
51 51
  </dependencies>
52 52

  
......
62 62
            <skipTests>true</skipTests>
63 63
          </configuration>
64 64
        </plugin>
65
        
66
          <plugin>
67
            <groupId>org.codehaus.gmaven</groupId>
68
            <artifactId>gmaven-plugin</artifactId>
69
            <executions>        
70
             <execution>
71
		  <id>install-installer-urls</id>
72
		  <phase>install</phase>
73
                    <goals>
74
                      <goal>execute</goal>
75
                    </goals>
76
                <configuration>
77
		      <source><![CDATA[
78
  if( project.properties["buildNumber"] != null) {
79
    if( project.properties["gvsig.install.plugin"]=="true" ) {
80
      // Copy defaultDownloadsURLs to install root
81
      ant = new AntBuilder()
82
      source = project.properties["gvsig.product.folder.path"] +
83
	"/gvSIG/extensiones/" +
84
	project.properties["gvsig.package.info.code"] +
85
	"/defaultDownloadsURLs"
65 86

  
87
      target = project.properties["gvsig.product.folder.path"] +
88
	"/gvsig-installer-urls.config"
89
      log.info("Copy plugin 'gvsig-installer-urls.config' from " + source + " to " + target)
90
      ant.copy(file:source, tofile:target)
91
    }
92
  }
93
		    ]]></source>
94
		  </configuration>
95
	      </execution>
96

  
97
            </executions>
98
          </plugin>        
99
        
66 100
      </plugins>
67 101
  </build>
68 102

  
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/DefaultSwingInstallerManager.java
370 370
	}
371 371

  
372 372
	public void setDefaultDownloadURL(File defaultDownloadURLs) {
373
                if( defaultDownloadURLs == null || !defaultDownloadURLs.exists() ) {
374
                    return;
375
                }
373 376
		InputStream is;
374 377
		try {
375 378
			is = new FileInputStream(defaultDownloadURLs);
376 379
		} catch (FileNotFoundException e1) {
377
			logger.error(
378
					"Can't open the file " + defaultDownloadURLs.getName(), e1);
380
			logger.warn("Can't open the file " + defaultDownloadURLs.getName(), e1);
379 381
			return;
380 382
		}
381 383
		BufferedReader in = new BufferedReader(new InputStreamReader(is));
......
385 387
				try {
386 388
					this.addDefaultDownloadURL(line);
387 389
				} catch (MalformedURLException e) {
388
					logger.error(
390
					logger.warn(
389 391
							"Error creating the default packages download URL pointing to "
390 392
									+ line, e);
391 393
				}
392 394
			}
393 395
		} catch (IOException e) {
394
			logger.error("Error reading the file "
396
			logger.warn("Error reading the file "
395 397
					+ defaultDownloadURLs.getName(), e);
396 398
		}
397 399
	}

Also available in: Unified diff