mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 09:51:59 +08:00
settings directory is now taken from a "configuration" directory if next to the "resources" one.
Allow of a "portable version" without the --datadir needed. supermerill/SuperSlicer#1212
This commit is contained in:
parent
5265c85c82
commit
de3ba3c794
@ -744,6 +744,10 @@ void GUI_App::init_app_config()
|
||||
// Mac : "~/Library/Application Support/Slic3r"
|
||||
|
||||
if (data_dir().empty()) {
|
||||
//check if there is a "configuration" directory next to the resources
|
||||
if (boost::filesystem::exists(boost::filesystem::path{ resources_dir() } / ".." / "configuration")) {
|
||||
set_data_dir((boost::filesystem::path{ resources_dir() } / ".." / "configuration").string());
|
||||
} else {
|
||||
#ifndef __linux__
|
||||
set_data_dir(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data());
|
||||
#else
|
||||
@ -755,6 +759,7 @@ void GUI_App::init_app_config()
|
||||
set_data_dir((dir + "/" + GetAppName()).ToUTF8().data());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (!app_config)
|
||||
app_config = new AppConfig(is_editor() ? AppConfig::EAppMode::Editor : AppConfig::EAppMode::GCodeViewer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user