[15070] | 1 | @echo off
|
---|
| 2 |
|
---|
| 3 | echo Greenstone 3 Server
|
---|
| 4 | echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
|
---|
| 5 | echo This software comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
|
---|
| 6 | echo This is free software, and you are welcome to redistribute it
|
---|
| 7 |
|
---|
| 8 | :: ---- Determine GSDL3HOME ----
|
---|
| 9 | :: Some users may set the above line manually
|
---|
| 10 | set GSDL3PATH=
|
---|
| 11 |
|
---|
| 12 | :: The default location is the current directory
|
---|
| 13 | if "%GSDL3PATH%" == "" set GSDL3PATH=.
|
---|
| 14 |
|
---|
| 15 | :: Setup Greenstone, unless it has already been done
|
---|
| 16 | if "%GSDL3SRCHOME%" == "" call "%GSDL3PATH%\gs3-setup.bat" SetEnv > nul
|
---|
| 17 |
|
---|
[27833] | 18 |
|
---|
| 19 | :: See if Greenstone3 web folder is writable
|
---|
| 20 | echo.
|
---|
| 21 | echo Checking if the Greenstone3 web directory is writable ...
|
---|
[27839] | 22 | (echo This is a temporary file. It is safe to delete it. > "%GSDL3HOME%\testing.tmp" ) 2>nul
|
---|
| 23 | if exist "%GSDL3HOME%\testing.tmp" goto isWritable
|
---|
[27833] | 24 |
|
---|
| 25 | :: Is read-only
|
---|
| 26 | set gsdl3_writablehome=%TMP%\greenstone\web
|
---|
[27903] | 27 | set opt_properties="-Dgsdl3home.isreadonly=true" -Dgsdl3.writablehome="%gsdl3_writablehome%"
|
---|
[27833] | 28 | echo ... no.
|
---|
| 29 | echo Setting Greenstone3 web home writable area to be: %gsdl3_writablehome%
|
---|
[27864] | 30 |
|
---|
[27833] | 31 | goto runJava
|
---|
| 32 |
|
---|
| 33 | :isWritable
|
---|
[27839] | 34 | del "%GSDL3HOME%\testing.tmp"
|
---|
[27903] | 35 | set opt_properties="-Dgsdl3.writablehome=%GSDL3HOME%"
|
---|
[27833] | 36 | echo ... yes.
|
---|
| 37 |
|
---|
| 38 | :runJava
|
---|
| 39 |
|
---|
[27873] | 40 | :: Before running the Java program,
|
---|
| 41 | :: call ant target to initialize the gsdl3-writablehome area (if it doesn't already exist)
|
---|
| 42 | :: ... including the all important global.properties.
|
---|
| 43 |
|
---|
[27877] | 44 | cmd /c ant.bat %opt_properties% configure-web
|
---|
[27873] | 45 |
|
---|
| 46 |
|
---|
[15070] | 47 | set GSDL3PATH=
|
---|
| 48 |
|
---|
[27833] | 49 | "%RUNJAVA%" -cp "%CLASSPATH%" %opt_properties% org.greenstone.server.Server3 "%GSDL3SRCHOME%"
|
---|
[15070] | 50 |
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 |
|
---|
[13235] | 54 | |
---|