mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-16 04:25:54 +08:00
Allow configuration directory next to app bundle on MacOs
This commit is contained in:
parent
ca1a475e2a
commit
c6560508d7
@ -744,7 +744,14 @@ void GUI_App::init_app_config()
|
|||||||
// Mac : "~/Library/Application Support/Slic3r"
|
// Mac : "~/Library/Application Support/Slic3r"
|
||||||
|
|
||||||
if (data_dir().empty()) {
|
if (data_dir().empty()) {
|
||||||
//check if there is a "configuration" directory next to the resources
|
//check if there is a "configuration" directory
|
||||||
|
#ifdef __APPLE__
|
||||||
|
//... next to the app bundle on MacOs
|
||||||
|
if (boost::filesystem::exists(boost::filesystem::path{ resources_dir() } / ".." / ".." / ".." / "configuration")) {
|
||||||
|
set_data_dir((boost::filesystem::path{ resources_dir() } / ".." / ".." / ".." / "configuration").string());
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
//... next to the resources directory
|
||||||
if (boost::filesystem::exists(boost::filesystem::path{ resources_dir() } / ".." / "configuration")) {
|
if (boost::filesystem::exists(boost::filesystem::path{ resources_dir() } / ".." / "configuration")) {
|
||||||
set_data_dir((boost::filesystem::path{ resources_dir() } / ".." / "configuration").string());
|
set_data_dir((boost::filesystem::path{ resources_dir() } / ".." / "configuration").string());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user