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

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

Second (final) part of allowing user to set which port Jodconverter uses to communicate with soffice. By default this is set to 2002 internal to jodconverter, but it conflicts with programs (like logmein) which use this port, so that jodconverter can fail unless the user is given the ability to change the port it uses.

  • Property svn:executable set to *
File size: 2.0 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:: You can also set the port that jodconverter uses to connect to OpenOffice.
8:: If this is (also) a remote Greenstone server, you will (also) want to edit the file
9:: gsdlsite.cfg in your Greenstone installation's cgi-bin folder.
10
11:: set SOFFICE_HOME=C:\Program Files\OpenOffice.org 3\program
12:: set SOFFICE_HOST=localhost
13:: set SOFFICE_PORT=8200
14:: set JODCONVERTER_PORT=8100
15
16
17set extdesc=the OpenOffice Extension
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 GEXT_OPENOFFICE=%CD%
29set PATH=%GEXT_OPENOFFICE%\bin\script;%PATH%
30set GS_CP_SET=yes
31goto Success
32
33:Win95
34if "%1" == "SetEnv" goto Win95Env
35REM We'll invoke a second copy of the command processor to make
36REM sure there's enough environment space
37COMMAND /E:2048 /K %0 SetEnv
38goto End
39
40:Win95Env
41set GEXT_OPENOFFICE=%CD%
42set PATH="%GEXT_OPENOFFICE%\bin\script";"%PATH%"
43set GS_CP_SET=yes
44goto Success
45
46:Success
47
48set fulldir=%~dp0
49
50:: strip off everything up to (and including) ext dir
51set extdir=%fulldir:*ext\=%
52
53:: remove trailing slash
54set extdir=%extdir:\=%
55
56setlocal enabledelayedexpansion
57if "x%GSDLEXTS%" == "x" (
58 set GSDLEXTS=!extdir!
59) else (
60 set GSDLEXTS=!GSDLEXTS!:!extdir!
61)
62endlocal & set GSDLEXTS=%GSDLEXTS%
63
64echo +Your environment is now setup for %extdesc%
65
66:: Back to delayed expansion to avoid problems with environment
67:: variables with brackets in them, such as "Program Files (x86)"
68
69
70:End
71
72popd
Note: See TracBrowser for help on using the repository browser.