source: gsdl/trunk/setup.bat@ 18510

Last change on this file since 18510 was 17948, checked in by max, 15 years ago

Do not need to be run from the directory in which it resides anymore (necesarry for Vista elevation). Show green logo.

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