summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-29 14:46:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-29 14:46:26 +0100
commitb9f4c91d97aacc5d311c17e43f5cfe408de572dc (patch)
tree86031ea8fe80a2bc1d8591e386b75d24ff8adf07
parent50b18c2c2f8e4c941f995555cf195357c933691c (diff)
Related: fdo#34184 on windows find the openssl libs that _ssl.pyd needs
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 49ad71c75..1de9a7f8b 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