Ignore:
Timestamp:
2016-06-10T22:11:15+12:00 (8 years ago)
Author:
ak19
Message:

All the commits for a distributed GS3 on Windows (no changes made for linux yet). In a distributed GS3, the GS3 is installed in a read-only location and the tomcat runs from the writable TMP area, while the collections go to a writable userweb location specified by the user. (The DVD-only mode still works and is separate.) A problem remains, but exists in the TSG patched version too, and since the current commit breaks nothing, I'm committing it. The user needs to modify 4 properties in build.properties, one of which is new.They need to set using.user.web to true, set web.home to the userweb location, set gsdl3home.isreadonly to true and set gsdl3.writablehome to the tmpdir. The problem is that I can't successfully build the simple html collection if the GS3 installed location is read-only, as the perl code wants to create temporary files in gs2build\tmp which is read-only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r30304 r30568  
    169169  <property name="web.home" value="${basedir}/web"/>
    170170  <property name="web.writablehome" value="${gsdl3.writablehome}"/>
    171 
     171  <!-- If using a distributed GS3, then the user web would not contain everything in the default GS3 web
     172  (it won't contain a CGI or lib folder inside WEB-INF, for instance) -->
     173  <if>
     174    <bool><available file="${web.home}/WEB-INF/cgi" type="dir"/></bool>
     175    <property name="full.web.dir" value="${web.home}"/>
     176    <else>
     177        <property name="full.web.dir" value="${basedir}/web"/>
     178    </else>
     179  </if> 
     180 
    172181  <!-- jar files needed by applets go here -->
    173182  <property name="web.applet" value="${web.home}/applet"/>
    174 
     183 
    175184  <!-- jar files needed by the servlet (and extra ones) go here -->
    176185  <property name="web.lib" value="${web.home}/WEB-INF/lib"/>
     
    235244        preservelastmodified="true"
    236245        failonerror="true" > 
    237     <fileset dir="${web.home}/WEB-INF" includes="**"/> 
     246    <fileset dir="${full.web.dir}/WEB-INF" includes="**"/> 
    238247      </copy>
    239248
     
    631640 
    632641  <path id="derby.server.classpath">
    633     <pathelement location="${web.lib}/derbynet.jar"/>
    634     <pathelement location="${web.lib}/derby.jar"/>
     642    <pathelement location="${web.writablelib}/derbynet.jar"/>
     643    <pathelement location="${web.writablelib}/derby.jar"/>
    635644  </path>
    636645
     
    12721281    <bool><not><equals arg1="${web.home}" arg2="${web.writablehome}"></equals></not></bool>
    12731282    <mkdir dir="${web.writablehome}"/>
    1274     <copy file="${web.home}/WEB-INF/cgi/gliserver.pl"       tofile="${web.writablehome}/WEB-INF/cgi/gliserver.pl"       overwrite="true"/>
    1275     <copy file="${web.home}/WEB-INF/cgi/metadata-server.pl" tofile="${web.writablehome}/WEB-INF/cgi/metadata-server.pl" overwrite="true"/>
    1276     <copy file="${web.home}/WEB-INF/cgi/checksum.pl"        tofile="${web.writablehome}/WEB-INF/cgi/checksum.pl"        overwrite="true"/>
     1283    <copy file="${full.web.dir}/WEB-INF/cgi/gliserver.pl"       tofile="${web.writablehome}/WEB-INF/cgi/gliserver.pl"       overwrite="true"/>
     1284    <copy file="${full.web.dir}/WEB-INF/cgi/metadata-server.pl" tofile="${web.writablehome}/WEB-INF/cgi/metadata-server.pl" overwrite="true"/>
     1285    <copy file="${full.web.dir}/WEB-INF/cgi/checksum.pl"        tofile="${web.writablehome}/WEB-INF/cgi/checksum.pl"        overwrite="true"/>
    12771286      </if>
    12781287
Note: See TracChangeset for help on using the changeset viewer.