Changeset 10367


Ignore:
Timestamp:
2005-08-01T12:10:30+12:00 (19 years ago)
Author:
mdewsnip
Message:

Added a new "-gliserver_url" command-line option for running a local GLI and using a remote Greenstone for building.

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

Legend:

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

    r10364 r10367  
    132132    }
    133133
    134     // Set the Greenstone path and collect directory specially when running with a remote Greenstone
     134    // If a gliserver URL has been specified, we're using remote building
     135    if (go.gliserver_url_string != null) {
     136        isGsdlRemote = true;
     137        cgiBase = go.gliserver_url_string.substring(0, go.gliserver_url_string.lastIndexOf('/') + 1);
     138
     139        // With remote building we use our own collect directory, since we can't use the Greenstone one
     140        setCollectDirectoryPath(getGLIUserDirectoryPath() + "collect" + File.separator);
     141    }
     142
     143    // Set the Greenstone path specially when running with a remote Greenstone
    135144    if (isGsdlRemote) {
    136145        go.gsdl_path = getGLIUserDirectoryPath();
    137         setCollectDirectoryPath(go.gsdl_path + "collect" + File.separator);
    138146    }
    139147
  • trunk/gli/src/org/greenstone/gatherer/GathererApplet.java

    r10363 r10367  
    118118    // Set some global variables so we know how we're running
    119119    Gatherer.isApplet = true;
    120     Gatherer.isGsdlRemote = true;
    121     String library_cgi = fullLibraryURL(getParameter("gwcgi"));
    122     Gatherer.cgiBase = library_cgi.substring(0, library_cgi.lastIndexOf('/') + 1);
     120    String library_url_string = fullLibraryURL(getParameter("gwcgi"));
     121    String gliserver_url_string = library_url_string.substring(0, library_url_string.lastIndexOf('/') + 1) + "gliserver";
    123122
    124123        // String debug_param = getParameter("debug");
     
    127126        // }
    128127
    129     String[] args = { "-gsdl", gli_user_directory.toString(),
    130               "-library_url", library_cgi,
     128    String[] args = { "-gliserver_url", gliserver_url_string,
     129              "-library_url", library_url_string,
    131130                    };
    132131
  • trunk/gli/src/org/greenstone/gatherer/GetOpt.java

    r10330 r10367  
    4040    public String collect_directory_path = null;
    4141    public String filename = null;
     42    public String gliserver_url_string = null;
    4243    public String gsdl_path = null;
    4344    public String gsdl3_path = null;
     
    189190            library_url_string = argument_value;
    190191            }
     192            // Specify the URL to the gliserver CGI script for remote collection building
     193            else if (argument_name.equals(StaticStrings.GLISERVER_URL_ARGUMENT)) {
     194            gliserver_url_string = argument_value;
     195            }
    191196            // Parse the path to PERL. If not provided it assumes
    192197            // perl should be availble on the PATH.
  • trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java

    r10330 r10367  
    113113    static final public String FORMAT_STR                                 = "format";
    114114    static final public String GLI_ATTRIBUTE                              = "gli";
     115    static final public String GLISERVER_URL_ARGUMENT                     = "-gliserver_url";
    115116    static final public String GREATER_THAN_CHARACTER                     = ">";
    116117    static final public String GSDL_ARGUMENT                              = "-gsdl";
Note: See TracChangeset for help on using the changeset viewer.