Changeset 24876 for main/trunk


Ignore:
Timestamp:
2011-12-09T18:45:24+13:00 (12 years ago)
Author:
ak19
Message:

Fifth set of commits to do with the migration of cgi-bin into common-src, so that upon make install, common-src\cgi-bin will be installed in cgi-bin\GSDLOS(GSDLARCH). The first commit was of changes to files in cgi-bin itself. The second commit was moving cgi-bin. The third one involves changes to all the files in GS2 referring to cgi-bin where this needs to be changed to cgi-bin\OS_and_ARCH. The fourth change is to affected references to cgi-bin in GLI. This (fifth change) is changes to server.jar, where Server2.jar was affected (and which required changes to gs2-webserver.bat and gs2-server.sh)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/server/Server2.java

    r24614 r24876  
    3535   
    3636    protected String libraryURL;
    37     protected String property_prefix;
     37    protected String property_prefix;
     38    protected String gsdlos_gsdlarch;
    3839   
    3940    private class QuitListener extends Thread
     
    106107
    107108
    108     public Server2(String gsdl2_home, String lang, String configfile, int quitPort, String mode)
     109    public Server2(String gsdl2_home, String gsdlos_arch, String lang, String configfile, int quitPort, String mode)
    109110    {
    110111    super(gsdl2_home, lang, configfile, "etc"+File.separator+"logs-gsi");   
     
    112113
    113114    //logger_.error("gsdlhome: " + gsdl2_home + " | lang: " + lang + " | configfile: "
    114         //+ configfile + " | mode: " + property_prefix + " | quitport: " + quitPort);
    115    
     115        //+ configfile + " | gsdlos_gsdlarch: " + gsdlos_arch + " | mode: " + property_prefix + " | quitport: " + quitPort);
     116   
     117    // to get to the OS specific subdirectory of cgi-bin
     118    gsdlos_gsdlarch = gsdlos_arch;
     119
    116120    // property_prefix is the mode we're running in (gli or empty) and contains the prefix
    117121    // string to look for in config file for auto_enter, start_browser and url properties
     
    248252    // get the prefix from the gsdlsite.cfg and build.properties files (port number and servername)
    249253    try{
    250         File gsdlsite_cfg = new File(gsdl_home + File.separator + "cgi-bin" + File.separator + "gsdlsite.cfg");
     254        File gsdlsite_cfg = new File(gsdl_home + File.separator + "cgi-bin" + File.separator
     255                     + gsdlos_gsdlarch + File.separator + "gsdlsite.cfg");
    251256        FileInputStream fin = new FileInputStream(gsdlsite_cfg);
    252257        Properties gsdlProperties = new Properties();
     
    454459    }
    455460   
     461    String gsdlos_arch = args[1];
     462
    456463    //for(int i = 0; i < args.length; i++) { System.err.println("Arg[" + i + "]: |" + args[i] + "|");   }
    457464   
    458465    // for every subsequent argument, check whether we're dealing with amalgamated
    459466    // parameters in that argument. If so, split on whitespace and reconstruct arguments
    460     for(int i = 1; i < args.length; i++) {
     467    for(int i = 2; i < args.length; i++) {
    461468   
    462469        // if the *last* occurrence of a flag parameter is not at the start of
     
    493500    String lang = "en";
    494501   
    495     int index = 1; // move onto any subsequent arguments (past 1st GSDLHOME arg)
     502    int index = 2; // move onto any subsequent arguments (past 1st GSDLHOME arg and 2nd GSDLOS_GSDLARCH arg)
    496503    if (args.length > index && !args[index].startsWith("--")) {
    497504        lang = args[index]; // 2nd arg is not a flag option, so must be language
     
    535542    //System.err.println("\n\n*******\n\ngsdlhome: " + gsdl2_home + " | lang: " + lang + " |configfile:"
    536543    //  + configfile + "| mode: " + mode + " | quitport: " + port + "\n\n*************\n");
    537     new Server2(gsdl2_home, lang, configfile, port, mode);
     544    new Server2(gsdl2_home, gsdlos_arch, lang, configfile, port, mode);
    538545    }
    539546}
Note: See TracChangeset for help on using the changeset viewer.