Fixed an issue that Orca won't run if multi-Config generator is used on Linux(Fedora)

This commit is contained in:
SoftFever 2025-07-04 23:01:38 +08:00
parent a332167e5a
commit 7f8f807500

View file

@ -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());