source: gs2-extensions/open-office/trunk/src/setup.bat@ 23731

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

First part of changes for getting OpenOffice conversion to work on a remote WINDOWS Greenstone (Linux was working already).

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1@echo off
2pushd "%CD%"
3CD /D "%~dp0"
4
5:: Edit and uncomment the following environment variables if you want to customise the
6:: location of your OpenOffice installation or what host or port it should be run with.
7:: If this is (also) a remote Greenstone server, you will (also) want to edit the file
8:: gsdlsite.cfg in your Greenstone installation's cgi-bin folder.
9
10:: set SOFFICE_HOME=C:\Program Files\OpenOffice.org 3\program
11:: set SOFFICE_HOST=localhost
12:: set SOFFICE_PORT=8200
13
14
15set extdesc=the OpenOffice Extension
16
17if "%OS%" == "Windows_NT" goto WinNT
18if "%OS%" == "" goto Win95
19if "%GSDLLANG%" == "en" echo Setup failed - your PATH has not been set
20if "%GSDLLANG%" == "es" echo No se pudo realizar la configuraci¢n - no se ha establecido la RUTA.
21if "%GSDLLANG%" == "fr" echo Ech‚c de l'installation - votre variable PATH n'a pas ‚t‚ ajust‚e
22if "%GSDLLANG%" == "ru" echo “áâ ­®¢ª  ­¥ ã€ « áì - “’œ ­¥ ¡ë« ãáâ ­®¢«¥­
23goto End
24
25:WinNT
26set GEXT_OPENOFFICE=%CD%
27set PATH=%GEXT_OPENOFFICE%\bin\script;%PATH%
28set GS_CP_SET=yes
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 GEXT_OPENOFFICE=%CD%
40set PATH="%GEXT_OPENOFFICE%\bin\script";"%PATH%"
41set GS_CP_SET=yes
42goto Success
43
44:Success
45
46set fulldir=%~dp0
47
48:: strip off everything up to (and including) ext dir
49set extdir=%fulldir:*ext\=%
50
51:: remove trailing slash
52set extdir=%extdir:\=%
53
54setlocal enabledelayedexpansion
55if "x%GSDLEXTS%" == "x" (
56 set GSDLEXTS=!extdir!
57) else (
58 set GSDLEXTS=!GSDLEXTS!:!extdir!
59)
60endlocal & set GSDLEXTS=%GSDLEXTS%
61
62echo +Your environment is now setup for %extdesc%
63
64:: Back to delayed expansion to avoid problems with environment
65:: variables with brackets in them, such as "Program Files (x86)"
66
67
68:End
69
70popd
Note: See TracBrowser for help on using the repository browser.