[Libreoffice-commits] .: pyuno/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jul 29 06:46:38 PDT 2011


 pyuno/source/loader/pyuno_loader.cxx |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

New commits:
commit b9f4c91d97aacc5d311c17e43f5cfe408de572dc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 29 14:46:26 2011 +0100

    Related: fdo#34184 on windows find the openssl libs that _ssl.pyd needs

diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 49ad71c..1de9a7f 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -29,7 +29,7 @@
 #include <pyuno/pyuno.hxx>
 
 #include <osl/process.h>
-#include <osl/file.h>
+#include <osl/file.hxx>
 #include <osl/thread.h>
 
 #include <rtl/ustrbuf.hxx>
@@ -196,6 +196,22 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c
 
         if( pythonPath.getLength() )
             prependPythonPath( pythonPath );
+
+#if WNT
+    //extend PATH under windows to include the branddir/program so ssl libs will be found
+    //for use by terminal mailmerge dependency _ssl.pyd
+    rtl::OUString sEnvName(RTL_CONSTASCII_USTRINGPARAM("PATH"));
+    rtl::OUString sPath;
+    osl_getEnvironment(sEnvName.pData, &sPath.pData);
+    rtl::OUString sBrandLocation(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program"));
+    rtl::Bootstrap::expandMacros(sBrandLocation);
+    osl::FileBase::getSystemPathFromFileURL(sBrandLocation, sBrandLocation);
+    sPath = rtl::OUStringBuffer(sPath).
+        append(static_cast<sal_Unicode>(SAL_PATHSEPARATOR)).
+        append(sBrandLocation).makeStringAndClear();
+    osl_setEnvironment(sEnvName.pData, sPath.pData);
+#endif
+
 #if PY_MAJOR_VERSION >= 3
         PyImport_AppendInittab( (char*)"pyuno", PyInit_pyuno );
 #else


More information about the Libreoffice-commits mailing list