diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-29 13:46:26 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-08-10 15:27:52 +0100 |
commit | f0015760532314442babddcc90e4ed60767c7946 (patch) | |
tree | 8c8bebda8cb88694a3e5aa6e587cb4bff388caeb | |
parent | c7cefc7adb5ad8296f8911e8f39f0f86b23c2040 (diff) |
Related: fdo#34184 on windows find the openssl libs that _ssl.pyd needs
Signed-off-by: Noel Power <noel.power@novell.com>
-rw-r--r-- | pyuno/source/loader/pyuno_loader.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx index 771f2c5a9..59afa0f5c 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(); |