summaryrefslogtreecommitdiff
path: root/pyuno
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
commit94959259362358f3de95c57a8a011feb11ee5de1 (patch)
treeae20e0b631e0c6d08b1909054209c7c4728501d6 /pyuno
parenteb1aac5cbadd65463c1170ad967f80949b17f1fa (diff)
Related: fdo#34184 on windows find the openssl libs that _ssl.pyd needs
Diffstat (limited to 'pyuno')
-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 4f9bcd109c83..4e652023e968 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