[svn] r6394 - in trunk/tools/unoconv: . tests
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Wed Jul 2 19:28:52 CEST 2008
Author: dag
Date: 2008-07-02 18:28:50 +0100 (Wed, 02 Jul 2008)
New Revision: 6394
Modified:
trunk/tools/unoconv/ChangeLog
trunk/tools/unoconv/tests/Makefile
trunk/tools/unoconv/unoconv
Log:
- Added OpenOffice path to LD_LIBRARY_PATH env var
- Added -nofirstwizard to ooffice invocations
Modified: trunk/tools/unoconv/ChangeLog
===================================================================
--- trunk/tools/unoconv/ChangeLog 2008-06-30 22:25:34 UTC (rev 6393)
+++ trunk/tools/unoconv/ChangeLog 2008-07-02 17:28:50 UTC (rev 6394)
@@ -6,6 +6,8 @@
- Added -i/--pipe option to communicate with UNO pipe (Fernando Lucas Rodriguez)
- Added -o/--outputpath option to modify the output path (Fernando Lucas Rodriguez)
- Added support for MediaWiki output (txt)
+- Added OpenOffice path to LD_LIBRARY_PATH env var
+- Added -nofirstwizard to ooffice invocations
* 0.3 - released 31/08/2007
- Determine doctype from input filename (if not specified)
Modified: trunk/tools/unoconv/tests/Makefile
===================================================================
--- trunk/tools/unoconv/tests/Makefile 2008-06-30 22:25:34 UTC (rev 6393)
+++ trunk/tools/unoconv/tests/Makefile 2008-07-02 17:28:50 UTC (rev 6394)
@@ -11,7 +11,7 @@
%:
# -killall ooffice soffice.bin
- -../unoconv -vvvv -f $@ document-example.odt
+ -../unoconv -vvvv -p 12345 -f $@ document-example.odt
# @ps aux | grep office
# -unoconv -f $@ dag.gif
# docbook2pdf -d curriculum-vitae.dsl#print curriculum-vitae-dag-wieers.xml
Modified: trunk/tools/unoconv/unoconv
===================================================================
--- trunk/tools/unoconv/unoconv 2008-06-30 22:25:34 UTC (rev 6393)
+++ trunk/tools/unoconv/unoconv 2008-07-02 17:28:50 UTC (rev 6394)
@@ -16,13 +16,14 @@
import getopt, sys, os, glob, time
-#extrapaths = ('/usr/lib/openoffice/program/', '/usr/lib/openoffice.org2.0/program/')
extrapaths = glob.glob('/usr/lib*/openoffice*/program') + glob.glob('/usr/lib*/ooo*/program') + glob.glob('/opt/openoffice*/program') + glob.glob('C:\\Program Files\\OpenOffice.org *\\program\\') + [ '/Applications/NeoOffice.app/Contents/program', '/usr/bin' ]
for path in extrapaths:
try:
sys.path.append(path)
import uno, unohelper
os.environ['PATH'] = '%s:' % path + os.environ['PATH']
+ ### Not sure if this helps running soffice.bin on some systems ? please report
+ os.environ['LD_LIBRARY_PATH'] = '%s:' % path
break
except ImportError:
sys.path.remove(path)
@@ -315,6 +316,8 @@
# self.connection = "socket,host=%s,port=%s;urp;" % (self.server, self.port)
else:
self.connection = "pipe,name=%s;urp;StarOffice.ComponentContext" % (self.pipe)
+ if self.verbose >=3:
+ print >>sys.stderr, 'Connection type: %s' % self.connection
### Make it easier for people to use a doctype (first letter is enough)
if self.doctype:
@@ -519,7 +522,7 @@
for bin in ('soffice.bin', 'soffice', ):
error(2, "Warning: trying to launch %s." % bin)
try:
- os.execvp(bin, [bin, "-nologo", "-nodefault", "-accept=%s" % op.connection]);
+ os.execvp(bin, [bin, "-headless", "-nologo", "-nodefault", "-norestore", "-nofirststartwizard", "-accept=%s" % op.connection]);
except:
error(3, "Launch of %s failed.\n%s" % (bin, e))
continue
@@ -552,7 +555,7 @@
if convertor.desktop.getCurrentFrame():
for bin in ('soffice.bin', 'soffice', ):
try:
- os.spawnvp(os.P_NOWAIT, bin, [bin, "-nologo", "-nodefault", "-headless", "-unaccept=%s" % op.connection]);
+ os.spawnvp(os.P_NOWAIT, bin, [bin, "-headless", "-nologo", "-nodefault", "-norestore", "-nofirststartwizard", "-unaccept=%s" % op.connection]);
error(2, 'OpenOffice listener successfully disabled.')
break
except Exception, e:
More information about the svn-commits
mailing list