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

Last change on this file since 26651 was 24612, checked in by ak19, 13 years ago

Windows specific changes to gs-magick.pl and setup.bat: bat file used to add bin\windows\imagemagick to path (not bin\windows\imagemagick\bin). It no longer does that, and gs-magick.pl sets this.

File size: 5.8 KB
RevLine 
[18968]1@echo off
[22318]2
3setlocal enabledelayedexpansion
4
[18968]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
[22318]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 “áâ ­®¢ª  ­¥ 〠« áì - “’œ ­¥ ¡ë« ãáâ ­®¢«¥­
[18968]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.
[22318]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!
[24612]38:: ImageMagick environment vars are now set in bin\script\gs-magick.pl
39::if exist "!GSDLHOME!\bin\windows\imagemagick\*.*" set PATH=!GSDLHOME!\bin\windows\imagemagick;!PATH!
[18968]40
[22318]41if "!GS_CP_SET!" == "yes" goto Success
[24363]42set PATH=!GSDLHOME!\bin\windows;!GSDLHOME!\bin\script;!PATH!
43if exist "!GSDLHOME!\bin\windows\perl\bin" (
44 set PERLPATH=!GSDLHOME!\bin\windows\perl\bin
[24373]45 set PATH=!PERLPATH!;!PATH!
[24363]46)
47
[18968]48set GS_CP_SET=yes
49goto Success
50
51:Win95
52if "%1" == "SetEnv" goto Win95Env
53REM We'll invoke a second copy of the command processor to make
54REM sure there's enough environment space
55COMMAND /E:2048 /K %0 SetEnv
56goto End
57
58:Win95Env
59set GSDLHOME=%CD%
60set GSDLOS=windows
61
62REM Override Imagemagick and Ghostscript paths to the bundled applications shipped with greenstone if they exists otherwise use default environment variables.
[22318]63if exist "!GSDLHOME!\bin\windows\ghostscript\bin\gsdll32.dll" set GS_DLL="!GSDLHOME!\bin\windows\ghostscript\bin\gsdll32.dll"
64if exist "!GSDLHOME!\bin\windows\ghostscript\lib\*.*" set GS_LIB="!GSDLHOME!\bin\windows\ghostscript\lib"
65if exist "!GSDLHOME!\bin\windows\ghostscript\bin\*.*" set PATH="!GSDLHOME!\bin\windows\ghostscript\bin";"!PATH!"
[24612]66:: ImageMagick environment vars are now set in bin\script\gs-magick.pl
67::if exist "!GSDLHOME!\bin\windows\imagemagick\*.*" set PATH="!GSDLHOME!\bin\windows\imagemagick";"!PATH!"
[18968]68
[22318]69if "!GS_CP_SET!" == "yes" goto Success
[24363]70set PATH=!GSDLHOME!\bin\windows;!GSDLHOME!\bin\script;!PATH!
71if exist "!GSDLHOME!\bin\windows\perl\bin" (
72 set PERLPATH=!GSDLHOME!\bin\windows\perl\bin
[24372]73 set PATH=!PERLPATH!;!PATH!
[24363]74)
[18968]75set GS_CP_SET=yes
76goto Success
77
78
79:Success
[22318]80if "!GSDLLANG!" == "en" echo.
81if "!GSDLLANG!" == "en" echo Your environment has successfully been set up to run Greenstone.
82if "!GSDLLANG!" == "en" echo Note that these settings will only have effect within this MS-DOS
83if "!GSDLLANG!" == "en" echo session. You will therefore need to rerun setup.bat if you want
84if "!GSDLLANG!" == "en" echo to run Greenstone programs from a different MS-DOS session.
85if "!GSDLLANG!" == "en" echo.
[18968]86
[22318]87if "!GSDLLANG!" == "es" echo.
88if "!GSDLLANG!" == "es" echo Su ambiente ha sido configurado para correr los programas Greenstone.
89if "!GSDLLANG!" == "es" echo Recuerde que estos ajustes £nicamente tendr n efecto dentro de esta sesi¢n
90if "!GSDLLANG!" == "es" echo MS-DOS. Por lo tanto deber  ejecutar nuevamente setup.bat si desea
91if "!GSDLLANG!" == "es" echo correr los programas de Greenstone desde una sesi¢n MS-DOS diferente.
92if "!GSDLLANG!" == "es" echo.
[18968]93
[22318]94if "!GSDLLANG!" == "fr" echo.
95if "!GSDLLANG!" == "fr" echo Votre environnement a ‚t‚ configu‚re avec succŠs pour ex‚cuter Greenstone
96if "!GSDLLANG!" == "fr" echo Notez que ces paramŠtrages n'auront d'effet que dans cette session MS-DOS.
97if "!GSDLLANG!" == "fr" echo Vous devrez par cons‚quent r‚ex‚cuter setup.bat si vous voulez faire
98if "!GSDLLANG!" == "fr" echo lancer des programmes Greenstone dans une autre session MS-DOS.
99if "!GSDLLANG!" == "fr" echo.
[18968]100
[22318]101if "!GSDLLANG!" == "ru" echo.
102if "!GSDLLANG!" == "ru" echo ‚ è¥ ®ªà㊥­š¥ ¡ë«® ãᯥ譮 ­ áâ஥­®, ç⮡ë ãáâ ­®¢šâì Greenstone Ž¡à âšâ¥
103if "!GSDLLANG!" == "ru" echo ¢­š¬ ­š¥, çâ® íâš ­ §­ ç¥­šï ¡ã€ãâ ⮫쪮 š¬¥âì íä䥪⠢ ¯à¥€¥« å í⮣® MS DOS
104if "!GSDLLANG!" == "ru" echo á¥áášï. ‚ë ¡ã€¥â¥ ¯®í⮬㠀®«Š­ë ¯®¢â®à­® ã¯à ¢«ïâì setup.bat, ¥á«š ‚ë å®âšâ¥
105if "!GSDLLANG!" == "ru" echo ã¯à ¢«ïâì ¯à®£à ¬¬ ¬š ‡¥«ñ­ëå š§¢¥àŠ¥­­ëå ¯®à®€ ®â à §«šç­®© á¥áášš MS DOS.
106if "!GSDLLANG!" == "ru" echo.
[18968]107
108:End
[22492]109endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%
[18968]110
[23665]111set savedir=%CD%
[23650]112cd "%GSDLHOME%"
[23665]113if exist ext (
114 for /D %%e IN ("ext/*") do call :addexts %%e
[18968]115)
[23665]116cd "%savedir%"
117set savedir=
118goto :doneexts
[23650]119
[23665]120:addexts
121set folder=%1
122cd "ext\%folder%"
123if EXIST setup.bat call setup.bat
124cd ..\..
125goto :eof
126
127:doneexts
[22492]128setlocal enabledelayedexpansion
[23665]129
130if exist "%GSDLHOME%\apache-httpd" (
[22422]131 echo +Adding in executable path for apache-httpd
[22318]132 set PATH=!GSDLHOME!\apache-httpd\!GSDLOS!\bin;!PATH!
[23011]133 set PATH=!GSDLHOME!\apache-httpd\!GSDLOS!\lib;!PATH!
[18968]134)
135
[23665]136if exist "%GSDLHOME%\local" (
137 if exist "!GSDLHOME!\local\setup.bat" (
[18968]138 echo.
[23665]139 echo Running !GSDLHOME!\local\setup.bat
140 cd "!GSDLHOME!\local"
[18968]141 call setup.bat
[23665]142 cd "!GSDLHOME!"
[18968]143 )
[22318]144 set PATH=!GSDLHOME!\local\bin;!PATH!
[18968]145)
146
147:: test writability of GSDLHOME
[22318]148@call "!GSDLHOME!\bin\script\checkwritability.bat"
[23665]149popd
[22326]150endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%
Note: See TracBrowser for help on using the repository browser.