Changeset 5056
- Timestamp:
- 2003-07-29T10:46:37+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r5053 r5056 185 185 dictionary = new Dictionary(config.getLocale("general.locale", true), config.getFont("general.font", true)); 186 186 187 if(gsdl_path == null) { 188 missingGSDL(dictionary); 189 } 190 187 191 // If we were given a server run it if neccessary. 188 192 if(config.exec_file != null) { … … 194 198 if(config.exec_file == null && config.exec_address == null) { 195 199 missingEXEC(dictionary); 196 }197 if(gsdl_path == null) {198 missingGSDL(dictionary);199 200 } 200 201 // Perl path is a little different as it is perfectly ok to start the Gatherer without providing a perl path … … 575 576 Splash splash = new Splash(); 576 577 577 // We take appropriate action when an empty gsdl_path is detected.578 if(gsdl_path == null) {579 // Check for the presence of the path.cfg file.580 File path_file = new File("path.cfg");581 if(path_file.exists()) {582 try {583 // Read in then add each property to the Java Environment.584 FileInputStream prop_file = new FileInputStream(path_file);585 Properties p = new Properties();586 p.load(prop_file);587 extra = p.getProperty(KEY);588 }589 catch (Exception error) {590 System.out.println("Error in main():");591 error.printStackTrace();592 System.exit(1);593 }594 }595 else {596 missingGSDL(dictionary);597 }598 }599 // We take appropriate action when an empty bin_path is detected.600 578 gatherer.run(size, gsdl_path, exec_path, debug, perl_path, no_load, splash, filename); 601 579 } 580 602 581 /** Prints a warning message about a missing library path, which means the final collection cannot be previewed in the Gatherer. 603 582 */ 604 583 static public void missingEXEC(Dictionary dictionary) { 605 NoSettingDialog dialog = new NoSettingDialog("warning.MissingEXEC", "NoSettingEXEC.Message", false); 584 WarningDialog dialog = new WarningDialog("warning.MissingEXEC", "general.exec_address", dictionary); 585 //NoSettingDialog dialog = new NoSettingDialog("warning.MissingEXEC", "NoSettingEXEC.Message", false, dictionary); 606 586 dialog.display(); 607 587 dialog.dispose(); … … 609 589 ///ystem.out.println(dictionary.get("General.Missing_EXEC")); 610 590 } 591 611 592 /** Prints a warning message about a missing GSDL path, which although not fatal pretty much ensures nothing will work properly in the Gatherer. 612 593 */ 613 594 static public void missingGSDL(Dictionary dictionary) { 614 WarningDialog dialog = new WarningDialog("warning.MissingGSDL", false );595 WarningDialog dialog = new WarningDialog("warning.MissingGSDL", false, dictionary); 615 596 dialog.display(); 616 597 dialog.dispose(); … … 618 599 ///ystem.out.println(dictionary.get("General.Missing_GSDL")); 619 600 } 601 620 602 /** Prints a warning message about a missing PERL path, which although not fatal pretty much ensures no collection creation/building will work properly in the Gatherer. */ 621 603 static public void missingPERL(Dictionary dictionary) { 622 WarningDialog dialog = new WarningDialog("warning.MissingPERL", false );604 WarningDialog dialog = new WarningDialog("warning.MissingPERL", false, dictionary); 623 605 dialog.display(); 624 606 dialog.dispose(); … … 626 608 ///ystem.out.println(dictionary.get("General.Missing_PERL")); 627 609 } 610 628 611 /** Print a message to the debug stream. */ 629 612 static synchronized public void println(String message) { … … 633 616 } 634 617 } 618 635 619 /** Print a stack trace to the debug stream. */ 636 620 static synchronized public void printStackTrace(Exception exception) { … … 923 907 } 924 908 } 909 925 910 /** This class is intented to detect a specific SIGNAL, in this case SIGINT, and exit properly, rather than letting the Gatherer be interrupted which has the potential to leave erroneous lock files. */ 926 911 private class CTRLCHandler
Note:
See TracChangeset
for help on using the changeset viewer.