Merge pull request #6615 from Beep6581/lensfun-db-fallback
Lensfun DB directory fallback
This commit is contained in:
commit
3182af11d3
@ -58,10 +58,20 @@ int init (const Settings* s, const Glib::ustring& baseDir, const Glib::ustring&
|
|||||||
#pragma omp section
|
#pragma omp section
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
bool ok;
|
||||||
|
|
||||||
if (s->lensfunDbDirectory.empty() || Glib::path_is_absolute(s->lensfunDbDirectory)) {
|
if (s->lensfunDbDirectory.empty() || Glib::path_is_absolute(s->lensfunDbDirectory)) {
|
||||||
LFDatabase::init(s->lensfunDbDirectory);
|
ok = LFDatabase::init(s->lensfunDbDirectory);
|
||||||
} else {
|
} else {
|
||||||
LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbDirectory));
|
ok = LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbDirectory));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ok && !s->lensfunDbBundleDirectory.empty() && s->lensfunDbBundleDirectory != s->lensfunDbDirectory) {
|
||||||
|
if (Glib::path_is_absolute(s->lensfunDbBundleDirectory)) {
|
||||||
|
LFDatabase::init(s->lensfunDbBundleDirectory);
|
||||||
|
} else {
|
||||||
|
LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbBundleDirectory));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
|
@ -83,6 +83,7 @@ public:
|
|||||||
double level0_cbdl;
|
double level0_cbdl;
|
||||||
double level123_cbdl;
|
double level123_cbdl;
|
||||||
Glib::ustring lensfunDbDirectory; // The directory containing the lensfun database. If empty, the system defaults will be used, as described in https://lensfun.github.io/manual/latest/dbsearch.html
|
Glib::ustring lensfunDbDirectory; // The directory containing the lensfun database. If empty, the system defaults will be used, as described in https://lensfun.github.io/manual/latest/dbsearch.html
|
||||||
|
Glib::ustring lensfunDbBundleDirectory;
|
||||||
int cropsleep;
|
int cropsleep;
|
||||||
double reduchigh;
|
double reduchigh;
|
||||||
double reduclow;
|
double reduclow;
|
||||||
|
@ -148,12 +148,14 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
||||||
|
options.rtSettings.lensfunDbBundleDirectory = LENSFUN_DB_PATH;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
argv0 = DATA_SEARCH_PATH;
|
argv0 = DATA_SEARCH_PATH;
|
||||||
creditsPath = CREDITS_SEARCH_PATH;
|
creditsPath = CREDITS_SEARCH_PATH;
|
||||||
licensePath = LICENCE_SEARCH_PATH;
|
licensePath = LICENCE_SEARCH_PATH;
|
||||||
options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
||||||
|
options.rtSettings.lensfunDbBundleDirectory = LENSFUN_DB_PATH;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool quickstart = dontLoadCache (argc, argv);
|
bool quickstart = dontLoadCache (argc, argv);
|
||||||
|
@ -425,12 +425,14 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
||||||
|
options.rtSettings.lensfunDbBundleDirectory = LENSFUN_DB_PATH;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
argv0 = DATA_SEARCH_PATH;
|
argv0 = DATA_SEARCH_PATH;
|
||||||
creditsPath = CREDITS_SEARCH_PATH;
|
creditsPath = CREDITS_SEARCH_PATH;
|
||||||
licensePath = LICENCE_SEARCH_PATH;
|
licensePath = LICENCE_SEARCH_PATH;
|
||||||
options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
||||||
|
options.rtSettings.lensfunDbBundleDirectory = LENSFUN_DB_PATH;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user