Changeset 10330


Ignore:
Timestamp:
2005-07-27T16:38:09+12:00 (19 years ago)
Author:
kjdon
Message:

gsdl3 mode now has two args: -gsdl3 which is gsdl3home (the web dir) and -gsdl3src, which is the gsdl3 directory. so Configuration has an extra param to the constructor, etc

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
7 edited

Legend:

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

    r10006 r10330  
    9999    /** The path to the Greenstone Suite installation directory. */
    100100    static public String gsdl_path = "";
    101     /** If we are using GLI in Greenstone 3, the path to gsdl3 directory */
     101    /** If we are using GLI in Greenstone 3, the path to gsdl3 home (== web dir) */
    102102    static public String gsdl3_path = "";
     103    /** If we are using GLI in Greenstone 3, the path to gsdl3 src directory (== gsdl3 dir)*/
     104    static public String gsdl3_src_path = "";
    103105    /** The path to the PERL executable, up to and including Perl.exe. */
    104106    static public String perl_path = "";
     
    132134    /** Constructor.
    133135     * @param gsdl_path The path to the Greenstone directory as a <strong>String</strong>.
    134      * @param gsdl3_path The path to the Greenstone 3 directory as a <strong>String</strong>.
     136     * @param gsdl3_path The path to the Greenstone 3 home (web) directory as a <strong>String</strong>.
     137     * @param gsdl3_src_path The path to the Greenstone 3 src directory as a <strong>String</strong>.
    135138     * @param site_name The name of the Greenstone 3 site currently in use.
    136139     */
    137     public Configuration(String gsdl_path, String gsdl3_path, String site_name)
     140    public Configuration(String gsdl_path, String gsdl3_path, String gsdl3_src_path, String site_name)
    138141    {
    139142    super();
     
    142145    this.gsdl_path = gsdl_path;
    143146    this.gsdl3_path = gsdl3_path;
     147    this.gsdl3_src_path = gsdl3_src_path;
    144148    this.site_name = site_name;
    145149
     
    679683
    680684    static public String getGS3ScriptPath() {
    681     return gsdl3_path + "bin" + File.separator + "script" + File.separator;
     685    return gsdl3_src_path + "bin" + File.separator + "script" + File.separator;
    682686    }
    683687
  • trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r10250 r10330  
    204204    }
    205205
    206     init(go.gsdl_path, go.gsdl3_path, go.local_library_path, go.library_url_string, go.debug,
     206    init(go.gsdl_path, go.gsdl3_path, go.gsdl3_src_path, go.local_library_path, go.library_url_string, go.debug,
    207207         go.perl_path, go.no_load, go.filename, go.site_name, go.servlet_path, go.wget_path);
    208208    }
    209209
    210210
    211     public void init(String gsdl_path, String gsdl3_path, String local_library_path,
     211    public void init(String gsdl_path, String gsdl3_path, String gsdl3_src_path, String local_library_path,
    212212             String library_url_string, boolean debug_enabled, String perl_path,
    213213             boolean no_load, String open_collection,
     
    218218    } else {
    219219        gsdl3_path = null;
     220        gsdl3_src_path = null;
    220221    }
    221222
     
    236237    try {
    237238        // Load GLI config file
    238         new Configuration(gsdl_path, gsdl3_path, site_name);
     239        new Configuration(gsdl_path, gsdl3_path, gsdl3_src_path, site_name);
    239240        if (Configuration.just_updated_config_xml_file) {
    240241        // Delete the plugins.dat and classifiers.dat files
     
    557558    static public String getSitesDirectoryPath()
    558559    {
    559     return Configuration.gsdl3_path + File.separator + "web" + File.separator + "sites" + File.separator;
     560    return Configuration.gsdl3_path + "sites" + File.separator;
    560561    }
    561562
  • trunk/gli/src/org/greenstone/gatherer/GetOpt.java

    r10242 r10330  
    4242    public String gsdl_path = null;
    4343    public String gsdl3_path = null;
     44    public String gsdl3_src_path = null;
    4445    public String library_url_string = null;
    4546    public String local_library_path = null;
     
    154155            }
    155156            }
     157            // GSDL3 src path
     158            if(argument_name.equals(StaticStrings.GSDL3_SRC_ARGUMENT)) {
     159            if(argument_value.endsWith(File.separator)) {
     160                gsdl3_src_path = argument_value;
     161            }
     162            else {
     163                gsdl3_src_path = argument_value + File.separator;
     164            }
     165            }
     166           
    156167            else if (argument_name.equals(StaticStrings.SITE_ARGUMENT)) {
    157168            site_name = argument_value;
  • trunk/gli/src/org/greenstone/gatherer/ServletConfiguration.java

    r10006 r10330  
    6767   
    6868    //String web_xml_path = gsdl3_path + File.separator + "web" + File.separator + "WEB-INF"+ File.separator + "web.xml";
    69     File web_xml = new File(gsdl3_path + File.separator + "web" + File.separator + "WEB-INF"+ File.separator + "web.xml");
     69    File web_xml = new File(gsdl3_path + "WEB-INF"+ File.separator + "web.xml");
    7070
    7171    if (!web_xml.exists()) {
  • trunk/gli/src/org/greenstone/gatherer/gems/GEMS.java

    r10013 r10330  
    177177    this.self = this;
    178178    JarTools.initialise(this);
    179     config = new Configuration(gsdl_path, null, null);
     179    config = new Configuration(gsdl_path, null, null, null);
    180180
    181181    // Read Dictionary
  • trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java

    r10006 r10330  
    116116    static final public String GSDL_ARGUMENT                              = "-gsdl";
    117117    static final public String GSDL3_ARGUMENT                              = "-gsdl3";
     118    static final public String GSDL3_SRC_ARGUMENT                         = "-gsdl3src";
    118119    static final public String HFILE_ARGUMENT                             = "-hfile";
    119120    static final public String HIDDENGLI_ELEMENT                          = "HiddenGLI";
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r10250 r10330  
    443443
    444444    static public String getSitesDir(String gsdl3_path) {
    445     return gsdl3_path + File.separator + "web"
    446         + File.separator + "sites" + File.separator;
     445    return gsdl3_path + "sites" + File.separator;
    447446
    448447    }
Note: See TracChangeset for help on using the changeset viewer.