Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.6KB

  1. diff -Naur Python-3.8.0-orig/Modules/getpath.c Python-3.8.0/Modules/getpath.c
  2. --- Python-3.8.0-orig/Modules/getpath.c 2019-10-22 10:02:47.765731400 +0300
  3. +++ Python-3.8.0/Modules/getpath.c 2019-10-22 10:02:49.637734700 +0300
  4. @@ -1393,6 +1393,36 @@
  5. return status;
  6. }
  7. +#ifdef MS_WINDOWS
  8. + if (calculate->path_env) {
  9. + wchar_t *module_path, *norm_path;
  10. + // Add path of executable/dll to system path. This
  11. + // is so that the correct tcl??.dll and tk??.dll get used.
  12. + module_path = calculate->dll_path[0] ? calculate->dll_path : pathconfig->program_full_path;
  13. + norm_path = (wchar_t *)alloca(sizeof(wchar_t) * (wcslen(module_path) + 1));
  14. + if (norm_path) {
  15. + wchar_t *slashes, *end, *new_path;
  16. + wcscpy(norm_path, module_path);
  17. + slashes = wcschr(norm_path, L'/');
  18. + while (slashes) {
  19. + *slashes = L'\\';
  20. + slashes = wcschr(slashes + 1, L'/');
  21. + }
  22. + end = wcsrchr(norm_path, L'\\') ? wcsrchr(norm_path, L'\\') : norm_path + wcslen(norm_path);
  23. + end[1] = L'\0';
  24. +
  25. + new_path = (wchar_t *)alloca(sizeof(wchar_t) * (wcslen(L"PATH=") + wcslen(calculate->path_env) + 1 + wcslen(norm_path) + 1));
  26. + if (new_path) {
  27. + wcscpy(new_path, L"PATH=");
  28. + wcscat(new_path, calculate->path_env);
  29. + wcscat(new_path, L";");
  30. + wcscat(new_path, norm_path);
  31. + _wputenv(new_path);
  32. + }
  33. + }
  34. + }
  35. +#endif
  36. +
  37. if ((!calculate->prefix_found || !calculate->exec_prefix_found) &&
  38. calculate->warnings)
  39. {