diff options
author | Ray Molenkamp <github@lazydodo.com> | 2020-12-16 17:27:47 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2020-12-16 17:27:47 +0300 |
commit | 684c771263db1a5a7dbf65cde97e672d94b57839 (patch) | |
tree | 5e15fccbb909602c4f451b98d427196d1633c40a /source/blender/blenkernel/intern/appdir.c | |
parent | 25543e6983602b4d14f51d73396c652b2aa65aa0 (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
Diffstat (limited to 'source/blender/blenkernel/intern/appdir.c')
-rw-r--r-- | source/blender/blenkernel/intern/appdir.c | 12 |
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; |