Changeset 35453 for gs2-extensions/open-office/trunk
- Timestamp:
- 2021-09-22T17:56:15+12:00 (3 years ago)
- Location:
- gs2-extensions/open-office/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/open-office/trunk/src/perllib/plugins/OpenOfficeConverter.pm
r35415 r35453 84 84 # and open office is on a remote windows machine 85 85 if(!defined $ENV{'SOFFICE_HOME'}) { 86 $ENV{'SOFFICE_HOME'} = &FileUtils::filenameConcatenate($ENV{'ProgramFiles'},"OpenOffice.org 3"); 86 # check all the favourite haunts of openoffice in turn 87 $ENV{'SOFFICE_HOME'} = &util::get_first_existing_dir( 88 &FileUtils::filenameConcatenate($ENV{'ProgramFiles'},"OpenOffice.org 3"), 89 &FileUtils::filenameConcatenate($ENV{'ProgramFiles(X86)'},"OpenOffice.org 3"), 90 &FileUtils::filenameConcatenate($ENV{'ProgramFiles'},"LibreOffice"), 91 &FileUtils::filenameConcatenate($ENV{'ProgramFiles(X86)'},"LibreOffice") 92 ); 93 94 # These 2 env vars are diff and appear as expected when printed out in a cmd prompt on a 64 bit Windows. But on same machine 95 # in perl, at least when launched through (Java 32 bit) GLI, their values shown as the same: as "C:\Program Files (x86)" 96 #print STDERR "@@@@ ProgFiles: $ENV{'ProgramFiles'}\n"; 97 #print STDERR "@@@@ ProgFiles x86: $ENV{'ProgramFiles(X86)'}\n"; 87 98 } 88 my $ooffice_dir_guess = 89 &FileUtils::filenameConcatenate($ENV{'SOFFICE_HOME'},"program"); 90 if (-d $ooffice_dir_guess) { 91 &util::envvar_append("PATH",$ooffice_dir_guess); 99 if(defined $ENV{'SOFFICE_HOME'}) { 100 #print STDERR "@@@@ Found $ENV{'SOFFICE_HOME'}\n"; 101 my $ooffice_dir_guess = 102 &FileUtils::filenameConcatenate($ENV{'SOFFICE_HOME'},"program"); 103 if (-d $ooffice_dir_guess) { 104 &util::envvar_append("PATH",$ooffice_dir_guess); 105 } 92 106 } 93 107 94 108 # for windows, when working on a remote system, want to be able to start OO if 95 109 # not already running. We'll use the uno socket method to do so. Else client-gli
Note:
See TracChangeset
for help on using the changeset viewer.