Show
Ignore:
Timestamp:
10.06.2016 22:11:15 (4 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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/gs3-setup.bat

    r27832 r30568  
    3636:: set GSDL3HOME to the 'web' subdirectory 
    3737set GSDL3HOME=!GSDL3SRCHOME!\web 
     38set TOMCATWEB=!GSDL3SRCHOME!\web 
     39:: set GSDL3HOME to any web.home property provided, and create that folder if it doesn't exist 
     40:: Replace forward slashes in web.home with back slashes  
     41:: http://scripts.dragon-it.co.uk/scripts.nsf/docs/batch-search-replace-substitute!OpenDocument&ExpandSection=3&BaseTarget=East&AutoFramed 
     42if exist "!GSDL3SRCHOME!\build.properties" for /F "tokens=1,2 delims==" %%G in (!GSDL3SRCHOME!\build.properties) do (  
     43    if "%%G"=="web.home" ( 
     44        set GSDL3HOME=%%H 
     45        set GSDL3HOME=!GSDL3HOME:/=\! 
     46        set TOMCATWEB=!GSDL3HOME! 
     47        if not exist "!GSDL3HOME!" cmd /c "!GSDL3SRCHOME!\userweb.cmd" 
     48    ) 
     49) 
     50 
     51:: Whatever the web directory is, it should contain the WEB-INF\classes folder, else go back to using default for this 
     52:: The WEB-INF\classes folder will be absent in a userweb folder, but will be present if GSDL3HOME=GSDL3SRCHOME\web 
     53:: or if web.home points to GS3 as a webapp inside tomcat 
     54if not exist "!GSDL3HOME!\WEB-INF\classes" set TOMCATWEB=!GSDL3SRCHOME!\web 
    3855 
    3956:: change if using external tomcat or ant 
     
    4663:: ---- Set the CLASSPATH and PATH environment variables ---- 
    4764if "!GS_CP_SET!" == "yes" goto skipSetCp 
    48 set CLASSPATH=!GSDL3HOME!\WEB-INF\classes;!GSDL3SRCHOME!\resources\java;!GSDL3SRCHOME!\cp.jar;!CLASSPATH!; 
     65set CLASSPATH=!TOMCATWEB!\WEB-INF\classes;!GSDL3SRCHOME!\resources\java;!GSDL3SRCHOME!\cp.jar;!CLASSPATH!; 
    4966set PATH=!GSDL3SRCHOME!\bin;!GSDL3SRCHOME!\bin\script;!GSDL3SRCHOME!\lib\jni;!ANT_HOME!\bin;!PATH! 
    5067