[18968] | 1 | @echo off
|
---|
[22318] | 2 |
|
---|
| 3 | setlocal enabledelayedexpansion
|
---|
| 4 |
|
---|
[18968] | 5 | pushd "%CD%"
|
---|
| 6 | CD /D "%~dp0"
|
---|
| 7 | set GSDLLANG=en
|
---|
| 8 |
|
---|
| 9 | echo.
|
---|
| 10 | echo.
|
---|
| 11 | echo #### #
|
---|
| 12 | echo ## #
|
---|
| 13 | echo # ### ## ## ### ### ### ## ### ##
|
---|
| 14 | echo # # # #### #### # # ## # # # # # ####
|
---|
| 15 | echo ## # # # # # # # # # # # # #
|
---|
| 16 | echo #### # ### ### # # ### ## ## # # ###
|
---|
| 17 | echo (C) 2008, New Zealand Digital Library Project
|
---|
| 18 | echo.
|
---|
| 19 | echo.
|
---|
| 20 | echo.
|
---|
| 21 |
|
---|
[22318] | 22 | if "!OS!" == "Windows_NT" goto WinNT
|
---|
| 23 | if "!OS!" == "" goto Win95
|
---|
| 24 | if "!GSDLLANG!" == "en" echo Setup failed - your PATH has not been set
|
---|
| 25 | if "!GSDLLANG!" == "es" echo No se pudo realizar la configuraci¢n - no se ha establecido la RUTA.
|
---|
| 26 | if "!GSDLLANG!" == "fr" echo Echc de l'installation - votre variable PATH n'a pas t ajuste
|
---|
| 27 | if "!GSDLLANG!" == "ru" echo áâ ®¢ª ¥ 〠« áì - ¥ ¡ë« ãáâ ®¢«¥
|
---|
[18968] | 28 | goto End
|
---|
| 29 |
|
---|
| 30 | :WinNT
|
---|
| 31 | set GSDLHOME=%CD%
|
---|
| 32 | set GSDLOS=windows
|
---|
| 33 |
|
---|
| 34 | REM Override Imagemagick and Ghostscript paths to the bundled applications shipped with greenstone if they exists otherwise use default environment variables.
|
---|
[22318] | 35 | if exist "!GSDLHOME!\bin\windows\ghostscript\bin\gsdll32.dll" set GS_DLL=!GSDLHOME!\bin\windows\ghostscript\bin\gsdll32.dll
|
---|
| 36 | if exist "!GSDLHOME!\bin\windows\ghostscript\lib\*.*" set GS_LIB=!GSDLHOME!\bin\windows\ghostscript\lib
|
---|
| 37 | if exist "!GSDLHOME!\bin\windows\ghostscript\bin\*.*" set PATH=!GSDLHOME!\bin\windows\ghostscript\bin;!PATH!
|
---|
| 38 | if exist "!GSDLHOME!\bin\windows\imagemagick\*.*" set PATH=!GSDLHOME!\bin\windows\imagemagick;!PATH!
|
---|
[18968] | 39 |
|
---|
[22318] | 40 | if "!GS_CP_SET!" == "yes" goto Success
|
---|
[24363] | 41 | set PATH=!GSDLHOME!\bin\windows;!GSDLHOME!\bin\script;!PATH!
|
---|
| 42 | if exist "!GSDLHOME!\bin\windows\perl\bin" (
|
---|
| 43 | set PERLPATH=!GSDLHOME!\bin\windows\perl\bin
|
---|
[24373] | 44 | set PATH=!PERLPATH!;!PATH!
|
---|
[24363] | 45 | )
|
---|
| 46 |
|
---|
[18968] | 47 | set GS_CP_SET=yes
|
---|
| 48 | goto Success
|
---|
| 49 |
|
---|
| 50 | :Win95
|
---|
| 51 | if "%1" == "SetEnv" goto Win95Env
|
---|
| 52 | REM We'll invoke a second copy of the command processor to make
|
---|
| 53 | REM sure there's enough environment space
|
---|
| 54 | COMMAND /E:2048 /K %0 SetEnv
|
---|
| 55 | goto End
|
---|
| 56 |
|
---|
| 57 | :Win95Env
|
---|
| 58 | set GSDLHOME=%CD%
|
---|
| 59 | set GSDLOS=windows
|
---|
| 60 |
|
---|
| 61 | REM Override Imagemagick and Ghostscript paths to the bundled applications shipped with greenstone if they exists otherwise use default environment variables.
|
---|
[22318] | 62 | if exist "!GSDLHOME!\bin\windows\ghostscript\bin\gsdll32.dll" set GS_DLL="!GSDLHOME!\bin\windows\ghostscript\bin\gsdll32.dll"
|
---|
| 63 | if exist "!GSDLHOME!\bin\windows\ghostscript\lib\*.*" set GS_LIB="!GSDLHOME!\bin\windows\ghostscript\lib"
|
---|
| 64 | if exist "!GSDLHOME!\bin\windows\ghostscript\bin\*.*" set PATH="!GSDLHOME!\bin\windows\ghostscript\bin";"!PATH!"
|
---|
| 65 | if exist "!GSDLHOME!\bin\windows\imagemagick\*.*" set PATH="!GSDLHOME!\bin\windows\imagemagick";"!PATH!"
|
---|
[18968] | 66 |
|
---|
[22318] | 67 | if "!GS_CP_SET!" == "yes" goto Success
|
---|
[24363] | 68 | set PATH=!GSDLHOME!\bin\windows;!GSDLHOME!\bin\script;!PATH!
|
---|
| 69 | if exist "!GSDLHOME!\bin\windows\perl\bin" (
|
---|
| 70 | set PERLPATH=!GSDLHOME!\bin\windows\perl\bin
|
---|
[24372] | 71 | set PATH=!PERLPATH!;!PATH!
|
---|
[24363] | 72 | )
|
---|
[18968] | 73 | set GS_CP_SET=yes
|
---|
| 74 | goto Success
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 | :Success
|
---|
[22318] | 78 | if "!GSDLLANG!" == "en" echo.
|
---|
| 79 | if "!GSDLLANG!" == "en" echo Your environment has successfully been set up to run Greenstone.
|
---|
| 80 | if "!GSDLLANG!" == "en" echo Note that these settings will only have effect within this MS-DOS
|
---|
| 81 | if "!GSDLLANG!" == "en" echo session. You will therefore need to rerun setup.bat if you want
|
---|
| 82 | if "!GSDLLANG!" == "en" echo to run Greenstone programs from a different MS-DOS session.
|
---|
| 83 | if "!GSDLLANG!" == "en" echo.
|
---|
[18968] | 84 |
|
---|
[22318] | 85 | if "!GSDLLANG!" == "es" echo.
|
---|
| 86 | if "!GSDLLANG!" == "es" echo Su ambiente ha sido configurado para correr los programas Greenstone.
|
---|
| 87 | if "!GSDLLANG!" == "es" echo Recuerde que estos ajustes £nicamente tendr n efecto dentro de esta sesi¢n
|
---|
| 88 | if "!GSDLLANG!" == "es" echo MS-DOS. Por lo tanto deber ejecutar nuevamente setup.bat si desea
|
---|
| 89 | if "!GSDLLANG!" == "es" echo correr los programas de Greenstone desde una sesi¢n MS-DOS diferente.
|
---|
| 90 | if "!GSDLLANG!" == "es" echo.
|
---|
[18968] | 91 |
|
---|
[22318] | 92 | if "!GSDLLANG!" == "fr" echo.
|
---|
| 93 | if "!GSDLLANG!" == "fr" echo Votre environnement a t configure avec succs pour excuter Greenstone
|
---|
| 94 | if "!GSDLLANG!" == "fr" echo Notez que ces paramtrages n'auront d'effet que dans cette session MS-DOS.
|
---|
| 95 | if "!GSDLLANG!" == "fr" echo Vous devrez par consquent rexcuter setup.bat si vous voulez faire
|
---|
| 96 | if "!GSDLLANG!" == "fr" echo lancer des programmes Greenstone dans une autre session MS-DOS.
|
---|
| 97 | if "!GSDLLANG!" == "fr" echo.
|
---|
[18968] | 98 |
|
---|
[22318] | 99 | if "!GSDLLANG!" == "ru" echo.
|
---|
| 100 | if "!GSDLLANG!" == "ru" echo è¥ ®ªà㊥š¥ ¡ë«® ãá¯¥è® áâ஥®, ç⮡ë ãáâ ®¢šâì Greenstone ¡à âšâ¥
|
---|
| 101 | if "!GSDLLANG!" == "ru" echo ¢š¬ š¥, çâ® íâš § ç¥šï ¡ã€ãâ ⮫쪮 š¬¥âì íä䥪⠢ ¯à¥€¥« å í⮣® MS DOS
|
---|
| 102 | if "!GSDLLANG!" == "ru" echo á¥áášï. ë ¡ã€¥â¥ ¯®í⮬㠀®«Šë ¯®¢â®à® ã¯à ¢«ïâì setup.bat, ¥á«š ë å®âšâ¥
|
---|
| 103 | if "!GSDLLANG!" == "ru" echo ã¯à ¢«ïâì ¯à®£à ¬¬ ¬š ¥«ñëå š§¢¥àŠ¥ëå ¯®à®€ ®â à §«šç®© á¥áášš MS DOS.
|
---|
| 104 | if "!GSDLLANG!" == "ru" echo.
|
---|
[18968] | 105 |
|
---|
| 106 | :End
|
---|
[22492] | 107 | endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%
|
---|
[18968] | 108 |
|
---|
[23665] | 109 | set savedir=%CD%
|
---|
[23650] | 110 | cd "%GSDLHOME%"
|
---|
[23665] | 111 | if exist ext (
|
---|
| 112 | for /D %%e IN ("ext/*") do call :addexts %%e
|
---|
[18968] | 113 | )
|
---|
[23665] | 114 | cd "%savedir%"
|
---|
| 115 | set savedir=
|
---|
| 116 | goto :doneexts
|
---|
[23650] | 117 |
|
---|
[23665] | 118 | :addexts
|
---|
| 119 | set folder=%1
|
---|
| 120 | cd "ext\%folder%"
|
---|
| 121 | if EXIST setup.bat call setup.bat
|
---|
| 122 | cd ..\..
|
---|
| 123 | goto :eof
|
---|
| 124 |
|
---|
| 125 | :doneexts
|
---|
[22492] | 126 | setlocal enabledelayedexpansion
|
---|
[23665] | 127 |
|
---|
| 128 | if exist "%GSDLHOME%\apache-httpd" (
|
---|
[22422] | 129 | echo +Adding in executable path for apache-httpd
|
---|
[22318] | 130 | set PATH=!GSDLHOME!\apache-httpd\!GSDLOS!\bin;!PATH!
|
---|
[23011] | 131 | set PATH=!GSDLHOME!\apache-httpd\!GSDLOS!\lib;!PATH!
|
---|
[18968] | 132 | )
|
---|
| 133 |
|
---|
[23665] | 134 | if exist "%GSDLHOME%\local" (
|
---|
| 135 | if exist "!GSDLHOME!\local\setup.bat" (
|
---|
[18968] | 136 | echo.
|
---|
[23665] | 137 | echo Running !GSDLHOME!\local\setup.bat
|
---|
| 138 | cd "!GSDLHOME!\local"
|
---|
[18968] | 139 | call setup.bat
|
---|
[23665] | 140 | cd "!GSDLHOME!"
|
---|
[18968] | 141 | )
|
---|
[22318] | 142 | set PATH=!GSDLHOME!\local\bin;!PATH!
|
---|
[18968] | 143 | )
|
---|
| 144 |
|
---|
| 145 | :: test writability of GSDLHOME
|
---|
[22318] | 146 | @call "!GSDLHOME!\bin\script\checkwritability.bat"
|
---|
[23665] | 147 | popd
|
---|
[22326] | 148 | endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%
|
---|