diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index 60f3a13218..277bf12503 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "unix/fhs.hpp" // Generated by CMake from ../platform/unix/fhs.hpp.in @@ -594,7 +595,9 @@ bool CLI::setup(int argc, char **argv) } } - boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]); + // See Invoking prusa-slicer from $PATH environment variable crashes #5542 + // boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]); + boost::filesystem::path path_to_binary = boost::dll::program_location(); // Path from the Slic3r binary to its resources. #ifdef __APPLE__