diff options
author | Release Engineers <releng@openoffice.org> | 2009-05-04 11:45:11 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2009-05-04 11:45:11 +0000 |
commit | 4758f1c28393e096a9347931910d52f7bea5082c (patch) | |
tree | 6391e6262d5a217ea6092a72bba3df21d9dc4a8b /pyuno | |
parent | 50f9ae5a90c6a73890c9c4b12aedf90fa48b8bcf (diff) |
CWS-TOOLING: integrate CWS mingwport19
2009-04-23 16:09:03 +0200 tono r271180 : revert changes
2009-04-20 15:15:31 +0200 tono r270988 : i101223: MinGW port: atl patch fix
2009-04-14 14:54:29 +0200 tono r270779 : i101077: mingw port: make python to work with OOo
2009-04-14 14:52:46 +0200 tono r270777 : i101073: Mingw port fix: openssl 0.9.8k in cygwin case
Diffstat (limited to 'pyuno')
-rwxr-xr-x | pyuno/zipcore/makefile.mk | 8 | ||||
-rw-r--r-- | pyuno/zipcore/python.cxx | 34 |
2 files changed, 42 insertions, 0 deletions
diff --git a/pyuno/zipcore/makefile.mk b/pyuno/zipcore/makefile.mk index b2797630633f..f46106dc8afe 100755 --- a/pyuno/zipcore/makefile.mk +++ b/pyuno/zipcore/makefile.mk @@ -51,8 +51,12 @@ DESTROOT=$(BIN)$/$(PYDIRNAME) .IF "$(GUI)" == "UNX" PYTHONBINARY=$(BIN)$/python$(EXECPOST).bin .ELSE +.IF "$(COM)" == "GCC" +PYTHONBINARY=$(DESTROOT)$/bin$/python.bin +.ELSE PYTHONBINARY=$(DESTROOT)$/bin$/python$(EXECPOST) .ENDIF +.ENDIF FINDLIBFILES_TMP:=$(subst,/,$/ \ $(shell @$(FIND) $(SOLARLIBDIR)$/python -type f| $(GREP) -v .pyc |$(GREP) -v .py\~ |$(GREP) -v .orig )) @@ -114,7 +118,11 @@ $(BIN)$/python$(EXECPOST).bin : $(SOLARBINDIR)$/python$(EXECPOST) .ENDIF chmod +x $@ .ELSE +.IF "$(COM)" == "GCC" +$(DESTROOT)$/bin$/python.bin : $(SOLARBINDIR)$/python$(EXECPOST) +.ELSE $(DESTROOT)$/bin$/python$(EXECPOST) : $(SOLARBINDIR)$/python$(EXECPOST) +.ENDIF -$(MKDIRHIER) $(@:d) -rm -f $@ cat $< > $@ diff --git a/pyuno/zipcore/python.cxx b/pyuno/zipcore/python.cxx index 355921805dbb..2e0e1ea0acb4 100644 --- a/pyuno/zipcore/python.cxx +++ b/pyuno/zipcore/python.cxx @@ -133,6 +133,22 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { if (pythonpath3End == NULL) { exit(EXIT_FAILURE); } +#ifdef __MINGW32__ + wchar_t pythonpath4[MAX_PATH]; + wchar_t * pythonpath4End = tools::buildPath( + pythonpath4, path, pathEnd, + MY_STRING(L"\\program\\python-core-" MY_PYVERSION L"\\lib\\lib-dynload")); + if (pythonpath4End == NULL) { + exit(EXIT_FAILURE); + } + wchar_t pythonpath5[MAX_PATH]; + wchar_t * pythonpath5End = tools::buildPath( + pythonpath5, path, pathEnd, + MY_STRING(L"\\program\\python-core-" MY_PYVERSION L"\\lib\\lib-dynload")); + if (pythonpath5End == NULL) { + exit(EXIT_FAILURE); + } +#endif wchar_t pythonhome[MAX_PATH]; wchar_t * pythonhomeEnd = tools::buildPath( pythonhome, path, pathEnd, @@ -143,8 +159,13 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { wchar_t pythonexe[MAX_PATH]; wchar_t * pythonexeEnd = tools::buildPath( pythonexe, path, pathEnd, +#ifdef __MINGW32__ + MY_STRING( + L"\\program\\python-core-" MY_PYVERSION L"\\bin\\python.bin")); +#else MY_STRING( L"\\program\\python-core-" MY_PYVERSION L"\\bin\\python.exe")); +#endif if (pythonexeEnd == NULL) { exit(EXIT_FAILURE); } @@ -231,6 +252,18 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { exit(EXIT_FAILURE); } } +#ifdef __MINGW32__ + value = new wchar_t[ + (path1End - path1) + MY_LENGTH(L";") + (pythonpath2End - pythonpath2) + + MY_LENGTH(L";") + (pythonpath4End - pythonpath4) + + MY_LENGTH(L";") + (pythonpath5End - pythonpath5) + + MY_LENGTH(L";") + (pythonpath3End - pythonpath3) + + (n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1]; //TODO: overflow + wsprintfW( + value, L"%s;%s;%s;%s;%s%s%s", path1, pythonpath2, pythonpath4, + pythonpath5, pythonpath3, + n == 0 ? L"" : L";", orig); +#else value = new wchar_t[ (path1End - path1) + MY_LENGTH(L";") + (pythonpath2End - pythonpath2) + MY_LENGTH(L";") + (pythonpath3End - pythonpath3) + @@ -238,6 +271,7 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { wsprintfW( value, L"%s;%s;%s%s%s", path1, pythonpath2, pythonpath3, n == 0 ? L"" : L";", orig); +#endif if (!SetEnvironmentVariableW(L"PYTHONPATH", value)) { exit(EXIT_FAILURE); } |