Changeset 18351

Show
Ignore:
Timestamp:
12.01.2009 11:04:15 (10 years ago)
Author:
kjdon
Message:

updated the rtl-gli branch with files from trunk. Result of a merge 14807:18318

Location:
gli/branches/rtl-gli
Files:
6 removed
19 modified
7 copied

Legend:

Unmodified
Added
Removed
  • gli/branches/rtl-gli

    • Property svn:ignore set to
      jar
      GLIServer.jar
      GLI.jar
  • gli/branches/rtl-gli/CheckJavaVersion.java

    r10757 r18351  
    1 public class CheckJavaVersion 
    2 { 
    3     static public void main(String[] args) 
    4     { 
    5     String java_version = System.getProperty("java.version"); 
    6     System.out.println("Java version: " + java_version); 
     1import java.util.regex.Pattern; 
    72 
    8     try { 
    9         // Identify major version number 
    10         int major_dot_position = java_version.indexOf("."); 
    11         String java_version_major_string = java_version.substring(0, major_dot_position); 
    12         int java_version_major = (new Integer(java_version_major_string)).intValue(); 
    133 
    14         // Identify minor version number 
    15         int minor_dot_position = java_version.indexOf(".", major_dot_position + 1); 
    16         String java_version_minor_string = java_version.substring(major_dot_position + 1, minor_dot_position); 
    17         int java_version_minor = (new Integer(java_version_minor_string)).intValue(); 
    18  
    19         // Version of Java must be 1.4 or higher to run the GLI 
    20         if (java_version_major > 1 || (java_version_major == 1 && java_version_minor >= 4)) { 
    21         // Valid 
    22         System.exit(2); 
    23         } 
    24         else { 
    25         // Invalid 
    26         System.exit(1); 
    27         } 
     4public class CheckJavaVersion { 
     5    static final String MINIMUM_VERSION_PREFIX = "1.4"; 
     6     
     7    /** 
     8     * @param args, arg[0] is the minium version of Java required 
     9     * to run the program. arg[1] is the name of the program. 
     10     * If arg[1] is left out, then no distinct program name is 
     11     * mentioned. If arg[0] is left out as well, then Greenstone3's 
     12     * minimum default version of 1.4.x is assumed. 
     13     * The program exits with 1 if the Java version being used is  
     14     * incompatible and with 2 if it is acceptable. 
     15     */ 
     16    public static void main(String[] args) { 
     17        String minimumVersion = MINIMUM_VERSION_PREFIX; 
     18        String programName = "this program";  
     19        // the version of java that's in use 
     20        String runningJavaVersion = System.getProperty("java.version"); 
     21         
     22        if(args.length > 0) { 
     23            minimumVersion = args[0]; 
     24        } 
     25        if(args.length > 1) { 
     26            programName = args[1]; 
     27        } 
     28         
     29        System.out.println("\nChecking for a compatible Java version..." 
     30                + "\nLooking for minimum version: " + minimumVersion); 
     31         
     32        // Version numbers can be of the form "1.5.0_2"  
     33        // We want to split version numbers into the individual numbers 
     34        // For example: splitting 1.5.0_2 will give us {1,5,0,2}, 
     35        // while splitting 1.5.0_10 will give us {1,5,0,10}. 
     36        // The comparison then is straightforward. 
     37         
     38        // We will split version strings into the individual numbers 
     39        // using regular expressions. However, the tokens . and _ are 
     40        // reserved in regular expressions and need to be escaped:  
     41        // Period: \Q.\E;  underscore: \Q_\E. 
     42        // Once escaped, it should be indicated in the regular expression 
     43        // that the two characters are separate tokens by using |, so  
     44        // that the regex becomes: ".|_" -> \Q.\E|\Q_\E. 
     45        String period = "\\Q.\\E"; 
     46        String underscore = "\\Q_\\E"; 
     47             // Can't use Pattern.quote() since it is not there in Java 1.4.* 
     48             //String period = Pattern.quote("."); 
     49             //String underscore = Pattern.quote("_"); 
     50         
     51        String[] minVersionNums = minimumVersion.split(period+"|"+underscore); 
     52        String[] runningVersionNums =runningJavaVersion.split(period+"|"+underscore); 
     53         
     54        boolean acceptable = true; 
     55        // only keep looping while we haven't gone past the end of either array 
     56        int i=0; 
     57        for(; i < minVersionNums.length && i < runningVersionNums.length; i++) 
     58        { 
     59            int min = Integer.parseInt(minVersionNums[i]); 
     60            int run = Integer.parseInt(runningVersionNums[i]); 
     61            if(run > min) {  
     62                    // certain success: one of the higher positional numbers  
     63                    // of the running version is greater than the corresponding 
     64                    // number of the minimum version, meaning we've finished. 
     65                break; 
     66            } else if(run < min) {  
     67                // fail: running version number is lower than corresponding  
     68                // minimum version number 
     69                acceptable = false; 
     70                break; 
     71            }  
     72        } 
     73         
     74        // Consider minVersion = 1.5.0_10 and runningVersion = 1.5.0 
     75        // this means the runningversion is still insufficient.  
     76        // HOWEVER, minVersion being longer does not always mean it is 
     77        // a later version, consider: min=1.5.0_9.12 and run=1.5.0_10 
     78        // This should be acceptable since 10 > 9 even though min is longer. 
     79        // SOLUTION: If the last values for both were the same, the running  
     80        // Version is not compatible if the minVersionNums array is longer 
     81        int min = Integer.parseInt(minVersionNums[i-1]); 
     82        int run = Integer.parseInt(runningVersionNums[i-1]); 
     83         
     84        // if the last values were the same, check whether min is longer 
     85        // in which case the running version is not acceptable 
     86        if(min == run && minVersionNums.length > runningVersionNums.length)  
     87        { 
     88            acceptable = false; 
     89        } 
     90         
     91        if(acceptable) { 
     92            System.out.println("Found compatible Java version " +runningJavaVersion); 
     93            System.exit(2); // acceptable case 
     94        } else { 
     95            System.out.println("The current Java version " +  
     96                runningJavaVersion + " is insufficient to run " + programName); 
     97            System.exit(1); 
     98        }  
    2899    } 
    29     catch (Exception exception) { 
    30         System.err.println("Exception: " + exception); 
    31     } 
    32     } 
    33100} 
  • gli/branches/rtl-gli/READMEen.txt

    r6626 r18351  
    4141 
    4242If you have downloaded the Greenstone source distribution, or you have 
    43 obtained the GLI via CVS, you will have the source code (Java) of the 
     43obtained the GLI via SVN, you will have the source code (Java) of the 
    4444Librarian Interface. Compiling it requires a suitable version of the Java 
    4545Software Development Kit (version 1.4.0 or newer). You can download one 
  • gli/branches/rtl-gli/READMEes.txt

    r6903 r18351  
    4444 
    4545Si usted ha bajado la versión con el código fuente de Greenstone o ha  
    46 obtenido la GLI por medio de CVS, entonces tendrá el código fuente  
     46obtenido la GLI por medio de SVN, entonces tendrá el código fuente  
    4747(Java) de la Interfaz de la Biblioteca Digital. Para compilarlo se necesita  
    4848una versión adecuada del Kit de Desarrollo de Software Java (versión  
  • gli/branches/rtl-gli/READMEfr.txt

    r6902 r18351  
    4040 
    4141Si vous avez téléchargé la distribution source de Greenstone, ou si vous  
    42 avez obtenu Greenstone à travers CVS, alors vous avez le code source (Java)  
     42avez obtenu Greenstone à travers SVN, alors vous avez le code source (Java)  
    4343de Librarian Interface. Le compiler requière une version adéquate de Java  
    4444Software Development Kit (version 1.4.0 ou supérieure). Vous pouvez le  
  • gli/branches/rtl-gli/READMEru.txt-cp1251

    r6734 r18351  
    4242 
    4343Åñëè Âû çàãðóçèëè èñòî÷íèê äèñòðèáóòèâà Greenstone èëè æå ðàñïîëàãàåòå GLI 
    44 îò CVS, òî Âû ðàñïîëàãàåòå èñõîäíîé ïðîãðàììîé Java èíòåðôåéñà áèáëèîòåêè. 
     44îò SVN, òî Âû ðàñïîëàãàåòå èñõîäíîé ïðîãðàììîé Java èíòåðôåéñà áèáëèîòåêè. 
    4545Êîìïèëÿöèÿ åž òðåáóåò ïîäõîäÿùåé âåðñèè ïðîãðàììíîãî îáåñïå÷åíèÿ Java 
    4646Software Development Kit (âåðñèÿ 1.4.0 èëè áîëåå íîâàÿ). Âû ìîæåòå çàãðóçèòü 
  • gli/branches/rtl-gli/READMEru.txt-koi8-r

    r6733 r18351  
    4242 
    4343åÓÌÉ ÷Ù ÚÁÇÒÕÚÉÌÉ ÉÓÔÏÞÎÉË ÄÉÓÔÒÉÂÕÔÉ×Á Greenstone ÉÌÉ ÖÅ ÒÁÓÐÏÌÁÇÁÅÔÅ GLI 
    44 ÏÔ CVS, ÔÏ ÷Ù ÒÁÓÐÏÌÁÇÁÅÔÅ ÉÓÈÏÄÎÏÊ ÐÒÏÇÒÁÍÍÏÊ Java ÉÎÔÅÒÆÅÊÓÁ ÂÉÂÌÉÏÔÅËÉ. 
     44ÏÔ SVN, ÔÏ ÷Ù ÒÁÓÐÏÌÁÇÁÅÔÅ ÉÓÈÏÄÎÏÊ ÐÒÏÇÒÁÍÍÏÊ Java ÉÎÔÅÒÆÅÊÓÁ ÂÉÂÌÉÏÔÅËÉ. 
    4545ëÏÍÐÉÌÑÃÉÑ Å£ ÔÒÅÂÕÅÔ ÐÏÄÈÏÄÑÝÅÊ ×ÅÒÓÉÉ ÐÒÏÇÒÁÍÍÎÏÇÏ ÏÂÅÓÐÅÞÅÎÉÑ Java 
    4646Software Development Kit (×ÅÒÓÉÑ 1.4.0 ÉÌÉ ÂÏÌÅÅ ÎÏ×ÁÑ). ÷Ù ÍÏÖÅÔÅ ÚÁÇÒÕÚÉÔØ 
  • gli/branches/rtl-gli/clean.bat

    r10448 r18351  
    2929if exist "cdm\*.class" del "cdm\*.class" 
    3030if exist "collection\*.class" del "collection\*.class" 
     31if exist "download\*.class" del "download\*.class" 
    3132if exist "feedback\*.class" del "feedback\*.class" 
    3233if exist "file\*.class" del "file\*.class" 
    3334if exist "gems\*.class" del "gems\*.class" 
     35if exist "greenstone\*.class" del "greenstone\*.class" 
     36if exist "greenstone3\*.class" del "greenstone3\*.class" 
    3437if exist "gui\*.class" del "gui\*.class" 
     38if exist "gui\metaaudit\*.class" del "gui\metaaudit\*.class" 
     39if exist "gui\tree\*.class" del "gui\tree\*.class" 
    3540if exist "metadata\*.class" del "metadata\*.class" 
     41if exist "remote\*.class" del "remote\*.class" 
    3642if exist "shell\*.class" del "shell\*.class" 
    3743if exist "util\*.class" del "util\*.class" 
  • gli/branches/rtl-gli/client-gli.bat

    r12453 r18351  
    11@echo off 
     2pushd "%CD%" 
     3CD /D "%~dp0" 
    24set GLILANG=en 
    35 
     6if "%PROGNAME" == "" set PROGNAME=Greenstone 
     7 
     8if not "%PROGFULLNAME" == "" goto setvars 
     9if "%GLILANG%" == "es" set PROGFULLNAME="Biblioteca Digital Greenstone"   
     10if "%GLILANG%" == "fr" set PROGFULLNAME="Bibliothécaire Greenstone" 
     11if "%GLILANG%" == "ru" set PROGFULLNAME="ÉÎÔÅÒÆÅÊÓ Greenstone" 
     12:: if the PROGFULLNAME is still not set, then set the language to English 
     13if "%PROGFULLNAME%" == "" set PROGNAME=Greenstone Digital Library 
     14   
     15 
     16:setvars 
     17if "%PROGABBR%" == "" set PROGABBR=GLI 
     18if "%PROGNAME_EN%" == "" set PROGNAME_EN=Greenstone Librarian Interface 
    419 
    520::  -------- Run the Greenstone Librarian Interface -------- 
     
    2338:findGSDL 
    2439echo. 
    25 if "%GLILANG%" == "en" echo Greenstone Librarian Interface (GLI) 
    26 if "%GLILANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
    27 if "%GLILANG%" == "en" echo GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt 
     40if "%GLILANG%" == "en" echo %PROGNAME_EN% (%PROGABBR%) 
     41if "%GLILANG%" == "en" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
     42if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt 
    2843if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it 
    2944 
    30 if "%GLILANG%" == "es" echo Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI) 
    31 if "%GLILANG%" == "es" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
    32 if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA. 
     45if "%GLILANG%" == "es" echo Interfaz de la %PROGFULLNAME% (%PROGNAME_EN% - %PROGABBR%) 
     46if "%GLILANG%" == "es" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
     47if "%GLILANG%" == "es" echo La Interfaz de la %PROGFULLNAME% NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA. 
    3348if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los t‚rminos de la licencia en LICENSE.txt 
    3449if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita 
    3550 
    36 if "%GLILANG%" == "fr" echo Interface du Biblioth‚caire Greenstone (Greenstone Librarian Interface - GLI) 
    37 if "%GLILANG%" == "fr" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
    38 if "%GLILANG%" == "fr" echo GLI est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt 
     51if "%GLILANG%" == "fr" echo Interface du %PROGFULLNAME% (%PROGNAME_EN% - %PROGABBR%) 
     52if "%GLILANG%" == "fr" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
     53if "%GLILANG%" == "fr" echo %PROGABBR% est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt 
    3954if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous ˆtes invit‚  
    4055 le redistribuer 
    4156 
    42 if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone (Greenstone Librarian Interface - GLI) 
    43 if "%GLILANG%" == "ru" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
     57if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME% (%PROGNAME_EN% - %PROGABBR%) 
     58if "%GLILANG%" == "ru" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
    4459if "%GLILANG%" == "ru" echo ˆƒ ­¥ € ¥â €‘Ž‹ž’Ž ˆŠ€Šˆ• ƒ€€’ˆ‰; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT 
    4560if "%GLILANG%" == "ru" echo â® - ᢮¡®€­® à á¯à®áâ࠭塞®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­š¥ š ‚ë ¬®Š¥â¥ à á¯à®áâà ­ïâì ¥£® 
     
    99114    if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Java. You must install a 
    100115    if "%GLILANG%" == "en" echo Java Runtime Environment (version 1.4 or greater) before running the 
    101     if "%GLILANG%" == "en" echo Greenstone Librarian Interface. 
     116    if "%GLILANG%" == "en" echo %PROGNAME_EN%. 
    102117 
    103118    if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Java. Usted deber  
    104119    if "%GLILANG%" == "es" echo instalar un Ambiente de Ejecuci¢n Java (versi¢n 1.4 o superior) 
    105     if "%GLILANG%" == "es" echo antes de correr la Interfaz de la Biblioteca Digital Greenstone. 
     120    if "%GLILANG%" == "es" echo antes de correr la Interfaz de la %PROGFULLNAME%. 
    106121 
    107122    if "%GLILANG%" == "fr" echo Une version ad‚quate de Java n'a pas pu ˆtre localis‚e. Vous devez 
    108123    if "%GLILANG%" == "fr" echo installer un Java Runtime Environment (version 1.4 ou sup‚rieur) 
    109     if "%GLILANG%" == "fr" echo avant de d‚marrer Greenstone Librarian Interface. 
     124    if "%GLILANG%" == "fr" echo avant de d‚marrer %PROGNAME_EN%. 
    110125 
    111126    if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥áâ®­ å®Š€¥­š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àášš Java. 
    112127    if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ãáâ ­®¢šâì Java Runtime Environment (¢¥àášî 1.4 š«š ¢ëè¥) ¯¥à¥€ ¢¢®€®¬ 
    113     if "%GLILANG%" == "ru" echo ¡š¡«š®â¥ç­®£® š­â¥àä¥©á  Greenstone. 
     128    if "%GLILANG%" == "ru" echo ¡š¡«š®â¥ç­®£® š­â¥àä¥©á  %PROGNAME%. 
    114129    goto exit 
    115130 
     
    120135if exist "GLI.jar" goto runGLI 
    121136    echo. 
    122     if "%GLILANG%" == "en" echo You need to compile the Greenstone Librarian Interface (using makegli.bat) 
     137    if "%GLILANG%" == "en" echo You need to compile the %PROGNAME_EN% (using makegli.bat) 
    123138    if "%GLILANG%" == "en" echo before running this script. 
    124139 
    125     if "%GLILANG%" == "es" echo Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone 
     140    if "%GLILANG%" == "es" echo Usted necesita compilar la Interfaz de la %PROGFULLNAME% 
    126141    if "%GLILANG%" == "es" echo (por medio de makegli.bat) antes de ejecutar este gui¢n. 
    127142 
    128     if "%GLILANG%" == "fr" echo Vous devez compiler le Greenstone Interface (en utilisant makegil.bat) 
     143    if "%GLILANG%" == "fr" echo Vous devez compiler le %PROGNAME% Interface (en utilisant makegil.bat) 
    129144    if "%GLILANG%" == "fr" echo avant d'ex‚cuter ce script. 
    130145 
    131     if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ª®¬¯š«šà®¢ âì ¡š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone (šá¯®«ì§ãï makegli.bat) 
     146    if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ª®¬¯š«šà®¢ âì ¡š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME% (šá¯®«ì§ãï makegli.bat) 
    132147    if "%GLILANG%" == "ru" echo ¯¥à¥€ ¢¢®€®¬ í⮣® áªàš¯â  
    133148    goto exit 
     
    139154 
    140155 
    141 if "%GLILANG%" == "en" echo Running the Greenstone Librarian Interface... 
    142 if "%GLILANG%" == "es" echo Ejecutando la Interfaz de la Biblioteca Digital Greenstone... 
    143 if "%GLILANG%" == "fr" echo Ex‚cution de Greenstone Librarian Interface 
    144 if "%GLILANG%" == "ru" echo ’¥ªãéš© ¡š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone... 
     156if "%GLILANG%" == "en" echo Running the %PROGNAME_EN%... 
     157if "%GLILANG%" == "es" echo Ejecutando la Interfaz de la %PROGFULLNAME%... 
     158if "%GLILANG%" == "fr" echo Ex‚cution de %PROGNAME_EN% 
     159if "%GLILANG%" == "ru" echo ’¥ªãéš© ¡š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME%... 
    145160 
    146161:: -Xms32M          To set minimum memory 
     
    166181:: ---- Clean up ---- 
    167182set JAVAPATH= 
     183popd 
  • gli/branches/rtl-gli/client-gli.sh

    r12453 r18351  
    22glilang=en 
    33 
     4if [ "x$PROGNAME" = "x" ] ; then 
     5    PROGNAME="Greenstone" 
     6  if [ "$glilang" = "es" ]; then 
     7    PROGFULLNAME="Biblioteca Digital Greenstone" 
     8  elif [ "$glilang" = "fr" ]; then 
     9    PROGFULLNAME="Bibliothécaire Greenstone" 
     10  elif [ "$glilang" = "ru" ]; then 
     11    PROGFULLNAME="ÉÎÔÅÒÆÅÊÓ Greenstone" 
     12  else 
     13    PROGFULLNAME="Greenstone Digital Library" 
     14  fi 
     15  else 
     16    PROGFULLNAME=$PROGNAME 
     17fi 
     18 
     19if [ "x$PROGABBR" = "x" ] ; then 
     20    PROGABBR="GLI" 
     21fi 
     22 
     23if [ "x$PROGNAME_EN" = "x" ] ; then 
     24    PROGNAME_EN="Greenstone Librarian Interface" 
     25fi 
     26 
     27 
    428echo 
    529if [ "$glilang" = "es" ]; then 
    6     echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)" 
    7     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    8     echo "La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA." 
     30    echo "Interfaz de la $PROGFULLNAME ($PROGNAME_EN - $PROGABBR)" 
     31    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato" 
     32    echo "La Interfaz de la $PROGNAME NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA." 
    933    echo "Para mayor información vea los términos de la licencia en LICENSE.txt" 
    1034    echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita" 
    1135elif [ "$glilang" = "fr" ]; then 
    12     echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)" 
    13     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    14     echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt" 
     36    echo "Interface du $PROGFULLNAME ($PROGNAME_EN - $PROGABBR)" 
     37    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato" 
     38    echo "$PROGABBR est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt" 
    1539    echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer" 
    1640elif [ "$glilang" = "ru" ]; then 
    17     echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)" 
    18     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
     41    echo "âÉÂÌÉÏÔÅÞÎÙÊ $PROGFULLNAME ($PROGNAME_EN - $PROGABBR)" 
     42    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato" 
    1943    echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT" 
    2044    echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ" 
    2145else 
    22     echo "Greenstone Librarian Interface (GLI)" 
    23     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    24     echo "GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 
     46    echo "$PROGNAME Librarian Interface ($PROGABBR)" 
     47    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato" 
     48    echo "$PROGABBR comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 
    2549    echo "This is free software, and you are welcome to redistribute it" 
    2650fi 
     
    76100    echo "No se pudo localizar una versión apropiada de Java. Usted deberá " 
    77101    echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) " 
    78     echo "antes de correr la Interfaz de la Biblioteca Digital Greenstone." 
     102    echo "antes de correr la Interfaz de la $PROGFULLNAME                    ." 
    79103    elif [ "$glilang" = "fr" ]; then 
    80104    echo "Une version adéquate de Java n'a pas pu être localisée." 
    81105    echo "Vous devez installer un Java Runtime Environment (version 1.4 ou" 
    82     echo "supérieur) avant de démarrer Greenstone Librarian Interface." 
     106    echo "supérieur) avant de démarrer $PROGNAME Librarian Interface." 
    83107    elif [ "$glilang" = "ru" ]; then 
    84108    echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java." 
    85109    echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)" 
    86     echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone." 
     110    echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ $PROGNAME." 
    87111    else 
    88112    echo "Failed to locate an appropriate version of Java. You must install a" 
    89113    echo "Java Runtime Environment (version 1.4 or greater) before running the" 
    90     echo "Greenstone Librarian Interface." 
     114    echo "$PROGNAME Librarian Interface." 
    91115    fi 
    92116    exit 1 
     
    126150    echo 
    127151    if [ "$glilang" = "es" ]; then 
    128     echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone" 
     152    echo "Usted necesita compilar la Interfaz de la $PROGFULLNAME" 
    129153    echo "(por medio de makegli.sh) antes de ejecutar este guión." 
    130154    elif [ "$glilang" = "fr" ]; then 
    131     echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)" 
     155    echo "Vous devez compiler le $PROGNAME Interface (en utilisant makegli.sh)" 
    132156    echo "avant d'exécuter ce script." 
    133157    elif [ "$glilang" = "ru" ]; then 
    134     echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone" 
     158    echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ $PROGNAME" 
    135159    echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ" 
    136160    else 
    137     echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)" 
     161    echo "You need to compile the $PROGNAME Librarian Interface (using makegli.sh)" 
    138162    echo "before running this script." 
    139163    fi 
     
    145169echo 
    146170if [ "$glilang" = "es" ]; then 
    147     echo "Ejecutando la Interfaz de la Biblioteca Digital Greenstone..." 
     171    echo "Ejecutando la Interfaz de la $PROGFULLNAME..." 
    148172elif [ "$glilang" = "fr" ]; then 
    149     echo "Exécution de Greenstone Librarian Interface" 
     173    echo "Exécution de $PROGNAME Librarian Interface" 
    150174elif [ "$glilang" = "ru" ]; then 
    151     echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..." 
     175    echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ $PROGNAME..." 
    152176else 
    153     echo "Running the Greenstone Librarian Interface..." 
     177    echo "Running the $PROGNAME Librarian Interface..." 
    154178fi 
    155179 
     
    162186# -Xloggc:<file>   Write garbage collection log 
    163187 
    164 $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone $* 
     188# GS2 only requires -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar. GS3 requires more but it doesn't conflict with GS2: 
     189$javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/commons-codec-1.3.jar:lib/commons-httpclient-3.1-rc1.jar:lib/commons-logging-1.1.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone $* 
    165190 
    166191if [ "$glilang" = "es" ]; then 
  • gli/branches/rtl-gli/gems.sh

    • Property svn:mime-type deleted
  • gli/branches/rtl-gli/gli.bat

    r13027 r18351  
    11@echo off 
     2color 0A 
     3pushd "%CD%" 
     4CD /D "%~dp0" 
    25set GLILANG=en 
    36 
     
    1518 
    1619:start 
    17 if "%OS%" == "Windows_NT" goto findGSDL 
     20if "%OS%" == "Windows_NT" goto progName 
    1821    :: Invoke a new command processor to ensure there's enough environment space 
    19     if "%1" == "Second" goto findGSDL 
     22    if "%1" == "Second" goto progName 
    2023        command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9 
    2124        goto done 
    2225 
     26 
     27:progName 
     28if not "%PROGNAME%" == "" goto findGSDL 
     29    :: otherwise PROGNAME was not set, so default to the Greenstone Librarian Interface (GLI) program 
     30    if "%GLILANG%" == "es" set PROGNAME=Biblioteca Digital Greenstone 
     31    if "%GLILANG%" == "fr" set PROGNAME=Bibliothécaire Greenstone 
     32    if "%GLILANG%" == "ru" set PROGNAME=ÉÎÔÅÒÆÅÊÓ Greenstone 
     33    :: if the PROGNAME is still not set, then set the language to English 
     34    if "%PROGNAME%" == "" set PROGNAME=Greenstone Librarian Interface 
     35 
     36 
     37if "%PROGABBR%" == "" set PROGABBR=GLI 
     38if "%PROGNAME_EN%" == "" set PROGNAME_EN=Greenstone Librarian Interface 
     39 
    2340:findGSDL 
    2441echo. 
    25 if "%GLILANG%" == "en" echo Greenstone Librarian Interface (GLI) 
    26 if "%GLILANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
    27 if "%GLILANG%" == "en" echo GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt 
     42if "%GLILANG%" == "en" echo %PROGNAME% (%PROGABBR%) 
     43if "%GLILANG%" == "en" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
     44if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt 
    2845if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it 
    2946 
    30 if "%GLILANG%" == "es" echo Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI) 
    31 if "%GLILANG%" == "es" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
    32 if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA. 
     47if "%GLILANG%" == "es" echo Interfaz de la %PROGNAME% (%PROGNAME_EN% - %PROGABBR%) 
     48if "%GLILANG%" == "es" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
     49if "%GLILANG%" == "es" echo La Interfaz de la %PROGNAME% NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA. 
    3350if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los t‚rminos de la licencia en LICENSE.txt 
    3451if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita 
    3552 
    36 if "%GLILANG%" == "fr" echo Interface du Biblioth‚caire Greenstone (Greenstone Librarian Interface - GLI) 
    37 if "%GLILANG%" == "fr" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
    38 if "%GLILANG%" == "fr" echo GLI est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt 
     53if "%GLILANG%" == "fr" echo Interface du %PROGNAME% (%PROGNAME_EN% - %PROGABBR%) 
     54if "%GLILANG%" == "fr" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
     55if "%GLILANG%" == "fr" echo %PROGABBR% est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt 
    3956if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous ˆtes invit‚  
    4057 le redistribuer 
    4158 
    42 if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone (Greenstone Librarian Interface - GLI) 
    43 if "%GLILANG%" == "ru" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
     59if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME% (%PROGNAME_EN% - %PROGABBR%) 
     60if "%GLILANG%" == "ru" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
    4461if "%GLILANG%" == "ru" echo ˆƒ ­¥ € ¥â €‘Ž‹ž’Ž ˆŠ€Šˆ• ƒ€€’ˆ‰; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT 
    4562if "%GLILANG%" == "ru" echo â® - ᢮¡®€­® à á¯à®áâ࠭塞®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­š¥ š ‚ë ¬®Š¥â¥ à á¯à®áâà ­ïâì ¥£® 
    4663 
    4764echo. 
    48 ::  ---- Determine GSDLHOME ---- 
     65::  ---- Determine path to Greenstone home for GS2 and GS3 ---- 
    4966set GSDLPATH= 
    50  
    51 :: Some users may set the above line manually 
    52 if not "%GSDLPATH%" == "" goto testGSDL 
    53  
    54     :: The default location for the GLI is a subdirectory of Greenstone 
    55     set GSDLPATH=.. 
    56  
    57     :: If it is set, use the GSDLHOME environment variable  
    58     if "%GSDLHOME%" == "" goto testGSDL 
    59     set GSDLPATH=%GSDLHOME% 
     67:: Some users may set the above line manually, or it may be set as an argument 
     68 
     69set _VERSION= 
     70if not "%GSDLPATH%" == "" goto getVer 
     71    :: Otherwise gsdlpath is not yet set 
     72    :: Check the env vars first  
     73    if not "%GSDL3SRCHOME%" == "" goto ver3 
     74        if not "%GSDLHOME%" == "" goto ver2 
     75            :: If not set, the default location for the GLI is a subdirectory of Greenstone 
     76            set GSDLPATH=.. 
     77            goto getVer 
     78 
     79:getVer 
     80call gsdlver.bat %GSDLPATH% %_VERSION% > nul 
     81if "%_VERSION%" == "1" goto exit 
     82::if we are running GS2, free up any pre-set GS3 environment variables since we won't need them 
     83if "%_VERSION%" == "2" set GSDL3SRCHOME= 
     84if "%_VERSION%" == "2" set GSDL3HOME= 
     85goto testGSDL 
     86 
     87 
     88:ver3 
     89set _VERSION=3 
     90set GSDLPATH=%GSDL3SRCHOME% 
     91:: if GS2 is now also set, then both GS3 and GS2 are set:  
     92:: warn the user that we have defaulted to GS3 
     93if not "%GSDLHOME%" == "" echo Both Greenstone 2 and Greenstone 3 environments are set. 
     94if not "%GSDLHOME%" == "" echo It is assumed you want to run Greenstone 3. 
     95if not "%GSDLHOME%" == "" echo If you want to run Greenstone 2, please unset the 
     96if not "%GSDLHOME%" == "" echo environment variable GSDL3SRCHOME before running GLI. 
     97if not "%GSDLHOME%" == "" echo. 
     98goto testGSDL 
     99 
     100 
     101:ver2 
     102set _VERSION=2 
     103set GSDLPATH=%GSDLHOME% 
     104::free up the GS3 environment variables since we are running GS2 and don't need them 
     105set GSDL3SRCHOME= 
     106set GSDL3HOME= 
     107goto testGSDL 
     108 
    60109 
    61110:testGSDL 
    62 :: Check that the Greenstone installation looks OK 
    63 if "%GLILANG%" == "en" echo Checking GSDL: %GSDLPATH% 
    64 if "%GLILANG%" == "es" echo Revisando GSDL: %GSDLPATH% 
    65 if "%GLILANG%" == "fr" echo V‚rification de GSDL: %GSDLPATH% 
    66 if "%GLILANG%" == "ru" echo à®¢¥àª  GSDL: %GSDLPATH% 
    67 if exist "%GSDLPATH%\setup.bat" goto prepGSDL 
    68     echo. 
    69     if "%GLILANG%" == "en" echo The Greenstone installation could not be found, or is incomplete. 
    70     if "%GLILANG%" == "en" echo Try reinstalling Greenstone then running this script again. 
    71  
    72     if "%GLILANG%" == "es" echo No se pudo encontrar la instalaci¢n de Greenstone o est  incompleta. 
    73     if "%GLILANG%" == "es" echo Trate de reinstalar Greenstone y a continuaci¢n ejecute nuevamente este gui¢n. 
    74  
    75     if "%GLILANG%" == "fr" echo L'installation de Greenstone est introuvable ou incomplŠte. Essayez 
    76     if "%GLILANG%" == "fr" echo de r‚installer Greenstone et ex‚cutez ce script  
    77  nouveau. 
    78  
    79     if "%GLILANG%" == "ru" echo ˆ­áâ ««ïæšï Greenstone ­¥ ¡ë«  ­ ©€¥­  š«š ®­  ­¥¯®«­ . ®¯à®¡ã©â¥ ¯®¢â®à­® 
    80     if "%GLILANG%" == "ru" echo ãáâ ­®¢šâì Greenstone,   § â¥¬ ¢¢¥áâš íâ®â áªàš¯â á­®¢ . 
    81     goto exit 
     111set CHECK=1 
     112call chkinst.bat "%GSDLPATH%" %_VERSION% %GLILANG% %CHECK% > nul 
     113if "%CHECK%" == "1" goto exit 
     114    :: otherwise installation worked well 
     115    goto prepGSDL 
     116 
    82117 
    83118:prepGSDL 
    84 :: Setup Greenstone, unless it has already been done 
     119:: Greenstone 3 case 
     120if "%_VERSION%" == "3" goto prepGS3 
     121 
     122if not "%_VERSION%" == "2" echo "Greenstone version unknown" 
     123if not "%_VERSION%" == "2" goto :exit 
     124 
     125:: Otherwise, we are dealing with Greenstone 2 
     126:: Setup Greenstone 2, unless it has already been done 
    85127if not "%GSDLHOME%" == "" goto doneGSDL 
    86     call "%GSDLPATH%\setup.bat" SetEnv > nul 
     128    call "%GSDLPATH%\setup.bat" SetEnv 
     129    goto doneGSDL 
     130 
     131 
     132:prepGS3 
     133set GSDL2PATH= 
     134: Some users may set the above line manually 
     135 
     136if "%GSDL3SRCHOME%" == "" goto setup3 
     137    if "%GSDL3HOME%" == "" goto setup3 
     138        ::otherwise 
     139        goto gs2build 
     140 
     141 
     142:setup3 
     143:: Setup Greenstone 3, unless it has already been done 
     144    cd | winutil\setvar.exe GLIDIR > %TMP%\setgli.bat 
     145    call %TMP%\setgli.bat 
     146    del %TMP%\setgli.bat 
     147    cd "%GSDLPATH%" 
     148    call gs3-setup.bat SetEnv 
     149    cd %GLIDIR% 
     150    goto gs2build 
     151 
     152 
     153:gs2build 
     154    :: If Greenstone version 3 is running, we want to set gsdl2path 
     155    :: Determine GSDLHOME for GS3  
     156    if not "%GSDL2PATH%" == "" goto setupGS2 
     157        :: GSDL2PATH is not yet set.  
     158        :: And if GSDLHOME is not set either, then assume  
     159        :: that the gs2build subdir of GS3 exists 
     160        if "%GSDLHOME%" == "" set GSDL2PATH=%GSDL3SRCHOME%\gs2build 
     161        if "%GSDLHOME%" == "" goto setupGS2  
     162            :: Otherwise GSDLHOME is set, so set GSDL2PATH to GSDLHOME 
     163            echo GSDLHOME environment variable is set to %GSDLHOME%.     
     164            echo Will use this to find build scripts. 
     165            set GSDL2PATH=%GSDLHOME% 
     166 
     167:setupGS2 
     168set CHECK=1 
     169call chkinst.bat "%GSDL2PATH%" 2 %GLILANG% %CHECK% > nul 
     170if "%CHECK%" == "1" goto exit 
     171    :: otherwise installation worked well 
     172    :: Setup Greenstone, unless it has already been done 
     173    if "%GSDLHOME%" == "" call "%GSDL2PATH%\setup.bat" SetEnv 
     174    :: Either way, we can now dispose of GSDL2PATH 
     175    set GSDL2PATH=   
     176    goto doneGSDL 
     177 
    87178 
    88179:doneGSDL 
     
    95186set PERLPATH= 
    96187 
    97 :: Some users may set the above line manually 
     188:: Some users may set the above line manually - If you do this, you need to  
     189:: make sure that perl is in your path otherwise lucene collections may not  
     190:: work 
    98191if not "%PERLPATH%" == "" goto testPerl 
    99192 
    100193    :: Check if Perl is on the search path 
    101     echo %PATH%| winutil\which.exe perl.exe | winutil\setvar.exe PERLPATH > setperl.bat 
    102     call setperl.bat 
    103     del setperl.bat 
     194    echo %PATH%| winutil\which.exe perl.exe | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat 
     195    call %TMP%\setperl.bat 
     196    del %TMP%\setperl.bat 
    104197    if not "%PERLPATH%" == "" goto testPerl 
    105198 
     
    108201 
    109202    :: Still haven't found anything, so try looking in the registry (gulp!) 
    110     type nul > perl.reg 
    111     regedit /E perl.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Perl" 
    112     type perl.reg > perl.txt 
    113     del perl.reg 
    114  
    115     winutil\findperl.exe perl.txt | winutil\setvar.exe PERLPATH > setperl.bat 
    116     del perl.txt 
    117     call setperl.bat 
    118     del setperl.bat 
     203    type nul > %TMP%\perl.reg 
     204    regedit /E %TMP%\perl.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Perl" 
     205    type %TMP%\perl.reg > %TMP%\perl.txt 
     206    del %TMP%\perl.reg 
     207 
     208    winutil\findperl.exe %TMP%\perl.txt | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat 
     209    del %TMP%\perl.txt 
     210    call %TMP%\setperl.bat 
     211    del %TMP%\setperl.bat 
    119212 
    120213    :: If nothing was found in the registry, we're stuck 
    121214    if "%PERLPATH%" == "" goto noPerl 
    122215 
     216    :: if have found perl in registry, but not in path, then we need to  
     217    :: add it to path for lucene stuff. 
     218    if "%OS%" == "Windows_NT" set PATH=%PATH%;%PERLPATH% 
     219    if "%OS%" == "" set PATH="%PATH%";"%PERLPATH%" 
    123220    goto testPerl 
    124221 
    125222:gsdlPerl 
    126223    set PERLPATH=%GSDLHOME%\bin\windows\perl\bin 
    127  
     224         
    128225:testPerl 
    129226:: Check that a Perl executable has been found 
    130 if "%GLILANG%" == "en" echo Checking Perl: %PERLPATH% 
    131 if "%GLILANG%" == "es" echo Revisando Perl: %PERLPATH% 
    132 if "%GLILANG%" == "fr" echo V‚rification de Perl: %PERLPATH% 
    133 if "%GLILANG%" == "ru" echo à®¢¥àª  Perl: %PERLPATH% 
    134 if exist "%PERLPATH%\perl.exe" goto findJava 
     227if not exist "%PERLPATH%\perl.exe" goto noPerl 
     228echo Perl: 
     229echo %PERLPATH% 
     230echo. 
     231 
     232goto findJava 
    135233 
    136234:noPerl 
    137235    echo. 
    138     if "%GLILANG%" == "en" echo The Greenstone Librarian Interface requires perl in order to operate, 
    139     if "%GLILANG%" == "en" echo but perl could not be detected on your system. Please ensure that perl 
    140     if "%GLILANG%" == "en" echo is installed and is on your search path, then rerun this script. 
     236    if "%GLILANG%" == "en" echo The Greenstone Librarian Interface requires Perl in order to operate, 
     237    if "%GLILANG%" == "en" echo but Perl could not be detected on your system. Please ensure that Perl 
     238    if "%GLILANG%" == "en" echo is installed and is on your search path, then try again. 
    141239 
    142240    if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone requiere Perl para poder 
     
    158256 
    159257:findJava 
    160 :: ---- Check Java exists ---- 
    161 set JAVAPATH= 
    162  
    163 :: Some users may set the above line manually 
    164 if not "%JAVAPATH%" == "" goto testJava 
    165  
    166     :: If it is set, use the JAVA_HOME environment variable 
    167     if not "%JAVA_HOME%" == "" goto javahome 
    168  
    169     :: Check if Java is on the search path 
    170     echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat 
    171     call setjava.bat 
    172     del setjava.bat 
    173     if not "%JAVAPATH%" == "" goto testJava 
    174  
    175     :: Still haven't found anything, so try looking in the registry (gulp!) 
    176     type nul > jdk.reg 
    177     regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit" 
    178     type jdk.reg > jdk.txt 
    179     del jdk.reg 
    180     type nul > jre.reg 
    181     regedit /E jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" 
    182     type jre.reg > jre.txt 
    183     del jre.reg 
    184  
    185     winutil\findjava.exe jdk.txt jre.txt | winutil\setvar.exe JAVAPATH > setjava.bat 
    186     del jdk.txt 
    187     del jre.txt 
    188     call setjava.bat 
    189     del setjava.bat 
    190  
    191     :: If nothing was found in the registry, we're stuck 
    192     if "%JAVAPATH%" == "" goto noJava 
    193  
    194     set JAVAPATH=%JAVAPATH%\bin 
    195     goto testJava 
    196  
    197 :javahome 
    198     set JAVAPATH=%JAVA_HOME%\bin 
    199  
    200 :testJava 
    201 :: Check that a Java executable has been found 
    202 if "%GLILANG%" == "en" echo Checking Java: %JAVAPATH% 
    203 if "%GLILANG%" == "es" echo Revisando Java: %JAVAPATH% 
    204 if "%GLILANG%" == "fr" echo V‚rification de Java: %JAVAPATH% 
    205 if "%GLILANG%" == "ru" echo à®¢¥àª  Java: %JAVAPATH% 
    206 if exist "%JAVAPATH%\java.exe" goto checkGLI 
     258    if "%_VERSION%" == "2" ( 
     259        set SEARCH4J_EXECUTABLE=%GSDLHOME%\bin\windows\search4j.exe 
     260        set HINT=%GSDLHOME%\packages\jre 
     261    ) 
     262    if "%_VERSION%" == "3" ( 
     263        set SEARCH4J_EXECUTABLE=%GSDL3SRCHOME%\bin\search4j.exe 
     264        set HINT=%GSDL3SRCHOME%\packages\jre 
     265    ) 
     266     
     267    "%SEARCH4J_EXECUTABLE%" -e -m "1.4.0_00" -p "%HINT%" | winutil\setvar.exe JAVA_EXECUTABLE > %TMP%\set_java_executable.bat 
     268    call "%TMP%\set_java_executable.bat" 
     269    del "%TMP%\set_java_executable.bat" 
     270     
     271    if "%JAVA_EXECUTABLE%" == "" goto noJava 
     272    echo Java: 
     273    echo %JAVA_EXECUTABLE% 
     274    echo. 
     275 
     276    goto checkGLI 
    207277 
    208278:noJava 
     
    212282    if "%GLILANG%" == "en" echo Greenstone Librarian Interface. 
    213283 
    214     if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Java. Usted deber  
     284    if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Java. Usted deber  
    215285    if "%GLILANG%" == "es" echo instalar un Ambiente de Ejecuci¢n Java (versi¢n 1.4 o superior) 
    216286    if "%GLILANG%" == "es" echo antes de correr la Interfaz de la Biblioteca Digital Greenstone. 
    217287 
    218     if "%GLILANG%" == "fr" echo Une version ad‚quate de Java n'a pas pu ˆtre localis‚e. Vous devez 
    219     if "%GLILANG%" == "fr" echo installer un Java Runtime Environment (version 1.4 ou sup‚rieur) 
    220     if "%GLILANG%" == "fr" echo avant de d‚marrer Greenstone Librarian Interface. 
    221  
    222     if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥áâ®­ å®Š€¥­š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àášš Java. 
    223     if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë ãáâ ­®¢šâì Java Runtime Environment (¢¥àášî 1.4 š«š ¢ëè¥) ¯¥à¥€ ¢¢®€®¬ 
    224     if "%GLILANG%" == "ru" echo ¡š¡«š®â¥ç­®£® š­â¥àä¥©á  Greenstone. 
     288    if "%GLILANG%" == "fr" echo Une version ad?quate de Java n'a pas pu ?tre localis?e. Vous devez 
     289    if "%GLILANG%" == "fr" echo installer un Java Runtime Environment (version 1.4 ou sup?rieur) 
     290    if "%GLILANG%" == "fr" echo avant de d?marrer Greenstone Librarian Interface. 
     291 
     292    if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥áâ®­ 宊€¥­š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àᚚ Java. 
     293    if "%GLILANG%" == "ru" echo ?ë €®«Š­ë ãáâ ­®¢šâì Java Runtime Environment (¢¥àášî 1.4 š«š ¢ëè¥) ¯¥à¥€ ¢¢®€®¬ 
     294    if "%GLILANG%" == "ru" echo ¡š¡«š®â¥ç­®£® š­â¥à䥩á Greenstone. 
    225295    goto exit 
    226  
    227296 
    228297:checkGLI 
     
    246315 
    247316:runGLI 
     317 
     318if not "%_VERSION%" == "" ( 
     319    echo Greenstone Major Version: 
     320    echo %_VERSION% 
     321    echo. 
     322) 
     323 
     324if not "%GSDL3SRCHOME%" == "" ( 
     325    echo GSDL3SRCHOME: 
     326    echo %GSDL3SRCHOME% 
     327    echo. 
     328) 
     329 
     330if not "%GSDL3HOME%" == "" ( 
     331    echo GSDL3HOME: 
     332    echo %GSDL3HOME% 
     333    echo. 
     334) 
     335 
     336if not "%GSDLHOME%" == "" ( 
     337    echo GSDLHOME: 
     338    echo %GSDLHOME% 
     339    echo. 
     340) 
     341 
     342:: ---- Explain how to bypass Imagemagick and Ghostscript bundled with Greenstone if needed ---- 
     343echo. 
     344if exist "%GSDLHOME%\bin\windows\ghostscript\bin\*.*" echo GhostScript bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to %GSDLHOME%\bin\windows and rename the folder called ghostscript to something else. 
     345echo. 
     346echo. 
     347if exist "%GSDLHOME%\bin\windows\imagemagick\*.*" echo ImageMagick bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to %GSDLHOME%\bin\windows and rename the folder called imagemagick to something else. 
     348echo. 
     349echo. 
     350 
     351 
    248352:: ---- Finally, run the GLI ---- 
    249 echo. 
    250  
    251 if "%GLILANG%" == "en" echo Running the Greenstone Librarian Interface... 
    252 if "%GLILANG%" == "es" echo Ejecutando la Interfaz de la Biblioteca Digital Greenstone... 
    253 if "%GLILANG%" == "fr" echo Ex‚cution de Greenstone Librarian Interface 
    254 if "%GLILANG%" == "ru" echo ’¥ªãéš© ¡š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone... 
     353if "%GLILANG%" == "en" echo Running the %PROGNAME%... 
     354if "%GLILANG%" == "es" echo Ejecutando la %PROGNAME%... 
     355if "%GLILANG%" == "fr" echo Ex‚cution de %PROGNAME% 
     356if "%GLILANG%" == "ru" echo ’¥ªãéš© ¡š¡«š %PROGNAME%... 
    255357 
    256358:: -Xms32M          To set minimum memory 
     
    261363:: -Xloggc:<file>   Write garbage collection log 
    262364 
    263 if exist "%GSDLHOME%\server.exe" goto localLib  
     365 
     366:: Run GS3 if version = 3 
     367if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -gsdl3 %GSDL3HOME% -gsdl3src %GSDL3SRCHOME% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9 
     368if "%_VERSION%" == "3" goto finRun 
     369 
     370:: Run GS2 since version is 2: 
     371:: if FLI is running, we don't want the local Greenstone library server running 
     372if "%PROGABBR%" == "FLI" goto webLib 
     373    :: Else we're running GLI, so we want the local Greenstone library server (if server.exe exists, otherwise it will be webLib) 
     374    if exist "%GSDLHOME%\server.exe" goto localLib  
    264375 
    265376:webLib 
    266     "%JAVAPATH%\java" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9 
    267  
    268     if ERRORLEVEL 2 goto webLib 
    269  
     377    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9 
     378    if ERRORLEVEL 2 if not "%localLibFailed%" == "true" ( 
     379        echo webLib failed, going to localLib 
     380        set webLibFailed=true 
     381        goto localLib 
     382    ) 
     383    goto finRun  
     384 
     385:localLib 
     386    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% -local_library %GSDLHOME%\server.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 
     387    if ERRORLEVEL 2 if not "%webLibFailed%" == "true" ( 
     388        echo localLib failed, going to webLib 
     389        set localLibFailed=true 
     390        goto webLib 
     391    ) 
     392    goto finRun 
     393 
     394 
     395:finRun 
    270396    if "%GLILANG%" == "en" echo Done! 
    271397    if "%GLILANG%" == "es" echo ­Hecho! 
     
    274400    goto done 
    275401 
    276 :localLib 
    277     "%JAVAPATH%\java" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% -local_library %GSDLHOME%\server.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 
    278  
    279     if ERRORLEVEL 2 goto localLib 
    280  
    281     if "%GLILANG%" == "en" echo Done! 
    282     if "%GLILANG%" == "es" echo ­Hecho! 
    283     if "%GLILANG%" == "fr" echo Termin‚! 
    284     if "%GLILANG%" == "ru" echo ‚믮«­¥­®! 
    285     goto done 
    286402 
    287403:exit 
    288404echo. 
    289405pause 
     406color 07 
     407popd 
    290408 
    291409:done 
    292410:: ---- Clean up ---- 
    293411set PERLPATH= 
    294 set JAVAPATH= 
     412set JAVA_EXECUTABLE= 
     413color 07 
     414popd 
  • gli/branches/rtl-gli/gli.sh

    r13251 r18351  
    11#!/bin/sh 
     2 
     3# Function that, when given gsdlpath as parameter, will return the 
     4# version of greenstone that is to run (2 or 3). If things are not, 
     5# this program will exit here. 
     6get_version() { 
     7    # first parameter is value of gsdlpath 
     8    if [ -f "${1}/gs3-setup.sh" ]; then 
     9    return 3 
     10    elif [ -f "${1}/setup.bash" ]; then 
     11    return 2 
     12    else 
     13    echo "Error: can't determine which Greenstone version is being run." 
     14    exit 1 
     15    fi 
     16} 
     17 
     18# Function that is passed the following paramters (in order): 
     19# - the gsdlpath (GS3 home, GS2 home or gs2build for GS3),  
     20# - the version of greenstone that's running, and  
     21# - the language GLI is set to 
     22# and checks the installation.  
     23# If things are not right, this program will exit here. 
     24check_installation() { 
     25# Check that the Greenstone installation looks OK 
     26    if [ "$3" = "es" ]; then 
     27    echo "Revisando GSDL$2: $1" 
     28    elif [ "$3" = "fr" ]; then 
     29    echo "Vérification de GSDL$2: $1" 
     30    elif [ "$3" = "ru" ]; then 
     31    echo "ðÒÏ×ÅÒËÁ GSDL$2: $1" 
     32    else 
     33    echo "Checking GSDL$2: $1" 
     34    fi 
     35    # even if we are only checking for gs2build (gsdl2path), we still  
     36    # need the file setup.bash to exist in the following condition: 
     37    if [ ! -f "${1}/gs3-setup.sh" -a ! -f "${1}/setup.bash" ] ; then 
     38    echo 
     39    if [ "$3" = "es" ]; then 
     40        echo "No se pudo encontrar la instalación de Greenstone $2 o está incompleta." 
     41        echo "Trate de reinstalar Greenstone $2 y a continuación ejecute nuevamente" 
     42        echo "este guión." 
     43    elif [ "$3" = "fr" ]; then 
     44        echo "L'installation de Greenstone $2 est introuvable ou incomplète." 
     45        echo "Essayez de réinstaller Greenstone $2 et exécutez ce script à nouveau." 
     46    elif [ "$3" = "ru" ]; then 
     47        echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone $_version ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ." 
     48        echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone $2, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á." 
     49    else 
     50        echo "The Greenstone $2 installation could not be found, or is incomplete." 
     51        echo "Try reinstalling Greenstone $2 then running this script again." 
     52    fi 
     53    exit 1 
     54    fi 
     55} 
     56 
    257glilang=en 
    358 
     59if [ "x$PROGNAME" = "x" ] ; then 
     60  if [ "$glilang" = "es" ]; then 
     61    PROGNAME="Biblioteca Digital Greenstone" 
     62  elif [ "$glilang" = "fr" ]; then 
     63    PROGNAME="Bibliothécaire Greenstone" 
     64  elif [ "$glilang" = "ru" ]; then 
     65    PROGNAME="ÉÎÔÅÒÆÅÊÓ Greenstone" 
     66  else 
     67    PROGNAME="Greenstone Librarian Interface" 
     68  fi 
     69fi 
     70 
     71if [ "x$PROGABBR" = "x" ] ; then 
     72    PROGABBR="GLI" 
     73fi 
     74 
     75if [ "x$PROGNAME_EN" = "x" ] ; then 
     76    PROGNAME_EN="Greenstone Librarian Interface" 
     77fi 
     78 
    479echo 
    580if [ "$glilang" = "es" ]; then 
    6     echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)" 
     81    echo "Interfaz de la $PROGNAME ($PROGNAME_EN - $PROGABBR)" 
    782    echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    8     echo "La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA." 
     83    echo "La Interfaz de la $PROGNAME NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA." 
    984    echo "Para mayor información vea los términos de la licencia en LICENSE.txt" 
    1085    echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita" 
    1186elif [ "$glilang" = "fr" ]; then 
    12     echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)" 
     87    echo "Interface du $PROGNAME ($PROGNAME_EN - $PROGABBR)" 
    1388    echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    14     echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt" 
     89    echo "$PROGABBR est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt" 
    1590    echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer" 
    1691elif [ "$glilang" = "ru" ]; then 
    17     echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)" 
     92    echo "âÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME ($PROGNAME_EN - $PROGABBR)" 
    1893    echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    1994    echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT" 
    2095    echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ" 
    2196else 
    22     echo "Greenstone Librarian Interface (GLI)" 
     97    echo "$PROGNAME ($PROGABBR)" 
    2398    echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    24     echo "GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 
     99    echo "$PROGABBR comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 
    25100    echo "This is free software, and you are welcome to redistribute it" 
    26101fi 
     
    35110        echo "Este guión deberá ejecutarse desde el directorio en el que reside." 
    36111    elif [ "$glilang" = "fr" ]; then 
    37     echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve." 
     112    echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve." 
    38113    elif [ "$glilang" = "ru" ]; then 
    39     echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ" 
    40     else 
    41     echo "This script must be run from the directory in which it resides." 
     114    echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ" 
     115    else 
     116    echo "This script must be run from the directory in which it resides." 
    42117    fi 
    43118    exit 1 
     
    46121 
    47122##  ---- Determine GSDLHOME ---- 
     123## gsdlpath can be either Greenstone 3 or Greenstone 2 
    48124gsdlpath= 
    49  
    50125# Some users may set the above line manually 
    51 if [ "x$gsdlpath" = "x" ]; then 
     126 
     127 
     128# This variable is set automatically: 
     129_version= 
     130if [ "x$gsdlpath" != "x" ]; then 
     131    get_version $gsdlpath 
     132    _version=$? 
     133# otherwise $gsdlpath is not yet set 
     134else 
    52135    # Check the environment variable first 
     136    # Check whether environment variables for both GS2 and GS3 are set 
     137    # and if so, warn the user that we have defaulted to GS3 
     138    if [ "x$GSDLHOME" != "x" -a "x$GSDL3SRCHOME" != "x" ]; then 
     139        # _version not set, but both env vars set, so default to 3 
     140    _version=3 
     141    gsdlpath=$GSDL3SRCHOME 
     142    echo "Both Greenstone 2 and Greenstone 3 environments are set."  
     143    echo "It is assumed you want to run Greenstone 3." 
     144    echo "If you want to run Greenstone 2, please unset the" 
     145    echo "environment variable GSDL3SRCHOME before running GLI." 
     146    echo "" 
     147    elif [ "x$GSDL3SRCHOME" != "x" ]; then 
     148    echo "Only gsdl3srchome set" 
     149    gsdlpath=$GSDL3SRCHOME 
     150    _version=3 
     151    echo "$gsdlpath" 
     152    elif [ "x$GSDLHOME" != "x" ]; then 
     153    gsdlpath=$GSDLHOME 
     154    _version=2 
     155    # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone 
     156    else 
     157    gsdlpath=`(cd .. && pwd)` 
     158    # Still need to find what version we are running: 
     159    # GS3 main directory contains file gs3-setup.sh, GS2 only setup.bash 
     160    get_version $gsdlpath 
     161    _version=$? 
     162    fi 
     163fi 
     164 
     165echo "Greenstone version found: $_version" 
     166 
     167# Check that the main Greenstone installation for the version we're running looks OK 
     168check_installation $gsdlpath $_version $glilang 
     169 
     170 
     171# Need to source the correct setup file depending on whether we are running 
     172# gs3 or gs2 
     173# If we're running version GS2 
     174if [ "$_version" -eq 2 ]; then 
     175    # Setup Greenstone 2, unless it has already been done 
     176    if [ "x$GSDLHOME" = "x" ]; then 
     177    cd "$gsdlpath" 
     178    . ./setup.bash 
     179    cd "$thisdir" 
     180    fi 
     181# else, if we're running GS3 
     182elif [ "$_version" -eq 3 ]; then 
     183    # Setup Greenstone 3, unless it has already been done 
     184    if [ "x$GSDL3HOME" = "x" -o "x$GSDL3SRCHOME" = "x" ]; then 
     185    cd "$gsdlpath" 
     186    . ./gs3-setup.sh 
     187    cd "$thisdir" 
     188    fi 
     189     
     190    ## if Greenstone version 3 is running, we want to set gsdl2path 
     191    ##  ---- Determine GSDLHOME ---- 
     192    ## may be already set, or manually entered here. 
     193    gsdl2path= 
     194     
     195    # Some users may set the above line manually 
     196    if [ "x$gsdl2path" = "x" ]; then 
     197        # Check the environment variable first 
    53198    if [ "x$GSDLHOME" != "x" ]; then 
    54     gsdlpath=$GSDLHOME 
    55  
    56     # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone 
    57     else 
    58     gsdlpath=`(cd .. && pwd)` 
    59     fi 
    60 fi 
    61  
    62 # Check that the Greenstone installation looks OK 
    63 if [ "$glilang" = "es" ]; then 
    64     echo "Revisando GSDL: $gsdlpath" 
    65 elif [ "$glilang" = "fr" ]; then 
    66     echo "Vérification de GSDL: $gsdlpath" 
    67 elif [ "$glilang" = "ru" ]; then 
    68     echo "ðÒÏ×ÅÒËÁ GSDL: $gsdlpath" 
    69 else 
    70     echo "Checking GSDL: $gsdlpath" 
    71 fi 
    72 if [ ! -f "${gsdlpath}/setup.bash" ] ; then 
    73     echo 
    74     if [ "$glilang" = "es" ]; then 
    75     echo "No se pudo encontrar la instalación de Greenstone o está incompleta." 
    76         echo "Trate de reinstalar Greenstone y a continuación ejecute nuevamente" 
    77     echo "este guión." 
    78     elif [ "$glilang" = "fr" ]; then 
    79     echo "L'installation de Greenstone est introuvable ou incomplète." 
    80     echo "Essayez de réinstaller Greenstone et exécutez ce script à nouveau." 
    81     elif [ "$glilang" = "ru" ]; then 
    82     echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ." 
    83     echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á." 
    84     else 
    85     echo "The Greenstone installation could not be found, or is incomplete." 
    86     echo "Try reinstalling Greenstone then running this script again." 
    87     fi 
    88     exit 1 
    89 fi 
    90  
    91 # Setup Greenstone, unless it has already been done 
    92 if [ "x$GSDLHOME" = "x" ]; then 
    93     cd "$gsdlpath" 
    94     . setup.bash 
     199        echo "GSDLHOME environment variable is set to $GSDLHOME." 
     200        echo "Will use this to find build scripts." 
     201        gsdl2path=$GSDLHOME 
     202        # If it is not set, assume that the gs2build subdirectory of Greenstone 3 exists 
     203    else 
     204        gsdl2path=$GSDL3SRCHOME/gs2build 
     205    fi 
     206    fi 
     207    # Check that Greenstone 3's Greenstone 2 stuff looks OK (in gs2build) 
     208    check_installation $gsdl2path "" $glilang 
     209   
     210    # Setup Greenstone 3's gs2build, unless it has already been done 
     211    if [ "x$GSDLHOME" = "x" ]; then 
     212    cd "$gsdl2path" 
     213    . ./setup.bash 
    95214    cd "$thisdir" 
    96 fi 
    97  
     215    fi 
     216 
     217else  
     218    echo "Greenstone version unknown."     
     219    exit 1 
     220fi 
     221 
     222echo 
     223if [ "x$GSDL3SRCHOME" != "x" ]; then 
     224    echo "GSDL3SRCHOME is: $GSDL3SRCHOME" 
     225fi 
     226if [ "x$GSDL3HOME" != "x" ]; then 
     227    echo "GSDL3HOME is: $GSDL3HOME" 
     228fi 
     229if [ "x$GSDLHOME" != "x" ]; then 
     230    echo "GSDLHOME is: $GSDLHOME" 
     231fi 
     232echo 
    98233 
    99234##  ---- Check Perl exists ---- 
     
    107242 
    108243# Check that a Perl executable has been found 
    109 if [ "$glilang" = "es" ]; then 
    110     echo "Revisando Perl: $perlpath" 
    111 elif [ "$glilang" = "fr" ]; then 
    112     echo "Vérification de Perl: $perlpath" 
    113 elif [ "$glilang" = "ru" ]; then 
    114     echo "ðÒÏ×ÅÒËÁ Perl: $perlpath" 
    115 else 
    116     echo "Checking Perl: $perlpath" 
    117 fi 
     244echo "Perl:" 
    118245if [ ! -x "$perlpath" ] ; then 
    119246    echo 
    120247    if [ "$glilang" = "es" ]; then 
    121     echo "La Interfaz de la Biblioteca Digital Greenstone requiere Perl para " 
    122     echo "poder operar, pero éste no aparece en su sistema. Por favor asegúrese " 
    123     echo "de que Perl está instalado y se encuentra en su ruta de búsqueda. A " 
    124     echo "continuación ejecute nuevamente este guión." 
     248    echo "La Interfaz de la $PROGNAME requiere Perl para " 
     249    echo "poder operar, pero éste no aparece en su sistema. Por favor asegúrese " 
     250    echo "de que Perl está instalado y se encuentra en su ruta de búsqueda. A " 
     251    echo "continuación ejecute nuevamente este guión." 
    125252    elif [ "$glilang" = "fr" ]; then 
    126     echo "Greenstone Librarian Interface nécessite perl pour son fonctionnement," 
    127     echo "mais perl n'a pas pu être détecté dans votre système. Veuillez vous " 
    128     echo "assurer que perl est installé et est spécifié dans votre chemin de " 
    129     echo "recherche, puis redémarrez ce script." 
     253    echo "$PROGNAME nécessite Perl pour son fonctionnement," 
     254    echo "mais perl n'a pas pu être détecté dans votre système. Veuillez vous " 
     255    echo "assurer que perl est installé et est spécifié dans votre chemin de " 
     256    echo "recherche, puis redémarrez ce script." 
    130257    elif [ "$glilang" = "ru" ]; then 
    131     echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ" 
    132     echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ " 
    133     echo "Perl ÕÓÔÁÎÏ×ÌÅÎ É ÎÁÈÏÄÉÔÓÑ ÎÁ ×ÁÛÅÍ ÐÕÔÉ ÐÏÉÓËÁ, ÚÁÔÅÍ ÐÏ×ÔÏÒÎÏ××ÅÄÉÔÅ" 
    134     echo "ÜÔÏÔ ÓËÒÉÐÔ." 
    135     else 
    136     echo "The Greenstone Librarian Interface requires perl in order to operate," 
    137     echo "but perl could not be detected on your system. Please ensure that perl" 
    138     echo "is installed and is on your search path, then rerun this script." 
    139     fi 
    140     exit 1 
    141 fi 
    142  
    143  
    144 ## ---- Check Java exists ---- 
    145 javapath= 
    146  
    147 # Some users may set the above line manually 
    148 if [ "x$javapath" = "x" ]; then 
    149  
    150     # If it is set, use the JAVA_HOME environment variable 
    151     if [ "x$JAVA_HOME" != "x" ]; then 
    152     javapath="$JAVA_HOME/bin/java" 
    153  
    154     # Check if Java is on the search path 
    155     else 
    156     javapath=`which java 2> /dev/null` 
    157     fi 
    158 fi 
    159  
    160 # Check that a Java executable has been found 
    161 if [ "$glilang" = "es" ]; then 
    162     echo "Revisando Java: $javapath" 
    163 elif [ "$glilang" = "fr" ]; then 
    164     echo "Vérification de Java: $javapath" 
    165 elif [ "$glilang" = "ru" ]; then 
    166     echo "ðÒÏ×ÅÒËÁ Java: $javapath" 
    167 else 
    168     echo "Checking Java: $javapath" 
    169 fi 
    170 if [ ! -x "$javapath" ]; then 
    171     echo 
    172     if [ "$glilang" = "es" ]; then 
    173     echo "No se pudo localizar una versión apropiada de Java. Usted deberá " 
    174     echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) " 
    175     echo "antes de correr la Interfaz de la Biblioteca Digital Greenstone." 
    176     elif [ "$glilang" = "fr" ]; then 
    177     echo "Une version adéquate de Java n'a pas pu être localisée." 
    178     echo "Vous devez installer un Java Runtime Environment (version 1.4 ou" 
    179     echo "supérieur) avant de démarrer Greenstone Librarian Interface." 
    180     elif [ "$glilang" = "ru" ]; then 
    181     echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java." 
    182     echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)" 
    183     echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone." 
    184     else 
    185     echo "Failed to locate an appropriate version of Java. You must install a" 
    186     echo "Java Runtime Environment (version 1.4 or greater) before running the" 
    187     echo "Greenstone Librarian Interface." 
    188     fi 
    189     exit 1 
    190 fi 
     258    echo "âÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ" 
     259    echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ " 
     260    echo "Perl ÕÓÔÁÎÏ×ÌÅÎ É ÎÁÈÏÄÉÔÓÑ ÎÁ ×ÁÛÅÍ ÐÕÔÉ ÐÏÉÓËÁ, ÚÁÔÅÍ ÐÏ×ÔÏÒÎÏ××ÅÄÉÔÅ" 
     261    echo "ÜÔÏÔ ÓËÒÉÐÔ." 
     262    else 
     263    echo "The $PROGNAME requires Perl in order to operate," 
     264    echo "but perl could not be detected on your system. Please ensure that perl" 
     265    echo "is installed and is on your search path, then rerun this script." 
     266    fi 
     267    exit 1 
     268fi 
     269echo $perlpath 
     270echo 
     271 
     272## ---- Check Java ---- 
     273echo "Java:" 
     274MINIMUM_JAVA_VERSION=1.4.0_00 
     275 
     276# Some users may set this line manually 
     277#JAVA_HOME= 
     278 
     279if [ -z $javapath ]; then 
     280 
     281    # sus out search4j 
     282    if [ "$_version" -eq 2 -a -e "$GSDLHOME/bin/$GSDLOS/search4j" ]; then 
     283        SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j 
     284    elif [ "$_version" -eq 3 -a -e "$GSDL3SRCHOME/bin/$GSDLOS/search4j" ]; then 
     285        SEARCH4J_EXECUTABLE=$GSDL3SRCHOME/bin/search4j 
     286    elif [ -e "../bin/$GSDLOS/search4j" ]; then 
     287        SEARCH4J_EXECUTABLE=../bin/$GSDLOS/search4j 
     288    elif [ -e "../bin/search4j" ]; then 
     289        SEARCH4J_EXECUTABLE=../bin/search4j 
     290    else 
     291        echo "Couldn't determine the location of the search4j executable" 
     292        echo "If you are running Greenstone2" 
     293        echo "   * check GSDLHOME is set" 
     294        echo "   * check bin/$GSDLOS/search4j exists" 
     295        echo "   * check bin/$GSDLOS/search4j is executable" 
     296        echo "If you are running Greenstone3" 
     297        echo "   * check GSDL3SRCHOME is set" 
     298        echo "   * check bin/search4j exists" 
     299        echo "   * check bin/search4j is executable" 
     300        echo "   * try running 'ant compile-search4j'" 
     301    fi 
     302 
     303    # Give search4j a hint to find Java depending on the platform 
     304    if [ $GSDLOS = linux ]; then 
     305        HINT=`cd ..;pwd`/packages/jre 
     306    elif [ $GSDLOS = darwin ]; then 
     307        HINT=/System/Library/Frameworks/JavaVM.framework/Home 
     308    fi   
     309     
     310    javapath=`$SEARCH4J_EXECUTABLE -e -p $HINT -m $MINIMUM_JAVA_VERSION` 
     311 
     312    if [ "$?" != "0" ]; then 
     313 
     314        OLDVER=`"$SEARCH4J_EXECUTABLE" -v -p "$HINT"` 
     315 
     316        if [ "$?" = "0" ]; then 
     317 
     318            if [ "$glilang" = "es" ]; then 
     319                echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en " 
     320                echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar " 
     321                echo "la Interfaz de la $PROGNAME. Por favor instale " 
     322                echo "una nueva versión del Ambiente de Ejecución Java (versión $MINIMUM_JAVA_VERSION o " 
     323                echo "posterior) y ejecute nuevamente este guión." 
     324            elif [ "$glilang" = "fr" ]; then 
     325                echo "La version de Java Runtime Environment que vous avez installée est" 
     326                echo "trop vielle pour faire fonctionner $PROGNAME." 
     327                echo "Veuillez installer une nouvelle version du JRE (version $MINIMUM_JAVA_VERSION ou plus" 
     328                echo "récente) et redémarrez le script." 
     329            elif [ "$glilang" = "ru" ]; then 
     330                echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ," 
     331                echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ $PROGNAME. ðÏÖÁÌÕÊÓÔÁ, " 
     332                echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ $MINIMUM_JAVA_VERSION ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É" 
     333                echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ" 
     334            else 
     335                echo "The version of the Java Runtime Environment you have installed ($OLDVER)" 
     336                echo "is too old to run the $PROGNAME. Please install a new" 
     337                echo "version of the JRE (version $MINIMUM_JAVA_VERSION or newer) and rerun this script." 
     338            fi 
     339            exit 1 
     340 
     341        else 
     342 
     343            echo 
     344            if [ "$glilang" = "es" ]; then 
     345                echo "No se pudo localizar una versión apropiada de Java. Usted deberá " 
     346                echo "instalar un Ambiente de Ejecución Java (versión $MINIMUM_JAVA_VERSION o superior) " 
     347                echo "antes de correr la Interfaz de la $PROGNAME." 
     348            elif [ "$glilang" = "fr" ]; then 
     349                echo "Une version adéquate de Java n'a pas pu être localisée." 
     350                echo "Vous devez installer un Java Runtime Environment (version $MINIMUM_JAVA_VERSION ou" 
     351                echo "supérieur) avant de démarrer $PROGNAME." 
     352                echo "Si vous avez Java installé sur votre ordinateur veuillez vérifier la variable" 
     353                echo "d'environnement JAVA_HOME." 
     354            elif [ "$glilang" = "ru" ]; then 
     355                echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java." 
     356                echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ $MINIMUM_JAVA_VERSION ÉÌÉ ×ÙÛÅ)" 
     357                echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ $PROGNAME." 
     358            else 
     359                echo "Failed to locate an appropriate version of Java. You must install a" 
     360                echo "Java Runtime Environment (version $MINIMUM_JAVA_VERSION or greater) before running the" 
     361                echo "$PROGNAME." 
     362                echo "If you have Java intalled on your machine please set the environment variable JAVA_HOME." 
     363            fi 
     364        fi 
     365 
     366    fi 
     367 
     368fi 
     369echo $javapath 
     370echo 
    191371 
    192372 
     
    195375if [ $? -ne 2 ] ; then 
    196376    echo 
    197     if [ "$glilang" = "es" ]; then 
    198     echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en " 
    199     echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar " 
    200     echo "la Interfaz de la Biblioteca Digital Greenstone. Por favor instale " 
    201     echo "una nueva versión del Ambiente de Ejecución Java (versión 1.4 o " 
    202     echo "posterior) y ejecute nuevamente este guión." 
    203     elif [ "$glilang" = "fr" ]; then 
    204     echo "La version de Java Runtime Environment que vous avez installée est" 
    205     echo "trop vielle pour faire fonctionner Greenstone Librarian Interface." 
    206     echo "Veuillez installer une nouvelle version du JRE (version 1.4 ou plus" 
    207     echo "récente) et redémarrez le script." 
    208     elif [ "$glilang" = "ru" ]; then 
    209     echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ," 
    210     echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, " 
    211     echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É" 
    212     echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ" 
    213     else 
    214     echo "The version of the Java Runtime Environment you have installed is too" 
    215     echo "old to run the Greenstone Librarian Interface. Please install a new" 
    216     echo "version of the JRE (version 1.4 or newer) and rerun this script." 
    217     fi 
    218     exit 1 
    219377fi 
    220378 
     
    223381    echo 
    224382    if [ "$glilang" = "es" ]; then 
    225     echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone" 
    226     echo "(por medio de makegli.sh) antes de ejecutar este guión." 
     383    echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone" 
     384    echo "(por medio de makegli.sh) antes de ejecutar este guión." 
    227385    elif [ "$glilang" = "fr" ]; then 
    228     echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)" 
    229     echo "avant d'exécuter ce script." 
     386    echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)" 
     387    echo "avant d'exécuter ce script." 
    230388    elif [ "$glilang" = "ru" ]; then 
    231     echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone" 
    232     echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ" 
    233     else 
    234     echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)" 
    235     echo "before running this script." 
    236     fi 
    237     exit 1 
    238 fi 
     389    echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone" 
     390    echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ" 
     391    else 
     392    echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)" 
     393    echo "before running this script." 
     394    fi 
     395    exit 1 
     396fi 
     397 
     398## ---- Explain how to bypass Imagemagick and Ghostscript bundled with Greenstone if needed ---- 
     399if [ -e "$GSDLHOME/bin/$GSDLOS/ghostscript" ] ; then 
     400echo "GhostScript bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to $GSDLHOME/bin/$GSDLOS and rename the folder called ghostscript to something else." 
     401fi 
     402echo 
     403echo 
     404if [ -e "$GSDLHOME/bin/$GSDLOS/imagemagick" ] ; then 
     405echo "ImageMagick bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to $GSDLHOME/bin/$GSDLOS and rename the folder called imagemagick to something else." 
     406echo 
     407echo 
     408fi 
     409 
    239410 
    240411## ---- Finally, run the GLI ---- 
    241 echo 
    242412if [ "$glilang" = "es" ]; then 
    243     echo "Ejecutando la Interfaz de la Biblioteca Digital Greenstone..." 
     413    echo "Ejecutando la Interfaz de la $PROGNAME..." 
    244414elif [ "$glilang" = "fr" ]; then 
    245     echo "Exécution de Greenstone Librarian Interface" 
     415    echo "Exécution de $PROGNAME..." 
    246416elif [ "$glilang" = "ru" ]; then 
    247     echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..." 
     417    echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME..." 
    248418else 
    249     echo "Running the Greenstone Librarian Interface..." 
    250 fi 
    251  
     419    echo "Running the $PROGNAME..." 
     420fi 
     421 
     422# basic_command is the cmd string common to both Greenstone 3 and Greenstone 2 execution 
     423basic_command="$javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg" 
    252424stop_gli=0 
    253425while [ "$stop_gli" = "0" ] ; do  
    254  
    255 # Other arguments you can provide to GLI to work around memory limitations, or debug 
    256 # -Xms<number>M    To set minimum memory (by default 32MB) 
    257 # -Xmx<number>M    To set maximum memory (by default the nearest 2^n to the total remaining physical memory) 
    258 # -verbose:gc      To set garbage collection messages 
    259 # -Xincgc          For incremental garbage collection (significantly slows performance) 
    260 # -Xprof           Function call profiling 
    261 # -Xloggc:<file>   Write garbage collection log 
    262  
    263  
    264  
    265   $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl $GSDLHOME -gsdlos $GSDLOS $* 
    266   exit_status=$? 
    267  
    268   if [ "$exit_status" != "2" ] ; then 
    269     stop_gli=1 
    270   else 
    271     echo 
    272     if [ "$glilang" = "es" ]; then 
    273         echo "Restarting/Ejecutando la Interfaz de la Biblioteca Digital Greenstone..." 
    274     elif [ "$glilang" = "fr" ]; then 
    275         echo "Restarting/Exécution de Greenstone Librarian Interface" 
    276     elif [ "$glilang" = "ru" ]; then 
    277         echo "Restarting/ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..." 
    278     else 
    279         echo "Restarting the Greenstone Librarian Interface..." 
    280     fi 
    281  
    282   fi 
     426     
     427    # Other arguments you can provide to GLI to work around memory limitations, or debug 
     428    # -Xms<number>M    To set minimum memory (by default 32MB) 
     429    # -Xmx<number>M    To set maximum memory (by default the nearest 2^n to the total remaining physical memory) 
     430    # -verbose:gc      To set garbage collection messages 
     431    # -Xincgc          For incremental garbage collection (significantly slows performance) 
     432    # -Xprof           Function call profiling 
     433    # -Xloggc:<file>   Write garbage collection log 
     434     
     435    exit_status=0 
     436    if [ "$_version" -eq 2 ]; then 
     437        $basic_command -gsdl $GSDLHOME -gsdlos $GSDLOS $* 
     438        exit_status=$? 
     439    elif [ "$_version" -eq 3 ]; then     
     440        $basic_command -gsdl $GSDLHOME -gsdlos $GSDLOS -gsdl3 $GSDL3HOME -gsdl3src $GSDL3SRCHOME $* 
     441        exit_status=$? 
     442    fi 
     443     
     444    if [ "$exit_status" != "2" ] ; then 
     445        stop_gli=1 
     446    else 
     447        echo 
     448        if [ "$glilang" = "es" ]; then 
     449            echo "Restarting/Ejecutando la Interfaz de la $PROGNAME..." 
     450        elif [ "$glilang" = "fr" ]; then 
     451            echo "Restarting/Exécution de $PROGNAME..." 
     452        elif [ "$glilang" = "ru" ]; then 
     453            echo "Restarting/ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME..." 
     454        else 
     455            echo "Restarting the $PROGNAME..." 
     456        fi 
     457    fi 
    283458done  
    284459 
  • gli/branches/rtl-gli/makegli.bat

    r14333 r18351  
    11@echo off 
     2pushd "%CD%" 
     3CD /D "%~dp0" 
    24set GLILANG=en 
    35 
     
    79echo. 
    810if "%GLILANG%" == "en" echo Greenstone Librarian Interface (GLI) 
    9 if "%GLILANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
     11if "%GLILANG%" == "en" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
    1012if "%GLILANG%" == "en" echo GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt 
    1113if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it 
    1214 
    1315if "%GLILANG%" == "es" echo Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI) 
    14 if "%GLILANG%" == "es" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
     16if "%GLILANG%" == "es" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
    1517if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA. 
    1618if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los t‚rminos de la licencia en LICENSE.txt 
     
    1820 
    1921if "%GLILANG%" == "fr" echo Interface du Biblioth‚caire Greenstone (Greenstone Librarian Interface - GLI) 
    20 if "%GLILANG%" == "fr" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
     22if "%GLILANG%" == "fr" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
    2123if "%GLILANG%" == "fr" echo GLI est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt 
    2224if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous ˆtes invit‚  
     
    2426 
    2527if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone (Greenstone Librarian Interface - GLI) 
    26 if "%GLILANG%" == "ru" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
     28if "%GLILANG%" == "ru" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato 
    2729if "%GLILANG%" == "ru" echo ˆƒ ­¥ € ¥â €‘Ž‹ž’Ž ˆŠ€Šˆ• ƒ€€’ˆ‰; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT 
    2830if "%GLILANG%" == "ru" echo â® - ᢮¡®€­® à á¯à®áâ࠭塞®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­š¥ š ‚ë ¬®Š¥â¥ à á¯à®áâà ­ïâì ¥£® 
     
    137139 
    138140:: Compile the GLI 
    139 "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererProg.java src/org/greenstone/gatherer/util/DragTreeSelectionModel.java  
     141:: Sun compiler (tested with 1.5 and 1.6) didn't compile DragTreeSelectionModel.java or MetadataAuditTableModel.java automatically, so we need to put them in explicitly 
     142"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererProg.java src/org/greenstone/gatherer/util/DragTreeSelectionModel.java src/org/greenstone/gatherer/metadata/MetadataAuditTableModel.java  
    140143"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet.java 
    141 "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet4gs3.java 
     144:: "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet4gs3.java 
    142145 
    143146:: Compile the GEMS 
     
    156159:exit 
    157160echo. 
     161popd 
    158162pause 
    159163 
    160164:done 
    161165:: ---- Clean up ---- 
     166popd 
    162167set JAVACPATH= 
  • gli/branches/rtl-gli/makegli.sh

    r14332 r18351  
    55if [ "$glilang" = "es" ]; then 
    66    echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)" 
    7     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
     7    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato" 
    88    echo "La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA." 
    99    echo "Para mayor información vea los términos de la licencia en LICENSE.txt" 
     
    1111elif [ "$glilang" = "fr" ]; then 
    1212    echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)" 
    13     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
     13    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato" 
    1414    echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt" 
    1515    echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer" 
    1616elif [ "$glilang" = "ru" ]; then 
    1717    echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)" 
    18     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
     18    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato" 
    1919    echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT" 
    2020    echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ" 
    2121else 
    2222    echo "Greenstone Librarian Interface (GLI)" 
    23     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
     23    echo "Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato" 
    2424    echo "GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 
    2525    echo "This is free software, and you are welcome to redistribute it" 
     
    125125$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/GathererProg.java 
    126126$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet.java 
    127 $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet4gs3.java 
     127#$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/GathererApplet4gs3.java 
    128128# Compile the GEMS 
    129129$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/gems/GEMS.java 
  • gli/branches/rtl-gli/makejar.bat

    r13805 r18351  
    11echo off 
     2pushd "%CD%" 
     3CD /D "%~dp0" 
    24set GLILANG=en 
    35 
     
    136138 
    137139:: Recreate the metadata.zip file (contains the GLI metadata directory) 
    138 if exist jar\org\greenstone ( 
     140if exist metadata.zip ( 
    139141  del /f metadata.zip 
    140142) 
     
    168170    move SignedGatherer.jar ..\bin\java\SignedGatherer.jar 
    169171) 
     172:exit 
    170173 
     174popd 
  • gli/branches/rtl-gli/makejar.sh

    r13805 r18351  
    1717    exit 1 
    1818fi 
     19 
     20echo "Generating the JAR files for Remote Greenstone" 
    1921 
    2022## ---- Check that the GLI has been compiled ----