Ignore:
Timestamp:
2004-07-16T13:48:18+12:00 (20 years ago)
Author:
davidb
Message:

General restructuring to allow GLI to be run as an applet.
Main area of change: making code look in the JAR file first
for a file rather than assume on local file system.
Stores data locally on system in '.gli' or Greenstone/GLI
folder in users home space for subsequent uses of applet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/Configuration.java

    r7696 r7739  
    6767    static final private String ARGUMENT_NAME = "name";
    6868    /** The name of the general Gatherer configuration file. */
    69     static final private String CONFIG_XML = "config.xml";
     69    static public String CONFIG_XML = "config.xml";
    7070    /** The name of the general Gatherer configuration file for running with GS3. */
    71     static final private String GS3_CONFIG_XML = "config3.xml";
     71    static public String GS3_CONFIG_XML = "config3.xml";
    7272
    7373    static final private String CURRENT_CONFIGURATION_VERSION = "2.51u";
     
    8787    static final private String OTHER_INFO = "Info";
    8888    /** The name of the general Gatherer configuration template. */
    89     static final private String TEMPLATE_CONFIG_XML = "xml/config.xml";
     89    static public String TEMPLATE_CONFIG_XML = "xml/config.xml";
    9090    /** The first of three patterns used during tokenization, this pattern handles a comma separated list. */
    9191    static final private String TOKENIZER_PATTERN1 = " ,\n\t";
     
    191191        Gatherer.println("exec_address != null -> " + exec_address);
    192192    }
     193
    193194    ///ystem.err.println("Perl path.");
    194195    this.perl_path = perl_path;
    195196    // Ensure the perl path includes exe under windoze
    196     if(Utility.isWindows() && !perl_path.toLowerCase().endsWith(".exe")) {
    197         if(!perl_path.endsWith(File.separator)) {
    198         perl_path = perl_path + File.separator;
    199         }
    200         perl_path = perl_path + "perl.exe";
     197    if (!Gatherer.isGsdlRemote) {
     198        if(Utility.isWindows() && !perl_path.toLowerCase().endsWith(".exe")) {
     199        if(!perl_path.endsWith(File.separator)) {
     200            perl_path = perl_path + File.separator;
     201        }
     202        perl_path = perl_path + "perl.exe";
     203        }
    201204    }
    202205
     
    215218        config_xml = new File(config_xml_name);
    216219        if(config_xml.exists()) {
    217         general_config = Utility.parse(config_xml_name, false);
     220        general_config = Utility.parse(config_xml_name, true);
    218221        }
    219222    }
Note: See TracChangeset for help on using the changeset viewer.