source: main/trunk/greenstone2/setup.bat@ 22422

Last change on this file since 22422 was 22422, checked in by davidb, 14 years ago

Print message altered to look more like the extension print statements

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