From 7f8f8075004e1cfa9fb42be0959b78a6f0500ac4 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Fri, 4 Jul 2025 23:01:38 +0800 Subject: [PATCH] Fixed an issue that Orca won't run if multi-Config generator is used on Linux(Fedora) --- src/OrcaSlicer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/OrcaSlicer.cpp b/src/OrcaSlicer.cpp index b652ce689f..2257ae5f55 100644 --- a/src/OrcaSlicer.cpp +++ b/src/OrcaSlicer.cpp @@ -5986,6 +5986,11 @@ bool CLI::setup(int argc, char **argv) // The resources are packed to 'resources' // Path from Slic3r binary to resources: boost::filesystem::path path_resources = boost::filesystem::canonical(path_to_binary).parent_path().parent_path() / "resources"; + //Orca: for build systems that support multiple configurations, the binary may be in a subdirectory like "bin/Release" or "bin/Debug". + if( !boost::filesystem::exists(path_resources)) { + // If the resources directory does not exist, try to use the resources directory + path_resources = boost::filesystem::canonical(path_to_binary).parent_path().parent_path().parent_path() / "resources"; + } #endif set_resources_dir(path_resources.string());