[Libreoffice-commits] .: Branch 'libreoffice-3-4' - pyuno/source
Noel Power
noelp at kemper.freedesktop.org
Wed Aug 10 07:38:59 PDT 2011
pyuno/source/loader/pyuno_loader.cxx | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
New commits:
commit f0015760532314442babddcc90e4ed60767c7946
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jul 29 13:46:26 2011 +0000
Related: fdo#34184 on windows find the openssl libs that _ssl.pyd needs
Signed-off-by: Noel Power <noel.power at novell.com>
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 771f2c5..59afa0f 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>
@@ -178,6 +178,23 @@ 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_trace("***** adding python related path %s", rtl::OUStringToOString( sPath, RTL_TEXTENCODING_UTF8 ).getStr() );
+ osl_setEnvironment(sEnvName.pData, sPath.pData);
+#endif
// initialize python
Py_Initialize();
More information about the Libreoffice-commits
mailing list