source: gsdl/trunk/setup.bat@ 17727

Last change on this file since 17727 was 17305, checked in by oranfry, 16 years ago

stop the path getting overloaded

File size: 3.9 KB
RevLine 
[14843]1@echo off
[7020]2set GSDLLANG=en
[6764]3
[3041]4if "%OS%" == "Windows_NT" goto WinNT
5if "%OS%" == "" goto Win95
[7020]6if "%GSDLLANG%" == "en" echo Setup failed - your PATH has not been set
7if "%GSDLLANG%" == "es" echo No se pudo realizar la configuraci¢n - no se ha establecido la RUTA.
8if "%GSDLLANG%" == "fr" echo Ech‚c de l'installation - votre variable PATH n'a pas ‚t‚ ajust‚e
9if "%GSDLLANG%" == "ru" echo “áâ ­®¢ª  ­¥ 〠« áì - “’œ ­¥ ¡ë« ãáâ ­®¢«¥­
[3041]10goto End
11
[17305]12:WinNT
[13007]13set GSDLHOME=**GSDLHOME**
[3403]14set GSDLOS=windows
[17226]15
16REM Override Imagemagick and Ghostscript paths to the bundled applications shipped with greenstone if they exists otherwise use default environment variables.
17if exist "%GSDLHOME%\bin\windows\ghostscript\bin\gsdll32.dll" set GS_DLL=%GSDLHOME%\bin\windows\ghostscript\bin\gsdll32.dll
18if exist "%GSDLHOME%\bin\windows\ghostscript\lib\*.*" set GS_LIB=%GSDLHOME%\bin\windows\ghostscript\lib
19if exist "%GSDLHOME%\bin\windows\ghostscript\bin\*.*" set PATH=%GSDLHOME%\bin\windows\ghostscript\bin;%PATH%
20if exist "%GSDLHOME%\bin\windows\imagemagick\*.*" set PATH=%GSDLHOME%\bin\windows\imagemagick;%PATH%
21
[17305]22if "%GS_CP_SET%" == "yes" goto Success
[17226]23set PATH=%GSDLHOME%\bin\windows\perl\bin;%GSDLHOME%\bin\windows;%GSDLHOME%\bin\script;%PATH%
[17305]24set GS_CP_SET=yes
[3041]25goto Success
26
27:Win95
[3403]28if "%1" == "SetEnv" goto Win95Env
29REM We'll invoke a second copy of the command processor to make
30REM sure there's enough environment space
[3809]31COMMAND /E:2048 /K %0 SetEnv
[3403]32goto End
33
34:Win95Env
35set GSDLHOME=**GSDLHOME**
36set GSDLOS=windows
[17226]37
38REM Override Imagemagick and Ghostscript paths to the bundled applications shipped with greenstone if they exists otherwise use default environment variables.
39if exist "%GSDLHOME%\bin\windows\ghostscript\bin\gsdll32.dll" set GS_DLL="%GSDLHOME%\bin\windows\ghostscript\bin\gsdll32.dll"
40if exist "%GSDLHOME%\bin\windows\ghostscript\lib\*.*" set GS_LIB="%GSDLHOME%\bin\windows\ghostscript\lib"
41if exist "%GSDLHOME%\bin\windows\ghostscript\bin\*.*" set PATH="%GSDLHOME%\bin\windows\ghostscript\bin";"%PATH%"
42if exist "%GSDLHOME%\bin\windows\imagemagick\*.*" set PATH="%GSDLHOME%\bin\windows\imagemagick";"%PATH%"
[17305]43
44if "%GS_CP_SET%" == "yes" goto Success
[17226]45set PATH="%GSDLHOME%\bin\windows\perl\bin";"%GSDLHOME%\bin\windows";"%GSDLHOME%\bin\script";"%PATH%"
[17305]46set GS_CP_SET=yes
[14843]47goto Success
[3041]48
[14843]49
[3041]50:Success
[7020]51if "%GSDLLANG%" == "en" echo Your environment has successfully been set up to run Greenstone.
52if "%GSDLLANG%" == "en" echo Note that these settings will only have effect within this MS-DOS
53if "%GSDLLANG%" == "en" echo session. You will therefore need to rerun setup.bat if you want
54if "%GSDLLANG%" == "en" echo to run Greenstone programs from a different MS-DOS session.
[3041]55
[7020]56if "%GSDLLANG%" == "es" echo Su ambiente ha sido configurado para correr los programas Greenstone.
57if "%GSDLLANG%" == "es" echo Recuerde que estos ajustes £nicamente tendr n efecto dentro de esta sesi¢n
58if "%GSDLLANG%" == "es" echo MS-DOS. Por lo tanto deber  ejecutar nuevamente setup.bat si desea
59if "%GSDLLANG%" == "es" echo correr los programas de Greenstone desde una sesi¢n MS-DOS diferente.
[6765]60
[7020]61if "%GSDLLANG%" == "fr" echo Votre environnement a ‚t‚ configu‚re avec succŠs pour ex‚cuter Greenstone
62if "%GSDLLANG%" == "fr" echo Notez que ces paramŠtrages n'auront d'effet que dans cette session MS-DOS.
63if "%GSDLLANG%" == "fr" echo Vous devrez par cons‚quent r‚ex‚cuter setup.bat si vous voulez faire
64if "%GSDLLANG%" == "fr" echo lancer des programmes Greenstone dans une autre session MS-DOS.
[6764]65
[7020]66if "%GSDLLANG%" == "ru" echo ‚ è¥ ®ªà㊥­š¥ ¡ë«® ãᯥ譮 ­ áâ஥­®, ç⮡ë ãáâ ­®¢šâì Greenstone Ž¡à âšâ¥
67if "%GSDLLANG%" == "ru" echo ¢­š¬ ­š¥, çâ® íâš ­ §­ ç¥­šï ¡ã€ãâ ⮫쪮 š¬¥âì íä䥪⠢ ¯à¥€¥« å í⮣® MS DOS
68if "%GSDLLANG%" == "ru" echo á¥áášï. ‚ë ¡ã€¥â¥ ¯®í⮬㠀®«Š­ë ¯®¢â®à­® ã¯à ¢«ïâì setup.bat, ¥á«š ‚ë å®âšâ¥
69if "%GSDLLANG%" == "ru" echo ã¯à ¢«ïâì ¯à®£à ¬¬ ¬š ‡¥«ñ­ëå š§¢¥àŠ¥­­ëå ¯®à®€ ®â à §«šç­®© á¥áášš MS DOS.
[6766]70
[3041]71:End
[14843]72
73:: test writability of GSDLHOME
74@call "%GSDLHOME%\bin\script\checkwritability.bat"
Note: See TracBrowser for help on using the repository browser.