lensfun
0.3.99.0
|
The database files could be loaded in two ways:
Lensfun has four pre-defined database locations which are available from the following static class members:
When lfDatabase::Load() is called without arguments, it first searches in lfDatabase::SystemLocation, lfDatabase::SystemUpdatesLocation and lfDatabase::UserUpdatesLocation. Only the folder with the newest database will be loaded, finally. The age of the database is determined based on the timestamp.txt
file found in the database folder. It contains the UNIX time stamp of the last Git commit, hence a higher number identifies a more recent database.
Afterwards, lfDatabase::UserLocation is loaded without considering a timestamp.txt
. This means that profiles in lfDatabase::UserLocation will always have the highest priority and will overwrite previously loaded profiles with the same name.
The system-wide database folders can be configured at compile time and are preset by the GNUInstallDirs
CMake Module.
lfDatabase::SystemLocation defaults to ${CMAKE_INSTALL_DATAROOTDIR}/lensfun/version_x
, where x denotes the database format version (Database format versions).
On Linux this is typically /usr/share/lensfun/version_1
or similar.
lfDatabase::SystemUpdatesLocation defaults to ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/lensfun-updates/version_x
, where x denotes the database format version (Database format versions).
On Linux this is typically /var/lib/lensfun-updated/version_1
or similar.
The user folders are set at run time based on the current user name and home directory.
lfDatabase::UserLocation is at ~/.local/share/lensfun/updates/version_x
, where x denotes the database format version (Database format versions).
lfDatabase::UserLocation is at ~/.local/share/lensfun
.
As GNUInstallDirs
CMake Module does not create any meaningful output on Windows systems, ${CMAKE_INSTALL_DATAROOTDIR}
will be preset by the %ALLUSERSPROFILE%
environment variable.
lfDatabase::SystemLocation defaults to ${CMAKE_INSTALL_DATAROOTDIR}/Lensfun/version_x
, where x denotes the database format version (Database format versions).
This is typically C:/ProgramData/lensfun/version_1
or similar.
lfDatabase::SystemUpdatesLocation defaults to ${CMAKE_INSTALL_DATAROOTDIR}/Lensfun-updates/version_x
, where x denotes the database format version (Database format versions).
This is typically C:/ProgramData/lensfun-updates/version_1
or similar.
The user folders are set at run time based on the current user name and home directory.
lfDatabase::UserLocation is at %USERSPROFILE%/AppData/Local/lensfun/updates/version_x
, where x denotes the database format version (Database format versions).
lfDatabase::UserLocation is at %USERSPROFILE%/AppData/Local/lensfun
.