From ce3c31e77e13d9f9aeef9ed9bf052604611e23d8 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 7 Oct 2020 12:54:29 +0200 Subject: [PATCH] Support symlinks to prusaslicer binary on OSX and Linux. --- src/PrusaSlicer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index f934470c1..9285fa13a 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -665,7 +665,7 @@ bool CLI::setup(int argc, char **argv) #ifdef __APPLE__ // The application is packed in the .dmg archive as 'Slic3r.app/Contents/MacOS/Slic3r' // The resources are packed to 'Slic3r.app/Contents/Resources' - boost::filesystem::path path_resources = path_to_binary.parent_path() / "../Resources"; + boost::filesystem::path path_resources = std::filesystem::canonical(path_to_binary).parent_path() / "../Resources"; #elif defined _WIN32 // The application is packed in the .zip archive in the root, // The resources are packed to 'resources' @@ -679,7 +679,7 @@ bool CLI::setup(int argc, char **argv) // The application is packed in the .tar.bz archive (or in AppImage) as 'bin/slic3r', // The resources are packed to 'resources' // Path from Slic3r binary to resources: - boost::filesystem::path path_resources = path_to_binary.parent_path() / "../resources"; + boost::filesystem::path path_resources = std::filesystem::canonical(path_to_binary).parent_path() / "../resources"; #endif set_resources_dir(path_resources.string());