@echo off set GSDLLANG=en :top REM test if we have write permission on the greenstone intall directory echo This is a temporary file. It is safe to delete it. > testing.tmp if not exist testing.tmp goto CantWrite del testing.tmp if "%OS%" == "Windows_NT" goto WinNT if "%OS%" == "" goto Win95 if "%GSDLLANG%" == "en" echo Setup failed - your PATH has not been set if "%GSDLLANG%" == "es" echo No se pudo realizar la configuraciвn - no se ha establecido la RUTA. if "%GSDLLANG%" == "fr" echo EchВc de l'installation - votre variable PATH n'a pas ВtВ ajustВe if "%GSDLLANG%" == "ru" echo Установка не удалась - ПУТЬ не был установлен goto End :WinNT set GSDLHOME=C:\research\oranfry\Greenstone2.75 set GSDLOS=windows set PATH=%GSDLHOME%\bin\windows\perl\bin;%GSDLHOME%\bin\windows;%GSDLHOME%\bin\script;%PATH% goto Success :Win95 if "%1" == "SetEnv" goto Win95Env REM We'll invoke a second copy of the command processor to make REM sure there's enough environment space COMMAND /E:2048 /K %0 SetEnv goto End :Win95Env set GSDLHOME=C:\research\oranfry\Greenstone2.75 set GSDLOS=windows set PATH="%GSDLHOME%\bin\windows\perl\bin";"%GSDLHOME%\bin\windows";"%GSDLHOME%\bin\script";"%PATH%" goto Success :CantWrite echo Greenstone needs write permission on the greenstone installation directory, but echo we have detected that this is not present. echo Would you like greenstone to automatically grant the current user (%username%) echo the 'full control' permission on the greenstone diretory, in order to fix echo the problem? :l1 SET /P answer=[Y/N] if not "%answer%" == "Y" if not "%answer%" == "N" if not "%answer%" == "y" if not "%answer%" == "n" goto l1 if "%answer%" == "Y" goto GrantWritePermission if "%answer%" == "y" goto GrantWritePermission echo Will not attempt to change file permissions goto Success :GrantWritePermission cacls . /E /T /P %username%:F REM check if it worked echo This is a temporary file. It is safe to delete it. > testing.tmp if not exist testing.tmp goto StillCantWrite del testing.tmp REM this is somewhat dangerous - possibility of an eternal loop. goto top :StillCantWrite echo Attempted to grant write permission to the greenstone installation directory but still can't write echo Either automatic granting of permission failed, or we cannot write to the directory for other echo reasons. Please manually change the file permissions before you run greenstone. goto Success :Success if "%GSDLLANG%" == "en" echo Your environment has successfully been set up to run Greenstone. if "%GSDLLANG%" == "en" echo Note that these settings will only have effect within this MS-DOS if "%GSDLLANG%" == "en" echo session. You will therefore need to rerun setup.bat if you want if "%GSDLLANG%" == "en" echo to run Greenstone programs from a different MS-DOS session. if "%GSDLLANG%" == "es" echo Su ambiente ha sido configurado para correr los programas Greenstone. if "%GSDLLANG%" == "es" echo Recuerde que estos ajustes гnicamente tendrаn efecto dentro de esta sesiвn if "%GSDLLANG%" == "es" echo MS-DOS. Por lo tanto deberа ejecutar nuevamente setup.bat si desea if "%GSDLLANG%" == "es" echo correr los programas de Greenstone desde una sesiвn MS-DOS diferente. if "%GSDLLANG%" == "fr" echo Votre environnement a ВtВ configuВre avec succКs pour exВcuter Greenstone if "%GSDLLANG%" == "fr" echo Notez que ces paramКtrages n'auront d'effet que dans cette session MS-DOS. if "%GSDLLANG%" == "fr" echo Vous devrez par consВquent rВexВcuter setup.bat si vous voulez faire if "%GSDLLANG%" == "fr" echo lancer des programmes Greenstone dans une autre session MS-DOS. if "%GSDLLANG%" == "ru" echo Ваше окружение было успешно настроено, чтобы установить Greenstone Обратите if "%GSDLLANG%" == "ru" echo внимание, что эти назначения будут только иметь эффект в пределах этого MS DOS if "%GSDLLANG%" == "ru" echo сессия. Вы будете поэтому должны повторно управлять setup.bat, если Вы хотите if "%GSDLLANG%" == "ru" echo управлять программами Зелёных изверженных пород от различной сессии MS DOS. :End