[7869] | 1 | @echo off
|
---|
| 2 |
|
---|
| 3 | if exist gs3-setup.bat goto begin
|
---|
| 4 | echo You must run this script from within the Greenstone 3 home directory
|
---|
| 5 | goto exit
|
---|
| 6 |
|
---|
| 7 | :begin
|
---|
| 8 | call gs3-setup.bat
|
---|
| 9 |
|
---|
| 10 | echo %GSDL3HOME%| "%GSDL3HOME%\winutil\sed.exe" 's,\\,\\\\,g' | "%GSDL3HOME%\winutil\setvar.exe" GSDL3HOME_ESCAPED >setgsdl3e.bat
|
---|
| 11 | call setgsdl3e.bat
|
---|
| 12 | del setgsdl3e.bat
|
---|
| 13 |
|
---|
| 14 | :: ---- CHECK NECESSARY BITS ----
|
---|
| 15 | if not "%CVSROOT%" == "" goto start
|
---|
| 16 | echo You need to set the environment variable CVSROOT before running
|
---|
| 17 | echo this script. Please use the same path that you used to check out
|
---|
| 18 | echo the Greenstone repository. If you are not using anonymous cvs, you
|
---|
| 19 | echo also need to set the variable CVS_RSH to ssh.
|
---|
| 20 | goto exit
|
---|
| 21 |
|
---|
| 22 | :start
|
---|
| 23 | :: ---- GET INFO FROM USER ----
|
---|
| 24 | :: **** (SKIPPED) ****
|
---|
| 25 |
|
---|
| 26 | :: ---- CHECKOUT ALL THE BITS FROM CVS ----
|
---|
| 27 | cvs update -dRP
|
---|
| 28 | cd %GSDL3HOME%\packages
|
---|
| 29 | cvs checkout -P mgpp
|
---|
| 30 | cd %GSDL3HOME%
|
---|
| 31 |
|
---|
| 32 | :: ---- SETUP TOMCAT ----
|
---|
| 33 | cd %GSDL3HOME%\comms\jakarta
|
---|
| 34 | "%GSDL3HOME%\winutil\7zip.exe" x jakarta-tomcat-4.1.30.zip
|
---|
| 35 | ren jakarta-tomcat-4.1.30 tomcat
|
---|
| 36 |
|
---|
| 37 | :: Edit the Tomcat setclasspath script to add our classpath
|
---|
| 38 | cd %GSDL3HOME%\comms\jakarta\tomcat\bin
|
---|
| 39 | ren setclasspath.bat setclasspath.bat.orig
|
---|
| 40 | "%GSDL3HOME%\winutil\sed.exe" 's,set CLASSPATH=,set CLASSPATH=%%CLASSPATH%%;,' setclasspath.bat.orig > setclasspath.bat
|
---|
| 41 |
|
---|
| 42 | :: Copy the modified server.xml into tomcat
|
---|
| 43 | cd %GSDL3HOME%\comms\jakarta
|
---|
| 44 | copy tomcat\conf\server.xml tomcat\conf\server.xml.bak
|
---|
| 45 | "%GSDL3HOME%\winutil\sed.exe" 's,@gsdl3home@,%GSDL3HOME_ESCAPED%,' server.xml.in > tomcat\conf\server.xml
|
---|
| 46 |
|
---|
| 47 | :: Edit the server.xml config file to set the port number
|
---|
| 48 | :: **** (SKIPPED) ****
|
---|
| 49 |
|
---|
| 50 | :: ---- SETUP SOAP ----
|
---|
| 51 | cd %GSDL3HOME%\comms\soap
|
---|
| 52 | "%GSDL3HOME%\winutil\7zip.exe" x soap-bin-2.3.1.zip
|
---|
| 53 | ren soap-2_3_1 soap
|
---|
| 54 | copy soap\lib\soap.jar %GSDL3HOME%\lib\java
|
---|
| 55 | copy DeployedServices.ds soap\webapps\soap
|
---|
| 56 |
|
---|
| 57 | :: Disable soap by renaming the web.xml file
|
---|
[7893] | 58 | cd soap\webapps\soap\WEB-INF
|
---|
| 59 | ren web.xml web.xml.disabled
|
---|
[7869] | 60 | cd %GSDL3HOME%
|
---|
| 61 |
|
---|
| 62 | :: Edit the SOAPServer config file
|
---|
| 63 | cd %GSDL3HOME%\resources\java
|
---|
| 64 | "%GSDL3HOME%\winutil\sed.exe" 's,@gsdl3home@,%GSDL3HOME_ESCAPED%,' SOAPServer.cfg.in > SOAPServer.cfg
|
---|
| 65 |
|
---|
| 66 | :: ---- WEB.XML FILE ----
|
---|
| 67 | cd %GSDL3HOME%\web\WEB-INF
|
---|
| 68 | "%GSDL3HOME%\winutil\sed.exe" 's,@gsdl3home@,%GSDL3HOME_ESCAPED%,' web.xml.in > web.xml
|
---|
| 69 |
|
---|
| 70 | :: ---- SITE CONFIG FILES ----
|
---|
| 71 | :: **** (SKIPPED) ****
|
---|
| 72 |
|
---|
| 73 | :: ---- GSDL3 SCRIPTS ----
|
---|
| 74 | :: **** (SKIPPED) ****
|
---|
| 75 |
|
---|
| 76 | :: ---- UNPACK SAMPLE COLLECTIONS ----
|
---|
| 77 | cd %GSDL3HOME%\web\sites\localsite\collect
|
---|
| 78 |
|
---|
| 79 | :: Project Gutenberg
|
---|
| 80 | cd gberg
|
---|
| 81 | cd index
|
---|
| 82 | "%GSDL3HOME%\winutil\7zip.exe" x index.zip
|
---|
| 83 | cd ..\..
|
---|
| 84 |
|
---|
| 85 | :: GS2 MG demo
|
---|
| 86 | cd gs2mgdemo
|
---|
| 87 | cd import
|
---|
| 88 | "%GSDL3HOME%\winutil\7zip.exe" x import.zip
|
---|
| 89 | cd ..
|
---|
| 90 | cd index
|
---|
| 91 | "%GSDL3HOME%\winutil\7zip.exe" x index.zip
|
---|
| 92 | cd ..
|
---|
| 93 | cd metadata
|
---|
| 94 | "%GSDL3HOME%\winutil\7zip.exe" x metadata.zip
|
---|
| 95 | cd ..\..
|
---|
| 96 |
|
---|
| 97 | :: GS2 MGPP demo
|
---|
| 98 | cd gs2mgppdemo
|
---|
| 99 | cd import
|
---|
| 100 | "%GSDL3HOME%\winutil\7zip.exe" x import.zip
|
---|
| 101 | cd ..
|
---|
| 102 | cd index
|
---|
| 103 | "%GSDL3HOME%\winutil\7zip.exe" x index.zip
|
---|
| 104 | cd ..
|
---|
| 105 | cd metadata
|
---|
| 106 | "%GSDL3HOME%\winutil\7zip.exe" x metadata.zip
|
---|
| 107 | cd ..\..
|
---|
| 108 |
|
---|
| 109 | :: GS3 MG demo
|
---|
| 110 | cd gs3mgdemo
|
---|
| 111 | cd archives
|
---|
| 112 | "%GSDL3HOME%\winutil\7zip.exe" x archives.zip
|
---|
| 113 | cd ..
|
---|
| 114 | cd import
|
---|
| 115 | "%GSDL3HOME%\winutil\7zip.exe" x import.zip
|
---|
| 116 | cd ..
|
---|
| 117 | cd index
|
---|
| 118 | "%GSDL3HOME%\winutil\7zip.exe" x index.zip
|
---|
| 119 | cd ..\..
|
---|
| 120 |
|
---|
| 121 | :: ---- COMPILATION ----
|
---|
| 122 | echo Will now configure and make the code - this may take a while
|
---|
| 123 |
|
---|
| 124 | :: Make MG and MGPP jar files, and install them
|
---|
| 125 | cd %GSDL3HOME%\packages\mg
|
---|
| 126 | call winMake compile javaonly
|
---|
| 127 | call winMake install javaonly
|
---|
| 128 |
|
---|
| 129 | cd %GSDL3HOME%\packages\mgpp
|
---|
| 130 | call winMake compile javaonly
|
---|
| 131 | call winMake install javaonly
|
---|
| 132 |
|
---|
| 133 | cd %GSDL3HOME%
|
---|
| 134 | call gs3-setup.bat
|
---|
[7886] | 135 | call make.bat
|
---|
| 136 | call make.bat install
|
---|
[7869] | 137 |
|
---|
| 138 | :: ---- COPY JAR FILES ----
|
---|
| 139 | :: Any jar files used by applets need to go into the web\lib directory
|
---|
| 140 | cd %GSDL3HOME%
|
---|
| 141 | copy lib\java\phind.jar web\lib
|
---|
| 142 | copy lib\java\xml-apis.jar web\lib
|
---|
| 143 | copy lib\java\xercesImpl.jar web\lib
|
---|
| 144 |
|
---|
| 145 | :: ---- SETUP MYSQL + SAMPLE DATABASES ----
|
---|
| 146 | :: Set up the SQL DB
|
---|
| 147 | cd %GSDL3HOME%\packages\mysql
|
---|
[7881] | 148 | "%GSDL3HOME%\winutil\7zip.exe" x mysql-4.0.20d-windows.zip
|
---|
[7869] | 149 | start bin\mysqld
|
---|
| 150 | bin\mysql --user=root --execute="GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost;"
|
---|
| 151 | bin\mysql --user=root --execute="GRANT SELECT ON *.* TO gsdl3reader@localhost;"
|
---|
| 152 |
|
---|
| 153 | :: Set up any sample collections databases
|
---|
| 154 | bin\mysql --user=root --execute="create database localsite_gs3mgdemo;"
|
---|
| 155 | bin\mysql --user=root localsite_gs3mgdemo < %GSDL3HOME%\web\sites\localsite\collect\gs3mgdemo\mysqldatadump.sql
|
---|
| 156 |
|
---|
| 157 | bin\mysqladmin --user=root shutdown
|
---|
| 158 |
|
---|
| 159 | :: And provide a nice little postscript
|
---|
| 160 | echo.
|
---|
| 161 | echo ****************************************************************
|
---|
| 162 | echo Greenstone 3 - Installation Complete!
|
---|
| 163 | echo.
|
---|
| 164 | echo Run gs3-launch.bat to start the web server
|
---|
| 165 | echo.
|
---|
| 166 | echo ****************************************************************
|
---|
| 167 | echo.
|
---|
| 168 |
|
---|
[7886] | 169 | cd %GSDL3HOME%
|
---|
| 170 |
|
---|
[7869] | 171 | :exit
|
---|