Changeset 23732

Show
Ignore:
Timestamp:
22.02.2011 21:43:16 (9 years ago)
Author:
ak19
Message:

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

Location:
main/trunk/greenstone2
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/cgi-bin/gsdlCGI.pm

    r23468 r23732  
    447447} 
    448448 
     449# sets optional customisable values to do with Open Office 
     450sub setup_openoffice { 
     451    my $self = shift @_; 
     452    my ($optional) = @_; 
     453 
     454    if (!defined $self->{'soffice_home'}) # Don't need to go through it all again if we'd already done this before 
     455    { 
     456    # First look in the gsdlsite.cfg file for the openoffice properties to be defined 
     457    $self->{'soffice_home'} = $self->get_config_info("soffice_home", $optional); 
     458    $self->{'soffice_host'} = $self->get_config_info("soffice_host", $optional); 
     459    $self->{'soffice_port'} = $self->get_config_info("soffice_port", $optional); 
     460     
     461    if (defined $self->{'soffice_home'}) { 
     462        $ENV{'SOFFICE_HOME'} = $self->{'soffice_home'};  
     463    }    
     464    if (defined $self->{'soffice_host'}) { 
     465        $ENV{'SOFFICE_HOST'} = $self->{'soffice_host'};  
     466    } 
     467    if (defined $self->{'soffice_port'}) { 
     468        $ENV{'SOFFICE_PORT'} = $self->{'soffice_port'};  
     469    } 
     470    } 
     471} 
     472 
    449473sub setup_gsdl { 
    450474    my $self = shift @_; 
     
    597621    # FEDORA_HOME and FEDORA_VERSION are needed (by scripts g2f-import and g2f-buildcol). 
    598622    $self->setup_fedora_homes($optional); 
     623 
     624 
     625    # Check for any customisations to Open-Office if on Windows 
     626    if ($gsdlos eq "windows") { 
     627    $self->setup_openoffice($optional); 
     628    } 
    599629} 
    600630 
  • main/trunk/greenstone2/cgi-bin/gsdlsite.cfg.in

    r19236 r23732  
    5858#javahome /full/path/to/j2sdk1.4-or-higher 
    5959 
     60# Options for Open Office (used in converting Office documents) 
     61 
     62# If using Open Office on Windows, then you can optionally customise the  
     63# following properties (defaults are as shown). E.g. if Open Office is not  
     64# located in C:\Program Files\OpenOffice.org 3\program, then you'll want  
     65# to provide its new path by specifying soffice_home. 
     66#soffice_home "C:\Program Files\OpenOffice.org 3\program" 
     67#soffice_host 127.0.0.1 
     68#soffice_port 8200 
     69 
     70# Leave an empty line at the end 
  • main/trunk/greenstone2/runtime-src/packages/apache-httpd/windows-httpd.conf.in

    r23252 r23732  
    4545#Listen 12.34.56.78:80 
    4646Listen **PORT** 
     47 
     48# http://httpd.apache.org/docs/1.3/mod/mod_env.html#passenv  
     49# For a remote greenstone server on Windows, need to have access to the 
     50# USERPROFILE environment variable in order for open-office to process docs 
     51# It also requires ProgramFiles to guess where the OpenOffice bin is installed 
     52PassEnv "USERPROFILE" "ProgramFiles" LANG 
    4753 
    4854#