From 94959259362358f3de95c57a8a011feb11ee5de1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 29 Jul 2011 14:46:26 +0100 Subject: Related: fdo#34184 on windows find the openssl libs that _ssl.pyd needs --- pyuno/source/loader/pyuno_loader.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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 #include -#include +#include #include #include @@ -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_PATHSEPARATOR)). + append(sBrandLocation).makeStringAndClear(); + osl_setEnvironment(sEnvName.pData, sPath.pData); +#endif + #if PY_MAJOR_VERSION >= 3 PyImport_AppendInittab( (char*)"pyuno", PyInit_pyuno ); #else -- cgit