1 | @echo off
|
---|
2 | set GSDLLANG=en
|
---|
3 |
|
---|
4 | :top
|
---|
5 |
|
---|
6 |
|
---|
7 | REM test if we have write permission on the greenstone intall directory
|
---|
8 | echo This is a temporary file. It is safe to delete it. > testing.tmp
|
---|
9 | if not exist testing.tmp goto CantWrite
|
---|
10 | del testing.tmp
|
---|
11 |
|
---|
12 |
|
---|
13 | if "%OS%" == "Windows_NT" goto WinNT
|
---|
14 | if "%OS%" == "" goto Win95
|
---|
15 | if "%GSDLLANG%" == "en" echo Setup failed - your PATH has not been set
|
---|
16 | if "%GSDLLANG%" == "es" echo No se pudo realizar la configuraci¢n - no se ha establecido la RUTA.
|
---|
17 | if "%GSDLLANG%" == "fr" echo Echc de l'installation - votre variable PATH n'a pas t ajuste
|
---|
18 | if "%GSDLLANG%" == "ru" echo áâ ®¢ª ¥ 〠« áì - ¥ ¡ë« ãáâ ®¢«¥
|
---|
19 | goto End
|
---|
20 |
|
---|
21 | :WinNT
|
---|
22 | set GSDLHOME=C:\research\oranfry\Greenstone2.75
|
---|
23 | set GSDLOS=windows
|
---|
24 | set PATH=%GSDLHOME%\bin\windows\perl\bin;%GSDLHOME%\bin\windows;%GSDLHOME%\bin\script;%PATH%
|
---|
25 | goto Success
|
---|
26 |
|
---|
27 | :Win95
|
---|
28 | if "%1" == "SetEnv" goto Win95Env
|
---|
29 | REM We'll invoke a second copy of the command processor to make
|
---|
30 | REM sure there's enough environment space
|
---|
31 | COMMAND /E:2048 /K %0 SetEnv
|
---|
32 | goto End
|
---|
33 |
|
---|
34 | :Win95Env
|
---|
35 | set GSDLHOME=C:\research\oranfry\Greenstone2.75
|
---|
36 | set GSDLOS=windows
|
---|
37 | set PATH="%GSDLHOME%\bin\windows\perl\bin";"%GSDLHOME%\bin\windows";"%GSDLHOME%\bin\script";"%PATH%"
|
---|
38 | goto Success
|
---|
39 |
|
---|
40 |
|
---|
41 | :CantWrite
|
---|
42 | echo Greenstone needs write permission on the greenstone installation directory, but
|
---|
43 | echo we have detected that this is not present.
|
---|
44 | echo Would you like greenstone to automatically grant the current user (%username%)
|
---|
45 | echo the 'full control' permission on the greenstone diretory, in order to fix
|
---|
46 | echo the problem?
|
---|
47 | :l1
|
---|
48 | SET /P answer=[Y/N]
|
---|
49 | if not "%answer%" == "Y" if not "%answer%" == "N" if not "%answer%" == "y" if not "%answer%" == "n" goto l1
|
---|
50 | if "%answer%" == "Y" goto GrantWritePermission
|
---|
51 | if "%answer%" == "y" goto GrantWritePermission
|
---|
52 | echo Will not attempt to change file permissions
|
---|
53 | goto Success
|
---|
54 |
|
---|
55 |
|
---|
56 | :GrantWritePermission
|
---|
57 | cacls . /E /T /P %username%:F
|
---|
58 | REM check if it worked
|
---|
59 | echo This is a temporary file. It is safe to delete it. > testing.tmp
|
---|
60 | if not exist testing.tmp goto StillCantWrite
|
---|
61 | del testing.tmp
|
---|
62 | REM this is somewhat dangerous - possibility of an eternal loop.
|
---|
63 | goto top
|
---|
64 |
|
---|
65 |
|
---|
66 | :StillCantWrite
|
---|
67 | echo Attempted to grant write permission to the greenstone installation directory but still can't write
|
---|
68 | echo Either automatic granting of permission failed, or we cannot write to the directory for other
|
---|
69 | echo reasons. Please manually change the file permissions before you run greenstone.
|
---|
70 | goto Success
|
---|
71 |
|
---|
72 |
|
---|
73 | :Success
|
---|
74 | if "%GSDLLANG%" == "en" echo Your environment has successfully been set up to run Greenstone.
|
---|
75 | if "%GSDLLANG%" == "en" echo Note that these settings will only have effect within this MS-DOS
|
---|
76 | if "%GSDLLANG%" == "en" echo session. You will therefore need to rerun setup.bat if you want
|
---|
77 | if "%GSDLLANG%" == "en" echo to run Greenstone programs from a different MS-DOS session.
|
---|
78 |
|
---|
79 | if "%GSDLLANG%" == "es" echo Su ambiente ha sido configurado para correr los programas Greenstone.
|
---|
80 | if "%GSDLLANG%" == "es" echo Recuerde que estos ajustes £nicamente tendr n efecto dentro de esta sesi¢n
|
---|
81 | if "%GSDLLANG%" == "es" echo MS-DOS. Por lo tanto deber ejecutar nuevamente setup.bat si desea
|
---|
82 | if "%GSDLLANG%" == "es" echo correr los programas de Greenstone desde una sesi¢n MS-DOS diferente.
|
---|
83 |
|
---|
84 | if "%GSDLLANG%" == "fr" echo Votre environnement a t configure avec succs pour excuter Greenstone
|
---|
85 | if "%GSDLLANG%" == "fr" echo Notez que ces paramtrages n'auront d'effet que dans cette session MS-DOS.
|
---|
86 | if "%GSDLLANG%" == "fr" echo Vous devrez par consquent rexcuter setup.bat si vous voulez faire
|
---|
87 | if "%GSDLLANG%" == "fr" echo lancer des programmes Greenstone dans une autre session MS-DOS.
|
---|
88 |
|
---|
89 | if "%GSDLLANG%" == "ru" echo è¥ ®ªà㊥š¥ ¡ë«® ãá¯¥è® áâ஥®, ç⮡ë ãáâ ®¢šâì Greenstone ¡à âšâ¥
|
---|
90 | if "%GSDLLANG%" == "ru" echo ¢š¬ š¥, çâ® íâš § ç¥šï ¡ã€ãâ ⮫쪮 š¬¥âì íä䥪⠢ ¯à¥€¥« å í⮣® MS DOS
|
---|
91 | if "%GSDLLANG%" == "ru" echo á¥áášï. ë ¡ã€¥â¥ ¯®í⮬㠀®«Šë ¯®¢â®à® ã¯à ¢«ïâì setup.bat, ¥á«š ë å®âšâ¥
|
---|
92 | if "%GSDLLANG%" == "ru" echo ã¯à ¢«ïâì ¯à®£à ¬¬ ¬š ¥«ñëå š§¢¥àŠ¥ëå ¯®à®€ ®â à §«šç®© á¥áášš MS DOS.
|
---|
93 |
|
---|
94 | :End
|
---|