mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
Fix of Invoking prusa-slicer from $PATH environment variable crashes #5542
Also it likely fixes Crashes when started from symbolic link #5751
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include <boost/nowide/cenv.hpp>
|
#include <boost/nowide/cenv.hpp>
|
||||||
#include <boost/nowide/iostream.hpp>
|
#include <boost/nowide/iostream.hpp>
|
||||||
#include <boost/nowide/integration/filesystem.hpp>
|
#include <boost/nowide/integration/filesystem.hpp>
|
||||||
|
#include <boost/dll/runtime_symbol_info.hpp>
|
||||||
|
|
||||||
#include "unix/fhs.hpp" // Generated by CMake from ../platform/unix/fhs.hpp.in
|
#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.
|
// Path from the Slic3r binary to its resources.
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|||||||
Reference in New Issue
Block a user