mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 12:35:56 +08:00
bugfix linux & macos build
This commit is contained in:
parent
71ba7a0367
commit
6141527694
@ -1097,6 +1097,7 @@ size_t PresetBundle::load_configbundle(const std::string &path, unsigned int fla
|
|||||||
namespace pt = boost::property_tree;
|
namespace pt = boost::property_tree;
|
||||||
pt::ptree tree;
|
pt::ptree tree;
|
||||||
boost::nowide::ifstream ifs(path);
|
boost::nowide::ifstream ifs(path);
|
||||||
|
#ifdef __WXMSW__
|
||||||
try {
|
try {
|
||||||
pt::read_ini(ifs, tree);
|
pt::read_ini(ifs, tree);
|
||||||
}catch(const std::exception& ex) {
|
}catch(const std::exception& ex) {
|
||||||
@ -1104,6 +1105,9 @@ size_t PresetBundle::load_configbundle(const std::string &path, unsigned int fla
|
|||||||
ss << "Error when reading bundle file " << path << ", error: " << ex.what();
|
ss << "Error when reading bundle file " << path << ", error: " << ex.what();
|
||||||
throw std::exception(ss.str().c_str());
|
throw std::exception(ss.str().c_str());
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
pt::read_ini(ifs, tree);
|
||||||
|
#endif
|
||||||
const VendorProfile *vendor_profile = nullptr;
|
const VendorProfile *vendor_profile = nullptr;
|
||||||
if (flags & (LOAD_CFGBNDLE_SYSTEM | LOAD_CFGBUNDLE_VENDOR_ONLY)) {
|
if (flags & (LOAD_CFGBNDLE_SYSTEM | LOAD_CFGBUNDLE_VENDOR_ONLY)) {
|
||||||
auto vp = VendorProfile::from_ini(tree, path);
|
auto vp = VendorProfile::from_ini(tree, path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user