From a72a5032cef650899febc875a2fed2431b02774d Mon Sep 17 00:00:00 2001 From: "Zeyi (Rice) Fan" Date: Mon, 6 Jul 2020 15:25:58 -0700 Subject: [PATCH] avoid using relative path in fb_py_win_main Summary: After some experimenting, it is a little awkward if we want to specify a relative path based on the executable location. We'd need to add a bunch of path calculations to make it right, and I don't think the added complexity is really worth the effort. As a result, let's just remove the use of relative path, and if we ever want to ship a copy of Python distribution, we can place it under the same directory as the binary. Reviewed By: chadaustin Differential Revision: D22394180 fbshipit-source-id: 86d27f6d16a03fe08826b5e5eafcef2a1c77997f --- build/fbcode_builder/CMake/fb_py_win_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/fbcode_builder/CMake/fb_py_win_main.c b/build/fbcode_builder/CMake/fb_py_win_main.c index 41645ad68..6ee8506f7 100644 --- a/build/fbcode_builder/CMake/fb_py_win_main.c +++ b/build/fbcode_builder/CMake/fb_py_win_main.c @@ -6,7 +6,7 @@ #include #include -#define PATH_SIZE 1024 +#define PATH_SIZE 32768 typedef int (*Py_Main)(int, wchar_t**); @@ -46,7 +46,7 @@ int locate_py_main(int argc, wchar_t **argv) { // last added directory has highest priority add_search_path(L"C:\\Python36\\"); add_search_path(L"C:\\Python37\\"); - add_search_path(L"..\\python\\"); + add_search_path(L"C:\\Python38\\"); python_dll = LoadLibraryExW(L"python3.dll", NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);