Changeset 24687 for gs2-extensions
- Timestamp:
- 2011-09-28T19:56:37+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/open-office/trunk/src/perllib/plugins/OpenOfficeConverter.pm
r24569 r24687 64 64 # test to see if soffice is in path 65 65 my $cmd = "soffice -headless 2>&1"; # for linux and mac 66 my $status = 0; 66 67 67 68 # The port that jodconverter uses to connect to soffice. … … 96 97 # tends to hang, waiting for the prompt to return after OO has been started up 97 98 # (which doesn't happen, so need to Ctrl-C GLI and run it again for it to work). 98 $cmd = "start \"soffice process\" soffice \"-accept=socket,host=$ENV{'SOFFICE_HOST'},port=$ENV{'SOFFICE_PORT'};urp;StarOffice.ServiceManager\" -headless 2>&1"; 99 $cmd .= " >nul"; 100 #print STDERR "***** Tried to start-up OpenOffice with:\n$cmd\n"; 99 100 # first need to silently check soffice exists else windows will display a popup 101 $status = system("which soffice >nul 2>&1"); # which.exe should be in bin/windows 102 if ($status == 0) { 103 $cmd = "start \"soffice process\" soffice \"-accept=socket,host=$ENV{'SOFFICE_HOST'},port=$ENV{'SOFFICE_PORT'};urp;StarOffice.ServiceManager\" -headless 2>&1"; 104 $cmd .= " >nul"; 105 #print STDERR "***** Tried to start-up OpenOffice with:\n$cmd\n"; 106 } 107 # else cmd is still undefined 101 108 } 102 109 else { … … 109 116 } 110 117 111 my $status = system($cmd);118 $status = system($cmd) if ($status == 0); 112 119 if ($status != 0) { 113 120 #print STDERR "Failed to run: $cmd\n";
Note:
See TracChangeset
for help on using the changeset viewer.