Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2020-12-16 17:27:47 +0300
committerRay Molenkamp <github@lazydodo.com>2020-12-16 17:27:47 +0300
commit684c771263db1a5a7dbf65cde97e672d94b57839 (patch)
tree5e15fccbb909602c4f451b98d427196d1633c40a
parent25543e6983602b4d14f51d73396c652b2aa65aa0 (diff)
Fix: Python warning in windows debug builds
When doing a debug build on windows, blender will start with the following warning: "Unable to find the python binary, the multiprocessing module may not be functional!" The root cause for this issue is: for a debug build the python binary is called python_d.exe rather than just python.exe This change fixes BKE_appdir_program_python_search to look for the _d suffix for debug builds on windows Differential Revision: https://developer.blender.org/D9775 Reviewed by: Campbell Barton
-rw-r--r--source/blender/blenkernel/intern/appdir.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
index a6b3985e80d..ae0c27635a6 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -906,14 +906,20 @@ bool BKE_appdir_program_python_search(char *fullpath,
const char *python_build_def = STRINGIFY(PYTHON_EXECUTABLE_NAME);
#endif
const char *basename = "python";
+#if defined(WIN32) && !defined(NDEBUG)
+ const char *basename_debug = "python_d";
+#endif
char python_version[16];
/* Check both possible names. */
const char *python_names[] = {
#ifdef PYTHON_EXECUTABLE_NAME
- python_build_def,
+ python_build_def,
+#endif
+#if defined(WIN32) && !defined(NDEBUG)
+ basename_debug,
#endif
- python_version,
- basename,
+ python_version,
+ basename,
};
bool is_found = false;