Changeset 12498 for trunk/gli/src/org/greenstone/gatherer/gui
- Timestamp:
- 2006-08-22T15:18:13+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java
r12470 r12498 49 49 import org.greenstone.gatherer.Dictionary; 50 50 import org.greenstone.gatherer.Gatherer; 51 import org.greenstone.gatherer.LocalGreenstone; 51 52 import org.greenstone.gatherer.file.WorkspaceTree; 52 53 import org.greenstone.gatherer.util.StaticStrings; … … 227 228 try { 228 229 if (Gatherer.isGsdlRemote) { 229 String launch = Gatherer.cgiBase + "launch"; 230 launch += "?cmd=downloadinfo.pl"; 231 launch += "&xml=&language="+lang; 232 launch += "&plug=" + download_name; 233 230 StringBuffer launch_str = new StringBuffer(); 231 launch_str.append(Gatherer.cgiBase); 232 launch_str.append("launch"); 233 launch_str.append("?cmd=downloadinfo.pl&xml=&language="); 234 launch_str.append(lang); 235 launch_str.append("&plug="); 236 launch_str.append(download_name); 237 238 String launch = launch_str.toString(); 234 239 System.err.println("*** launch = " + launch); 235 240 … … 239 244 } 240 245 else { 246 ArrayList args_list = new ArrayList(); 241 247 String args[] = null; 242 248 if(Utility.isWindows()) { 243 args = new String[6];244 249 if(Configuration.perl_path != null) { 245 args [0] = Configuration.perl_path;250 args_list.add(Configuration.perl_path); 246 251 } 247 252 else { 248 args [0] = "Perl.exe";253 args_list.add("Perl.exe"); 249 254 } 250 args[1] = Configuration.gsdl_path + "bin" + File.separator + "script" + File.separator + "downloadinfo.pl";251 args[2] = "-xml";252 args[3] = "-language";253 args[4] = lang;254 args[5] = download_name;255 255 } 256 else { 257 args = new String[5]; 258 args[0] = "downloadinfo.pl"; 259 args[1] = "-xml"; 260 args[2] = "-language"; 261 args[3] = lang; 262 args[4] = download_name; 263 } 264 256 args_list.add(LocalGreenstone.getBinScriptDirectoryPath()+"downloadinfo.pl"); 257 args_list.add("-xml"); 258 args_list.add("-language"); 259 args_list.add(lang); 260 args_list.add(download_name); 261 265 262 // Create the process. 266 263 args = (String []) args_list.toArray(new String[0]); 267 264 Runtime runtime = Runtime.getRuntime(); 265 DebugStream.println("Getting Download Info: "+args_list); 268 266 Process process = runtime.exec(args); 269 267 … … 525 523 public void actionPerformed(ActionEvent event) { 526 524 527 if(checkURL(true) && checkProxy() == true) 528 {529 530 525 if(checkURL(true) && checkProxy() == true) { 526 527 getter.newDownloadJob((Download)download_map.get(mode) ,mode,proxy_url); 528 } 531 529 } 532 530 } … … 646 644 647 645 648 if(server_info != null) 649 { 650 server_info.dispose(); 651 } 646 if(server_info != null) { 647 server_info.dispose(); 648 } 652 649 653 650 … … 655 652 String str_url = ""; 656 653 657 if( arg_url!= null && arg_url.isAssigned()) 658 { 659 str_url = arg_url.getValue(); 660 } 654 if( arg_url!= null && arg_url.isAssigned()) { 655 str_url = arg_url.getValue(); 656 } 661 657 662 658 663 659 server_info = new ServerInfoDialog(str_url ,proxy_url, mode,(Download)download_map.get(mode)); 664 server_info.setVisible(true);660 665 661 } 666 662 }
Note:
See TracChangeset
for help on using the changeset viewer.