Show
Ignore:
Timestamp:
14.03.2012 15:46:42 (8 years ago)
Author:
ak19
Message:

1. Cleaning up refs to the JODCONVERTER_PORT env var which has been phased out since it ought to be the same as SOFFICE_PORT to which it should connect. 2. The GLI OpenOffice? extension plugin provides the option of changing the listening port. If changed, this change was previously not being transmitted to the actual command being run. This should now be the case, still requires testing.

Location:
gs2-extensions/open-office/trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/open-office/trunk/src/perllib/plugins/OpenOfficeConverter.pm

    r25209 r25218  
    6767        my $status = 0; 
    6868 
    69         # The port that jodconverter uses to connect to soffice. 
    70         # We set this to 8100 (else jodconverter would have used  
    71         # 2002 as the port number, which can clash with some programs 
    72         # such as LogMeIn. Users can specify another port by setting 
    73         # the environment variable in setup.bat or <ext>-setup.pl. 
    74         if(!defined $ENV{'JODCONVERTER_PORT'}) { 
    75         $ENV{'JODCONVERTER_PORT'} = "8100"; # make this the same as the soffice_port, by default jodconverter would try 8100 
    76         } 
    77  
     69        # No more JODCONVERTER_PORT env var: the port that jodconverter uses is now the 
     70        # same as SOFFICE_PORT, because the 2 are meant to communicate on the same port. 
     71        # The default port that jodconverter expects OO to listen on is 8100, so we try that. 
    7872        if ($ENV{'GSDLOS'} =~ m/^windows$/) {        
    7973        if(!defined $ENV{'SOFFICE_HOST'}) { 
     
    8175        } 
    8276        if(!defined $ENV{'SOFFICE_PORT'}) { 
    83             $ENV{'SOFFICE_PORT'} = "8100"; # Default that jodconverter is 8100, and since this has to be the same, this best be 8100 
     77            $ENV{'SOFFICE_PORT'} = "8100";  
    8478        } 
    8579        # important to have this set when the Greenstone server  
     
    264258    } 
    265259 
     260    #if($self->{'openoffice_port'} != $ENV{'SOFFICE_PORT'}) { # if the user changed it 
     261    #$ENV{'SOFFICE_PORT'} = $self->{'openoffice_port'}; 
     262    #} 
     263 
    266264    # jodjar always assumes that soffice (officeHome) is in "C:\Prog Files\OpenOffice org 3" 
    267265    # or "/opt/openoffice.org3" rather than checking for any user-defined SOFFICE_HOME var.  
    268266    # Therefore, we run jodjar with the -Doffice.home flag explicitly set, instead of without. 
    269     # my $convert_cmd = "java -jar \"$jodjar\" --port $ENV{'JODCONVERTER_PORT'}"; 
    270     my $convert_cmd = "java -Doffice.home=\"".$office_short_path."\" -jar \"$jodjar\" --port $ENV{'JODCONVERTER_PORT'}"; 
     267    # my $convert_cmd = "java -jar \"$jodjar\" --port $ENV{'SOFFICE_PORT'}";    
     268    my $convert_cmd = "java -Doffice.home=\"".$office_short_path."\" -jar \"$jodjar\" --port $self->{'openoffice_port'}"; # --port $ENV{'SOFFICE_PORT'} 
    271269    $convert_cmd .= " \"$source_file_full_path\" \"$target_file_path\""; 
    272270 
  • gs2-extensions/open-office/trunk/src/setup.bat

    r23735 r25218  
    1111:: set SOFFICE_HOME=C:\Program Files\OpenOffice.org 3\program 
    1212:: set SOFFICE_HOST=localhost 
    13 :: set SOFFICE_PORT=8200 
    14 :: set JODCONVERTER_PORT=8100 
     13:: set SOFFICE_PORT=8100 
    1514 
    1615