source: main/trunk/gs2build/setup.bat@ 21984

Last change on this file since 21984 was 21984, checked in by ak19, 12 years ago

Removed some unnecessary comments in previous commit. Previous commit: All of a sudden, unnoticed by the rest of us, gs3-setup.bat now calls gs2build\setup.bat which sadly got stuck with a placeholder value for GSDLHOME. Though useful for the release-kit which would replace it with a sensible value, the placeholder remains when gs3-setup.bat calls it and things look ugly. We're now forcing a sensible value if one is not assigned (e.g. by the releasekit).

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