diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-12-11 12:57:12 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-12-11 12:57:12 +0000 |
commit | 392fb0681022a7fa4b04003f7267cdcf96873a60 (patch) | |
tree | 200b7b82f396b779edbaec09765ab6fa11ff6cf7 /pyuno | |
parent | 8a7a7106325711640c7a63f2bfa7b2c1aede314a (diff) |
CWS-TOOLING: integrate CWS sb101
2008-12-08 16:52:06 +0100 sb r265009 : #i95330# python23.dll needs to be copied to brand layer, not just moved there
2008-11-24 18:15:54 +0100 sb r264259 : #i95022# tools::extendApplicationEnvironment gets URE_BOOTSTRAP value from outside bootstrap.cxx, so needs to operate in LOOKUP_MODE_URE_BOOTSTRAP, too
2008-11-20 21:12:31 +0100 jbu r264103 : deactivated debug log
2008-11-20 21:09:03 +0100 jbu r264102 : #i95331# ld_library_path now contains ure/lib directory
2008-11-20 21:05:37 +0100 jbu r264101 : #i95330# python.dll is now installed in the brand-program directory (unix remains unchanged)
2008-11-20 20:46:57 +0100 jbu r264099 : #i95118# + #i93994# Python scripts in share and user uno packages now work again
2008-11-20 20:38:23 +0100 jbu r264098 : #i95037# python wrapper now waits for completion of python executable and currectly returns the exit state
2008-11-20 10:46:28 +0100 sb r264034 : #i95028# import socket, since on Windows sal3.dll no longer calls WSAStartup (and import socket does)
2008-11-18 17:01:09 +0100 sb r263784 : #i96314# fixed encode()
2008-11-18 15:59:17 +0100 sb r263779 : #i95024# missing vnd.sun.star.pathname: in URE_BOOTSTRAP
2008-11-18 13:51:36 +0100 sb r263765 : #i95022# treat \ and $ verbatim in URE_BOOTSTRAP=vnd.sun.star.pathname values
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/loader/pythonloader.py | 2 | ||||
-rw-r--r-- | pyuno/source/module/uno.py | 1 | ||||
-rw-r--r-- | pyuno/zipcore/python.cxx | 22 | ||||
-rw-r--r-- | pyuno/zipcore/python.sh | 2 |
4 files changed, 18 insertions, 9 deletions
diff --git a/pyuno/source/loader/pythonloader.py b/pyuno/source/loader/pythonloader.py index 5a246ea4237e..0a5e8f5fc271 100644 --- a/pyuno/source/loader/pythonloader.py +++ b/pyuno/source/loader/pythonloader.py @@ -38,7 +38,7 @@ from com.sun.star.loader import XImplementationLoader from com.sun.star.lang import XServiceInfo MODULE_PROTOCOL = "vnd.openoffice.pymodule:" -DEBUG = 1 +DEBUG = 0 g_supportedServices = "com.sun.star.loader.Python", # referenced by the native C++ loader ! g_implementationName = "org.openoffice.comp.pyuno.Loader" # referenced by the native C++ loader ! diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py index e9484bb67fb9..e35cdd0133c6 100644 --- a/pyuno/source/module/uno.py +++ b/pyuno/source/module/uno.py @@ -32,6 +32,7 @@ import sys import pyuno import __builtin__ +import socket # since on Windows sal3.dll no longer calls WSAStartup # all functions and variables starting with a underscore (_) must be considered private # and can be changed at any time. Don't use them diff --git a/pyuno/zipcore/python.cxx b/pyuno/zipcore/python.cxx index 4a7fa06d85c1..412f75a84598 100644 --- a/pyuno/zipcore/python.cxx +++ b/pyuno/zipcore/python.cxx @@ -55,14 +55,17 @@ wchar_t * encode(wchar_t * buffer, wchar_t const * text) { wchar_t c = *text++; if (c == L'\0') { break; - } else if (c == L'$') { + } else if (c == L'"') { + // Double any preceding backslashes as required by Windows: + for (std::size_t i = 0; i < n; ++i) { + *buffer++ = L'\\'; + } *buffer++ = L'\\'; - *buffer++ = L'$'; + *buffer++ = L'"'; n = 0; } else if (c == L'\\') { *buffer++ = L'\\'; - *buffer++ = L'\\'; - n += 2; + ++n; } else { *buffer++ = c; n = 0; @@ -88,9 +91,11 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { exit(EXIT_FAILURE); } wchar_t * pathEnd = tools::filename(path); - wchar_t bootstrap[MAX_PATH]; + wchar_t bootstrap[MY_LENGTH(L"vnd.sun.star.pathname:") + MAX_PATH] = + L"vnd.sun.star.pathname:"; //TODO: overflow wchar_t * bootstrapEnd = tools::buildPath( - bootstrap, path, pathEnd, MY_STRING(L"fundamental.ini")); + bootstrap + MY_LENGTH(L"vnd.sun.star.pathname:"), path, pathEnd, + MY_STRING(L"fundamental.ini")); if (bootstrapEnd == NULL || (tools::buildPath(path, path, pathEnd, MY_STRING(L"..\\basis-link")) == NULL)) @@ -251,5 +256,8 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { NULL, &startinfo, &procinfo)) { exit(EXIT_FAILURE); } - exit(EXIT_SUCCESS); + WaitForSingleObject(procinfo.hProcess,INFINITE); + DWORD exitStatus; + GetExitCodeProcess(procinfo.hProcess,&exitStatus); + exit(exitStatus); } diff --git a/pyuno/zipcore/python.sh b/pyuno/zipcore/python.sh index ef54c75ecccc..5195f68e24aa 100644 --- a/pyuno/zipcore/python.sh +++ b/pyuno/zipcore/python.sh @@ -48,7 +48,7 @@ PATH=$sd_prog${PATH+:$PATH} export PATH # Set LD_LIBRARY_PATH so that "import pyuno" finds libpyuno.so: -LD_LIBRARY_PATH=$sd_prog/../basis-link/program${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} +LD_LIBRARY_PATH=$sd_prog/../basis-link/program:$sd_prog/../basis-link/ure-link/lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH # Set URE_BOOTSTRAP so that "uno.getComponentContext()" bootstraps a complete |