Changeset 13016 for trunk/gli


Ignore:
Timestamp:
2006-10-05T17:14:59+13:00 (18 years ago)
Author:
mdewsnip
Message:

Changed to use the GSDLOS argument now passed in, so downloading should now work on all OSs.

Location:
trunk/gli/src/org/greenstone/gatherer/download
Files:
2 edited

Legend:

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

    r12588 r13016  
    245245        else {
    246246        if (proxy_url != null && !proxy_url.equals("")) {           
     247            // Specify proxies as environment variables
     248            // Need to manually specify GSDLHOME and GSDLOS also
    247249            env = new String[4];
    248250                    proxy_url = proxy_url.replaceAll("http://","");
    249251            env[0] = "http_proxy=http://"+proxy_url;
    250252            env[1] = "ftp_proxy=ftp://"+proxy_url;
    251             env[2] = "GSDLHOME="+Configuration.gsdl_path;
    252             env[3] = "GSDLOS="+System.getProperty("os.name");
    253             prcs = rt.exec(cmd,env);
     253            env[2] = "GSDLHOME=" + Configuration.gsdl_path;
     254            env[3] = "GSDLOS=" + Gatherer.client_operating_system;
     255            prcs = rt.exec(cmd, env);
    254256        }
    255         else {       
    256             env = new String[2];
    257          
    258             env[0] = "GSDLHOME="+Configuration.gsdl_path;
    259             env[1] = "GSDLOS="+System.getProperty("os.name");
    260             prcs = rt.exec(cmd,env);
    261         }
    262        
     257        else {
     258            // Will inherit the GLI's environment, with GSDLHOME and GSDLOS set
     259            prcs = rt.exec(cmd);
     260        }
    263261        }
    264262 
  • trunk/gli/src/org/greenstone/gatherer/download/ServerInfoDialog.java

    r12529 r13016  
    1212import org.greenstone.gatherer.DebugStream;
    1313import org.greenstone.gatherer.Dictionary;
     14import org.greenstone.gatherer.Gatherer;
    1415import org.greenstone.gatherer.LocalGreenstone;
    1516import org.greenstone.gatherer.gui.*;
     
    113114        }
    114115        else {
    115         ArrayList env_list = new ArrayList();
    116116        if (proxy_url != null && !proxy_url.equals("")) {           
     117            // Specify proxies as environment variables
     118            // Need to manually specify GSDLHOME and GSDLOS also
     119            env = new String[4];
    117120                    proxy_url = proxy_url.replaceAll("http://","");
    118             env_list.add("http_proxy=http://"+proxy_url);
    119             env_list.add("ftp_proxy=ftp://"+proxy_url);
     121            env[0] = "http_proxy=http://"+proxy_url;
     122            env[1] = "ftp_proxy=ftp://"+proxy_url;
     123            env[2] = "GSDLHOME=" + Configuration.gsdl_path;
     124            env[3] = "GSDLOS=" + Gatherer.client_operating_system;
     125            prcs = rt.exec(command, env);
     126        }
     127        else {
     128            // Will inherit the GLI's environment, with GSDLHOME and GSDLOS set
     129            prcs = rt.exec(command);
    120130        }
    121         env_list.add("GSDLHOME="+Configuration.gsdl_path);
    122         env_list.add("GSDLOS="+System.getProperty("os.name"));
    123         env = (String []) env_list.toArray(new String[0]);
    124         prcs = rt.exec(command,env);
    125        
    126131        }
    127132
Note: See TracChangeset for help on using the changeset viewer.