Files
MINGW-packages/mingw-w64-python2/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch

28 lines
905 B
Diff

diff -Naur a/Modules/getpath.c b/Modules/getpath.c
--- a/Modules/getpath.c 2014-02-18 09:32:52.182200000 +0400
+++ b/Modules/getpath.c 2014-02-18 09:33:25.238600000 +0400
@@ -645,7 +645,10 @@
bufsz += strlen(zip_path) + 1;
bufsz += strlen(exec_prefix) + 1;
-
+#ifdef MS_WINDOWS
+ if (EXEC_PREFIX)
+ bufsz += strlen(EXEC_PREFIX) + 1;
+#endif
/* This is the only malloc call in this file */
buf = (char *)PyMem_Malloc(bufsz);
@@ -727,6 +730,11 @@
else
strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
#ifdef MS_WINDOWS
+ if (EXEC_PREFIX) {
+ /* Next add bin folder where the exe was found, for System DLLs e.g. tcl86.dll, tk86.dll */
+ strcat(buf, delimiter);
+ strcat(buf, EXEC_PREFIX);
+ }
if (path) {
/* Add path of executable/dll to system path. This
* is so that the correct tcl??.dll and tk??.dll get