greenstone.org greenstone wiki greenstone trac planet greenstone

Changeset 15191

Show
Ignore:
Timestamp:
2008-04-14 16:20:45 (5 months ago)
Author:
dmn
Message:

updating branch from trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • greenstone3/branches/customizingGreenstone3/README.txt

    r13856 r15191  
    2121See 'Installing from a Source Distribution' section below for extra notes about installing from Source. 
    2222 
    23 See the README-CVS.txt file for extra notes about installing from CVS
     23See the README-SVN.txt file for extra notes about installing directly from SVN
    2424 
    2525Running Greenstone: 
    2626--------------------------------------------------------- 
    2727 
    28 To start up Greenstone, select Greenstone 2 Digital Library from the Start menu (Windows), or run gs3-server.sh/bat. This launches a small server program, which starts up Tomcat and launches a browser. A small window pops up which allows you to chnage some settings for your library and restart the Tomcat server. Closing this program will stop Tomcat running. 
     28To start up Greenstone, select Greenstone3 Digital Library from the Start menu (Windows), or run gs3-server.sh/bat. This launches a small server program, which starts up Tomcat and launches a browser. A small window pops up which allows you to chnage some settings for your library and restart the Tomcat server. Closing this program will stop Tomcat running. 
    2929 
    3030Alternatively, you can start Tomcat directly through using Ant. 'ant start', 'ant restart' and 'ant stop' starts, restarts and shuts down Tomcat, respectively. This will only start/stop a local server (one installed by Greenstone). You will need to manually start/stop an external Tomcat (see below for notes about using a version of Tomcat external to Greenstone). 
     
    3939You need to have Perl installed and on your PATH. Perl is included as part of  
    4040the Windows binary distribution. 
    41 run  'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat. This is a  
    42 graphical tool for building collections. Once you have created and built a  
    43 collection, you can see it by clicking 'Preview collection' on the Build panel. 
     41You can build collections using the Greenstone Librarian Interface (GLI). To start GLI, run  'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat.  
     42Once you have created and built a collection, you can see it by clicking 'Preview collection' on the Build panel. 
    4443 
    4544Note that GLI doesn't start up the Greenstone Tomcat server so you should  
     
    141140Download the greenstone-3.xx-src.tar.gz package from sourceforge.net/projects/greenstone3, and unpack it. 
    142141In the greenstone3 directory, edit the build.properties file and run  
    143 ant prepare install 
     142ant install 
    144143 
    145144Tomcat will be installed as part of the prepare process. To stop this set the tomcat.installed.path to be the root of an existing Tomcat installation.  
     
    181180To recompile your Greenstone3 installation, in the top level greenstone3 directory, run: 
    182181 
     182ant clean (use distclean instead if you want to regenerate the C++ Makefiles) 
    183183ant configure 
    184184ant configure-c++ 
    185 ant clean 
    186185ant compile 
    187186 
  • greenstone3/branches/customizingGreenstone3/bin/script/convert_coll_from_gs2.pl

    r13917 r15191  
    128128    my $collwriter = new XML::Writer(OUTPUT => $colloutput, NEWLINES => 1); 
    129129     
    130     $collwriter->startTag('collectionConfig', 'xmlns:gsf'=>"http://www.greenstone.org/greenstone3/schema/ConfigFormat", 'xmlns:xsl'=>'http://www.w3.org/1999/XSL/Transform'); 
     130    $collwriter->startTag('CollectionConfig', 'xmlns:gsf'=>"http://www.greenstone.org/greenstone3/schema/ConfigFormat", 'xmlns:xsl'=>'http://www.w3.org/1999/XSL/Transform'); 
    131131     
    132132    #output the collection metadata to the collectionConfig file 
     
    134134     
    135135    my $creator = $collectcfg->{'creator'}; 
    136     &output_metadata($collwriter, 'creator', $creator); 
     136    &output_metadata($collwriter,'default', 'creator', $creator); 
    137137    my $public =$collectcfg->{'public'}; 
    138     &output_metadata($collwriter, 'public', $public); 
     138    &output_metadata($collwriter,'default', 'public', $public); 
     139     
    139140    $collwriter->endTag('metadataList'); 
    140141 
     
    169170    my $numdocs = $buildcfg->{'numdocs'}; 
    170171    $buildwriter->startTag('metadataList'); 
    171     &output_metadata($buildwriter, 'numDocs', $numdocs); 
    172     &output_metadata($buildwriter, 'buildType', $buildtype); 
     172    &output_metadata($buildwriter,'', 'numDocs', $numdocs); 
     173    &output_metadata($buildwriter,'', 'buildType', $buildtype); 
    173174    $buildwriter->endTag('metadataList'); 
    174175     
     
    191192            $indexmap->{$k} = $v; 
    192193            push @indexlist, $k; 
    193             if ($first) { 
    194                 $defaultindex = $v
     194            if ($first == 1) { 
     195                $defaultindex = $k
    195196                $first = 0; 
    196197            }    
     
    202203    if (defined $collectcfg->{'defaultindex'}) { 
    203204        $defaultindex = $collectcfg->{'defaultindex'}; 
    204         $defaultindex = $indexmap->{$defaultindex}; 
     205        #$defaultindex = $indexmap->{$defaultindex}; 
    205206    } 
    206207     
     
    209210    my @levellist = (); 
    210211    my $default_search_level = ""; 
     212    my $default_search_level_shortname = ""; 
    211213    my $default_retrieve_level = "Sec"; 
    212214    $first = 1; 
     
    219221                push @levellist, $k; 
    220222                if ($first) { 
    221                     $default_search_level = $v; 
     223                    $default_search_level = $k; 
     224                    $default_search_level_shortname = $v; 
    222225                    $first = 0; 
    223226                } 
     
    227230        if (defined $collectcfg->{'defaultlevel'}) { 
    228231            $default_search_level = $collectcfg->{'defaultlevel'}; 
    229             $default_search_level = $levelmap->{$default_search_level}; 
     232            #$default_search_level = $levelmap->{$default_search_level}; 
     233            $default_search_level_shortname = $levelmap->{$default_search_level}; 
    230234        } 
    231235        if (defined $buildcfg->{'textlevel'}) { 
     
    237241 
    238242    #output the search stuff to coll cfg 
    239     $collwriter->startTag('search'); 
     243    $collwriter->startTag('search','type'=>$buildtype); 
    240244    foreach my $i (keys %$indexmap) { 
    241245        $collwriter->startTag('index', 'name'=>$i); 
     
    244248        foreach my $lang (keys %{$collectionmeta->{$indexdisplay}}) { 
    245249            my $value = $collectionmeta->{$indexdisplay}->{$lang}; 
    246             output_display($collwriter, 'name', $lang, $value); 
     250            output_display($collwriter, 'name', $lang, $i); 
    247251        } 
    248252        $collwriter->endTag('index'); 
     253    } 
     254 
     255    #output the defaultIndex to coll cfg 
     256    $collwriter->emptyTag('defaultIndex','name'=>$defaultindex); 
     257 
     258    #indexSubcollection 
     259    my $indexsubcollections = $collectcfg->{'indexsubcollections'}; 
     260    
     261    if (defined $indexsubcollections) { 
     262        my $indexsubcollections_t= $collectcfg->{'indexsubcollections'}; 
     263        foreach my $i ( @$indexsubcollections_t) { 
     264            $collwriter->startTag('indexSubcollection', 'name'=>$i); 
     265            &output_display($collwriter, 'name', $defaultlang, $i); 
     266            $collwriter->endTag('indexSubcollection'); 
     267        } 
     268    }  
     269 
     270    #subcollection 
     271    my $subcollection = $collectcfg->{'subcollection'}; 
     272    if (defined $subcollection){ 
     273        foreach my $entry (keys %$subcollection){ 
     274            my $value = $subcollection->{$entry}; 
     275            $collwriter->emptyTag('subcollection','filter'=>$value,'name'=>$entry); 
     276        } 
     277    } 
     278 
     279    #indexlanguage 
     280    my $languages = $collectcfg->{'languages'}; 
     281    if (defined $languages){ 
     282        my $languages_t = $collectcfg->{'languages'}; 
     283        foreach my $i (@$languages_t){ 
     284            $collwriter->startTag('indexLanguage','name'=>$i); 
     285             &output_display($collwriter, 'name', $defaultlang, $i); 
     286            $collwriter->endTag('indexLanguage'); 
     287        } 
    249288    } 
    250289 
     
    261300            $collwriter->endTag('level'); 
    262301        } 
    263     } 
     302        $collwriter->emptyTag('defaultLevel', 'name'=>$default_search_level); 
     303    } 
     304     
     305    # add in the search type  
     306    if (defined $format->{'SearchTypes'}){ 
     307        $collwriter->startTag('format', 'name'=>"searchType"); 
     308        $collwriter->charactersXML($format->{'SearchTypes'}); 
     309        $collwriter->endTag('format'); 
     310    } 
     311 
    264312    # add in the format stuff 
    265313    if (defined $format->{'SearchVList'}) { 
     
    276324     
    277325    $collwriter->endTag('search'); 
    278      
     326 
     327    # import plugins 
     328   
     329    my $plugins = $collectcfg->{'plugin'}; 
     330     
     331    if (defined $plugins){ 
     332        $collwriter->startTag('import'); 
     333        $collwriter->startTag('pluginList'); 
     334        foreach my $pl (@$plugins) { 
     335            my ($pluginname) = @$pl[0]; 
     336            $collwriter->startTag('plugin','name'=>$pluginname); 
     337 
     338            for (my $i=1; $i<scalar(@$pl); $i++) { 
     339                my $arg =@$pl[$i]; 
     340                if ($arg =~ /^-/){ 
     341                    my $option_name=@$pl[$i]; 
     342                    my $option_value=@$pl[$i+1]; 
     343                    if (defined $option_value){ 
     344                        if ($option_value =~ /^-/){ 
     345                            $collwriter->startTag('option','name'=>$option_name);  
     346                            $collwriter->endTag('option'); 
     347                        }else{ 
     348                            $collwriter->startTag('option','name'=>$option_name,'value'=>$option_value);  
     349                            $collwriter->endTag('option'); 
     350                        } 
     351                    } 
     352                } 
     353            } 
     354            $collwriter->endTag('plugin'); 
     355        } 
     356        $collwriter->endTag('pluginList'); 
     357        $collwriter->endTag('import'); 
     358    } 
     359 
    279360    $buildwriter->startTag('serviceRackList'); 
    280361     
     
    288369    } 
    289370 
     371 #indexSubcollectionList 
     372 
     373    my $subcollectionmap = $buildcfg->{'subcollectionmap'}; 
     374    my $firstsubcollection = 1; 
     375    my $defaultsubcollection = ""; 
     376    my @subcollist; 
     377    my $subcolmap = {}; 
     378 
     379    if (defined $buildcfg->{'subcollectionmap'}) { 
     380        my $subcolmap_t = $buildcfg->{'subcollectionmap'}; 
     381 
     382        foreach my $l (@$subcolmap_t) { 
     383            my @pair = split(/->/, $l); 
     384            $subcolmap->{$pair[0]} = $pair[1]; 
     385            push @subcollist, $pair[0]; 
     386            if ($firstsubcollection==1) { 
     387                $defaultsubcollection = $pair[1]; 
     388                $firstsubcollection = 0; 
     389            }    
     390        } 
     391 
     392    } 
     393 
     394 
    290395    #do the retrieve service 
    291396    $buildwriter->startTag('serviceRack', 'name'=>"GS2".$service_type."Retrieve"); 
     
    294399    } elsif ($buildtype eq "mg") { 
    295400        $buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex); 
    296          
    297     } 
     401    } 
     402     
     403    if ((defined $defaultsubcollection) && ($defaultsubcollection ne "")) { 
     404        $buildwriter->emptyTag('defaultIndexSubcollection', 'shortname'=>$defaultsubcollection); 
     405    } 
     406 
    298407    if (defined $indexstem) { 
    299408        $buildwriter->emptyTag('indexStem', 'name'=>$indexstem); 
     
    362471            if ($horizontalAtTop) { 
    363472                $buildwriter->emptyTag('classifier', 'name'=>$name, 'content'=>$content, 'horizontalAtTop'=>'true'); 
     473 
    364474            } else { 
    365475                $buildwriter->emptyTag('classifier', 'name'=>$name, 'content'=>$content); 
     
    367477             
    368478             
    369             $collwriter->startTag('classifier', 'name'=>$name); 
     479           # $collwriter->startTag('classifier', 'name'=>$name); 
     480            $collwriter->startTag('classifier', 'name'=>$classname); 
     481            for (my $i=1; $i<scalar(@$cl); $i++) { 
     482                my $arg =@$cl[$i]; 
     483                if ($arg =~ /^-/){ 
     484                    my $option_name=@$cl[$i]; 
     485                    my $option_value=@$cl[$i+1]; 
     486                    if (defined $option_value){ 
     487                        if ($option_value=~ /^-/){ 
     488                            $collwriter->startTag('option','name'=>$option_name);  
     489                            $collwriter->endTag('option'); 
     490                        }else{ 
     491                            $collwriter->startTag('option','name'=>$option_name,'value'=>$option_value);  
     492                            $collwriter->endTag('option'); 
     493                        } 
     494                    } 
     495                } 
     496            } 
     497 
    370498            my $vlist = $name."VList"; 
    371499            my $hlist = $name."HList"; 
     
    411539    # do the search service 
    412540    $buildwriter->startTag('serviceRack', 'name'=>'GS2'.$service_type.'Search'); 
    413     $buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex); 
     541    #$buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex); 
    414542    $buildwriter->startTag('indexList'); 
    415543    #for each index 
     
    444572                 
    445573        # level info 
    446         $buildwriter->emptyTag('defaultLevel', 'shortname'=>$default_search_level); 
     574        $buildwriter->emptyTag('defaultLevel', 'shortname'=>$default_search_level_shortname); 
    447575        $buildwriter->emptyTag('defaultGDBMLevel', 'shortname'=>$default_retrieve_level); 
    448576        $buildwriter->startTag('levelList'); 
     
    474602    }  
    475603     
    476  
    477      
     604    #indexLanguageList 
     605    my $indexlanguages = $collectcfg->{'languages'}; 
     606    my $firstindexlanguage = 1; 
     607    my $defaultindexlanguage_shortname; 
     608    if (defined $indexlanguages){ 
     609        $buildwriter->startTag('indexLanguageList'); 
     610        my $languages_t = $collectcfg->{'languages'}; 
     611        foreach my $i (@$languages_t){ 
     612            $buildwriter->startTag('indexLanguage','name'=>$i); 
     613             &output_display($buildwriter, 'name', $i, $i); 
     614            $buildwriter->endTag('indexLanguage'); 
     615            if ($firstindexlanguage==1){ 
     616                $defaultindexlanguage_shortname = $i; 
     617                $firstindexlanguage=0; 
     618            } 
     619        } 
     620    $buildwriter->endTag('indexLanguageList'); 
     621    $buildwriter->startTag('defaultIndexLanguage', 'name'=>$defaultindexlanguage_shortname,'shortname'=>$defaultindexlanguage_shortname); 
     622    $buildwriter->endTag('defaultIndexLanguage'); 
     623    } 
     624 
     625  #  my $defaultsubcollection = ""; 
     626   # my @subcollist; 
     627 
     628    if (scalar(@subcollist)>0){ 
     629 
     630        $buildwriter->startTag('indexSubcollectionList'); 
     631        foreach my $i (keys %$subcolmap){ 
     632            my $short_name = $subcolmap->{$i}; 
     633            $buildwriter->emptyTag('indexSubcollection', 'name'=>$i, 'shortname'=>$short_name); 
     634        } 
     635 
     636        $buildwriter->endTag('indexSubcollectionList'); 
     637        $buildwriter->emptyTag('defaultIndexSubcollection', 'shortname'=>$defaultsubcollection); 
     638    } 
     639 
     640    
    478641    $buildwriter->endTag('serviceRack'); 
    479642     
     
    484647    # collection 
    485648    $collwriter->emptyTag('replaceListRef', 'id'=>'gs2-standard'); 
    486     $collwriter->endTag('collectionConfig'); 
     649    $collwriter->endTag('CollectionConfig'); 
    487650    $collwriter->end(); 
    488651    $buildwriter->end(); 
     
    494657 
    495658sub output_metadata { 
    496     my ($writer, $metaname,  $metavalue) = @_; 
    497     $writer->startTag('metadata',  'name'=>$metaname); 
     659    my ($writer, $lang, $metaname,  $metavalue) = @_; 
     660    $lang = 'en' if $lang eq 'default'; 
     661    if ($lang ne ""){ 
     662        $writer->startTag('metadata', 'lang'=>$lang, 'name'=>$metaname); 
     663    }else{ 
     664        $writer->startTag('metadata', 'name'=>$metaname); 
     665    } 
    498666    $writer->characters($metavalue); 
    499667    $writer->endTag('metadata'); 
     
    506674        ($lang) = $lang =~ /\[l=(.*)\]/; 
    507675    } 
     676 
    508677    $writer->startTag('displayItem', 'name'=>$name, 'lang'=>$lang); 
    509678    $writer->characters($value); 
  • greenstone3/branches/customizingGreenstone3/build.properties

    r13615 r15191  
    5050## Mac OS X specific stuff 
    5151# set the path to your GDBM here 
    52 gdbm.installed.path= 
     52#install.gdbm=true 
     53#gdbm.installed.path=${gdbm.home} 
     54 
     55##Flax stuff## 
     56##uncomment if you want to install flax 
     57#install.flax=true 
  • greenstone3/branches/customizingGreenstone3/build.xml

    r15038 r15191  
    11<?xml version="1.0"?> 
    2  
    32<!-- ======================================================================  
    43     March 2005                                                     
    54 
    65     Greenstone3 build and install script 
    7                    
     6                   
    87     kjdon                                                                 
    98     ====================================================================== --> 
    109<project name="greenstone3" default="usage" basedir="."> 
    1110 
    12         <!-- ============ classpath =================== --> 
    13         <path id="project.classpath"> 
    14            <fileset dir="lib/java"> 
    15               <include name="**/*.jar"/> 
    16            </fileset> 
    17         </path> 
    18  
    19         <!-- ============ self defined tasks =================== --> 
    20  
    21         <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpath="${basedir}/lib/java/anttasks.jar"/> 
    22         <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpath="${basedir}/lib/java/anttasks.jar"/> 
    23         <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/> 
    24         <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpath="${basedir}/lib/java/anttasks.jar"/> 
    25  
    26 <!-- ===================== Property Definitions =========================== --> 
    27  
    28 <!-- 
     11  <!-- ============ classpath =================== --> 
     12  <path id="project.classpath"> 
     13    <fileset dir="lib/java"> 
     14      <include name="**/*.jar"/> 
     15    </fileset> 
     16  </path> 
     17   
     18  <!-- ============ self defined tasks =================== --> 
     19  <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpathref="project.classpath"/> 
     20  <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpathref="project.classpath"/> 
     21  <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/> 
     22  <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/> 
     23  <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/> 
     24  <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/> 
     25   
     26  <!-- ===================== Property Definitions =========================== --> 
     27   
     28  <!-- 
    2929 
    3030  Each of the following properties are used in the build script. 
     
    3535 
    3636  * Definitions from a "build.properties" file in the top level 
    37     source directory of this application. 
     37  source directory of this application. 
    3838 
    3939  * Definitions from a "build.properties" file in the user's 
    40     home directory. 
     40  home directory. 
    4141 
    4242  * Default definitions in this build.xml file. 
     
    4848  "build.properties" files as well as in the "build.xml" script. 
    4949 
    50 --> 
    51  
     50  --> 
     51 
     52   
     53  <!--the first two properties have to be put on the top to be used by build.properties--> 
     54  <property name="src.packages.home" value="${basedir}/src/packages"/> 
     55  <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/> 
    5256  <property file="build.properties"/> 
    5357  <property file="${user.home}/build.properties"/> 
     
    5559  <!-- get properties from the environment --> 
    5660  <property environment="env"/> 
     61 
     62     
     63  <!-- version properties for external packages --> 
     64  <property name="tomcat.version" value="apache-tomcat-5.5.25"/> 
     65  <property name="axis.zip.version" value="axis-bin-1_2_1.zip"/> 
     66  <property name="axis.dir.version" value="axis-1_2_1"/> 
     67  <property name="gdbm.version" value="gdbm-1.8.3"/> 
     68 
    5769  <property name="build.home" value="${basedir}/build"/> 
    5870  <property name="src.home" value="${basedir}/src/java"/> 
    59   <property name="src.packages.home" value="${basedir}/src/packages"/> 
    6071  <property name="packages.home" value="${basedir}/packages"/> 
    6172  <!-- this may be set in build.properties, eg if you move the web dir to  
     
    6879  <!-- other files needed by the servlet go here --> 
    6980  <property name="web.classes" value="${web.home}/WEB-INF/classes"/> 
     81  <!--- flax: the WordNet home --> 
     82  <property name="wn.home" value="${web.home}/WEB-INF/classes/flax/WordNet"/> 
     83 
    7084  <!-- jni libraries and java wrappers go here --> 
    7185  <property name="lib.jni" value="${basedir}/lib/jni"/> 
    72      
     86   
    7387  <property name="javadocs" value="${basedir}/docs/javadoc"/> 
    7488 
     
    7791 
    7892 
    79   <!-- version number stuff --> 
    80  
    81   <!-- app.version defaults to trunk --> 
    82   <condition property="app.version" value="trunk"> 
    83     <not><isset property="app.version"/></not> 
    84   </condition> 
    85  
    86         <!-- determine the 'branch path' --> 
    87   <condition property="branch.path" value="trunk"> 
    88     <equals arg1="${app.version}" arg2="trunk" /> 
    89   </condition> 
    90   <condition property="branch.path" value="branches/${app.version}"> 
    91     <not><equals arg1="${app.version}" arg2="trunk" /></not> 
    92   </condition> 
    93  
    94  
     93  <!-- defaults - set these on the command line or in build.properties or they will take these default values--> 
     94  <property name="app.version" value="trunk"/> 
     95  <property name="branch.path" value="trunk"/> 
     96  <property name="branch.revision" value="HEAD"/> 
     97 
     98  <!--constants --> 
    9599  <property name="flax.svn.root" value="http://svn.greenstone.org/flax"/> 
    96  
    97100  <property name="svn.root" value="http://svn.greenstone.org"/> 
    98 <!--  <property name="cvs.root" value=":pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src"/> --> 
     101 
     102  <!--  <property name="cvs.root" value=":pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src"/> --> 
    99103  <!-- catalina home is set to tomcat basedir is already installed, otherwise 
    100104  use greenstone's tomcat --> 
     
    159163    <isset property="disable.collection.building"/> 
    160164  </condition> 
    161      
     165 
     166  <!-- where is search4j tool --> 
     167  <condition property="search4j.exec" value="bin/search4j.exe">  
     168    <isset property="current.os.iswindows"/> 
     169  </condition> 
     170  <property name="search4j.exec" value="bin/search4j"/> 
     171 
     172   
    162173  <!-- ============= Base dirs for each package and component ============ --> 
    163174  <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/> 
     
    167178  <property name="gli.home" value="${basedir}/gli"/> 
    168179  <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/> 
    169   <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/> 
    170  
     180   
    171181  <!--<property name="indexers.home" value="${basedir}/src/packages/indexers">--> 
    172182  <condition property="indexers.home" value="${basedir}/src/packages/indexers"> 
     
    184194 
    185195 
    186 <!--  ==================== Compilation Control Options ==================== --> 
    187  
    188 <!-- 
     196  <!--  ==================== Compilation Control Options ==================== --> 
     197 
     198  <!-- 
    189199 
    190200  These properties control option settings on the Javac compiler when it 
     
    197207  compile.optimize     Should compilation include the optimize option? 
    198208 
    199 --> 
     209  --> 
    200210 
    201211  <property name="compile.debug"       value="true"/> 
     
    203213  <property name="compile.optimize"    value="true"/> 
    204214 
    205 <!-- 
     215  <!-- 
    206216 
    207217  Rather than relying on the CLASSPATH environment variable, Ant includes 
     
    212222  that you explicitly added. 
    213223 
    214 --> 
     224  --> 
    215225 
    216226  <path id="compile.classpath"> 
     
    228238    <!-- Include the axis jar files --> 
    229239    <!--<fileset dir="${basedir}/comms/soap/axis/lib"> 
    230       <include name="*.jar"/> 
    231     </fileset>--> 
     240    <include name="*.jar"/> 
     241  </fileset>--> 
    232242     
    233243    <!-- include the jar files from the source packages --> 
     
    265275    <pathelement path="${env.PATH}"/> 
    266276    <pathelement path="${env.Path}"/> 
     277    <pathelement path="${wn.home}/bin"/> 
    267278  </path> 
    268279 
     
    275286    <echo>os.unix: ${os.unix}</echo> 
    276287  </target> 
    277 <!-- ==================== Primary and Global Targets ============================= --> 
     288  <!-- ==================== Primary and Global Targets ============================= --> 
    278289 
    279290  <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? --> 
    280291 
    281   <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm
     292  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm, prepare-flax
    282293    description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional subversion checkouts and downloads, so you need to be online to run this."> 
    283 <!--  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections" 
     294    <!--  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections" 
    284295    description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional cvs checkouts and downloads, so you need to be online to run this.">--> 
    285296 
     
    293304    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/> 
    294305   
    295 <!--  <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web" 
    296     description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>--> 
     306  <!--  <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web" 
     307  description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>--> 
    297308  <target name="svnupdate" depends="init,svnupdate-packages,svnupdate-core,svnupdate-gs2building,svnupdate-web" 
    298309    description="Do a `svn update` for all sources. Doesn't recompile the code. You need to be online to run this."/> 
     
    305316    description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/> 
    306317 
    307   <target name="clean" depends="init,clean-gdbm,clean-packages,clean-core,clean-gs2building
     318  <target name="clean" depends="init,clean-packages,clean-core,clean-gs2building,clean-gdbm
    308319    description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/> 
     320   
     321  <target name="distclean" depends="init,distclean-packages,clean-core,distclean-gs2building,distclean-gdbm" 
     322    description="Remove all compiled code and also any Makefiles etc generated during configure-c++. Includes core, packages, gs2building as necessary"/> 
    309323   
    310324  <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building" 
    311325    description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/> 
    312      
     326   
    313327  <target name="update" depends="init,svnupdate,clean,configure,configure-c++,compile"  
    314     description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile."/> 
     328    description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile. To do this without any SVN updates, run it like 'ant -Dnosvn.mode=yes update'"/> 
    315329 
    316330  <target name="start" depends="init,start-tomcat" 
    317331    description="Startup the Tomcat server." > 
    318        <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>  
    319        <echo>Tomcat:  ${catalina.home}</echo>  
    320        <echo>Java:    ${java.home}</echo> 
    321         <echo>URL:    http://${tomcat.server}:${tomcat.port}${app.path}/</echo> 
    322         <!-- assuming that index.html is not needed here -->    
     332    <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>  
     333    <echo>Tomcat:     ${catalina.home}</echo>  
     334    <echo>Java:       ${java.home}</echo> 
     335    <echo>URL:        http://${tomcat.server}:${tomcat.port}${app.path}/</echo> 
     336    <!-- assuming that index.html is not needed here -->    
    323337  </target> 
    324338 
     
    329343 
    330344 
    331 <!-- =========== Help targets ===================================  --> 
     345  <!-- =========== Help targets ===================================  --> 
    332346   
    333347  <property name="install-command" value="ant [options] prepare install"/> 
     
    337351    <echo message="  Execute 'ant -help' for Ant help."/> 
    338352    <echo>To install Greenstone3, run '${install-command}'.  
    339 There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option. 
    340 To log the output, use the '-logfile build.log' option. 
    341 The README.txt file has more information about the ant targets and install process. 
     353      There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option. 
     354      To log the output, use the '-logfile build.log' option. 
     355      The README.txt file has more information about the ant targets and install process. 
    342356    </echo> 
    343357  </target> 
     
    349363  </target> 
    350364 
    351 <!-- ====== initialization and setup targets ================== --> 
     365  <!-- ====== initialization and setup targets ================== --> 
    352366 
    353367  <target name="accept-properties" unless="properties.accepted"> 
    354368    <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory: 
    355 tomcat.server=${tomcat.server} 
    356 tomcat.port=${tomcat.port}  
    357 tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed) 
    358 proxy.host=${proxy.host} 
    359 proxy.port=${proxy.port} 
    360 If these are not acceptable, please change them and rerun this target. Continue [y/n]? /> 
     369      tomcat.server=${tomcat.server} 
     370      tomcat.port=${tomcat.port}  
     371      tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed) 
     372      proxy.host=${proxy.host} 
     373      proxy.port=${proxy.port} 
     374      If these are not acceptable, please change them and rerun this target. Continue [y/n]? /> 
    361375    </input> 
    362376    <condition property="do.abort">  
     
    366380  </target> 
    367381 
    368 <!--  <target name="check-cvsroot"> 
    369     <condition property="svnroot.notset"> 
    370       <or> 
    371                         <not> 
    372                           <isset property="env.CVSROOT"/> 
    373                         </not> 
    374                         <equals arg1="" arg2="${env.CVSROOT}"/> 
    375       </or> 
    376     </condition> 
    377     <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/> 
    378   </target> --> 
    379382 
    380383  <!-- this sets up some initial properties --> 
     
    403406    </condition> 
    404407     
    405       <echo>tomcat.port = ${tomcat.port}</echo> 
    406       <echo>gli.present = ${gli.present}</echo>  
    407       <echo>gs2build.present = ${gs2build.present}</echo> 
    408       <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo> 
    409     <!-- gsdl2.installed.path appears not to be set? --> 
     408    <echo>tomcat.port = ${tomcat.port}</echo> 
     409    <echo>gli.present = ${gli.present}</echo>  
     410    <echo>gs2build.present = ${gs2build.present}</echo> 
     411    <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo> 
     412    <!-- gsdl2.installed.path appears not to be set? --> 
    410413 
    411414    <condition property="proxy.present"> 
     
    438441    <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/> 
    439442  </target> 
    440       
    441  <!-- ========== Web app Targets ================================ --> 
     443   
     444  <!-- ========== Web app Targets ================================ --> 
    442445   
    443446  <target name="prepare-web" depends="init,configure-java-version"> 
     
    446449  </target> 
    447450   
    448   <!-- if we are using java 1.5, we need the xalan.jar file in web/WEB-INF/lib,  but if we are using java 1.4, we can't have it there --> 
     451  <!-- if we are using java 1.5+, we need the xalan.jar file in web/WEB-INF/lib,  but if we are using java 1.4, we can't have it there --> 
    449452  <target name="configure-java-version" depends="init" 
    450     description="Run this target if you have changed the default version of java since installing greenstone3"> 
     453    description="Activates or deactivates some jar libraries as needed depending on your java version"> 
     454 
     455    <available property="have.xalan.jar" file="${web.lib}/xalan.jar"/> 
    451456    <condition property="need.xalan.jar"> 
    452       <equals arg1="1.5" arg2="${ant.java.version}"/> 
     457      <or> 
     458        <equals arg1="1.5" arg2="${ant.java.version}"/> 
     459        <equals arg1="1.6" arg2="${ant.java.version}"/> 
     460      </or> 
    453461    </condition> 
    454     <antcall target="activate-xalan-jar"/> 
    455     <antcall target="deactivate-xalan-jar"/> 
    456   </target> 
    457    
    458   <target name="activate-xalan-jar" if="need.xalan.jar"> 
     462 
     463    <!-- if they have xalan.jar but dont need it --> 
     464    <if> 
     465      <bool> 
     466        <and> 
     467          <isset property="have.xalan.jar"/> 
     468          <not><isset property="need.xalan.jar"/></not> 
     469        </and> 
     470      </bool> 
     471      <antcall target="deactivate-xalan-jar"/> 
     472    </if> 
     473 
     474    <!-- if they need xalan.jar but dont have it --> 
     475    <if> 
     476      <bool> 
     477        <and> 
     478          <not><isset property="have.xalan.jar"/></not> 
     479          <isset property="need.xalan.jar"/> 
     480        </and> 
     481      </bool> 
     482      <antcall target="activate-xalan-jar"/> 
     483    </if> 
     484 
     485  </target> 
     486   
     487  <target name="activate-xalan-jar"> 
     488    <echo>activating xalan.jar</echo> 
    459489    <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/> 
    460     <antcall target="copy-xalan-for-mac" /> 
    461   </target> 
    462  
    463   <target name="copy-xalan-for-mac" if="current.os.ismac"> 
    464        <copy file="${web.lib}/xalan.jar.tmp" tofile="${tomcat.installed.path}/common/endorsed/xalan.jar"/>  
    465   </target> 
    466  
    467   <target name="deactivate-xalan-jar" unless="need.xalan.jar"> 
     490    <if><bool><isset property="current.os.ismac"/></bool> 
     491      <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>