make sure the lensfun db is found correctly when building RT in "bundle" mode
This commit is contained in:
@@ -59,6 +59,7 @@ Glib::ustring argv0;
|
|||||||
Glib::ustring creditsPath;
|
Glib::ustring creditsPath;
|
||||||
Glib::ustring licensePath;
|
Glib::ustring licensePath;
|
||||||
Glib::ustring argv1;
|
Glib::ustring argv1;
|
||||||
|
Glib::ustring lensfunDbPath;
|
||||||
//bool simpleEditor;
|
//bool simpleEditor;
|
||||||
//Glib::Threads::Thread* mainThread;
|
//Glib::Threads::Thread* mainThread;
|
||||||
|
|
||||||
@@ -145,10 +146,17 @@ int main (int argc, char **argv)
|
|||||||
licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH);
|
licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Glib::path_is_absolute(LENSFUN_DB_PATH)) {
|
||||||
|
lensfunDbPath = LENSFUN_DB_PATH;
|
||||||
|
} else {
|
||||||
|
lensfunDbPath = Glib::build_filename(exePath, 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;
|
||||||
|
lensfunDbPath = LENSFUN_DB_PATH;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool quickstart = dontLoadCache (argc, argv);
|
bool quickstart = dontLoadCache (argc, argv);
|
||||||
|
@@ -60,6 +60,7 @@ extern Options options;
|
|||||||
Glib::ustring argv0;
|
Glib::ustring argv0;
|
||||||
Glib::ustring creditsPath;
|
Glib::ustring creditsPath;
|
||||||
Glib::ustring licensePath;
|
Glib::ustring licensePath;
|
||||||
|
Glib::ustring lensfunDbPath;
|
||||||
Glib::ustring argv1;
|
Glib::ustring argv1;
|
||||||
Glib::ustring argv2;
|
Glib::ustring argv2;
|
||||||
bool simpleEditor = false;
|
bool simpleEditor = false;
|
||||||
@@ -529,10 +530,17 @@ int main (int argc, char **argv)
|
|||||||
licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH);
|
licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Glib::path_is_absolute (LENSFUN_DB_PATH)) {
|
||||||
|
lensfunDbPath = LENSFUN_DB_PATH;
|
||||||
|
} else {
|
||||||
|
lensfunDbPath = Glib::build_filename (exePath, 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;
|
||||||
|
lensfunDbPath = LENSFUN_DB_PATH;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
#include "addsetids.h"
|
#include "addsetids.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
@@ -50,6 +49,8 @@ Options options;
|
|||||||
Glib::ustring versionString = RTVERSION;
|
Glib::ustring versionString = RTVERSION;
|
||||||
Glib::ustring paramFileExtension = ".pp3";
|
Glib::ustring paramFileExtension = ".pp3";
|
||||||
|
|
||||||
|
extern Glib::ustring lensfunDbPath; // defined in main
|
||||||
|
|
||||||
Options::Options ()
|
Options::Options ()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -729,7 +730,7 @@ void Options::setDefaults ()
|
|||||||
gimpPluginShowInfoDialog = true;
|
gimpPluginShowInfoDialog = true;
|
||||||
maxRecentFolders = 15;
|
maxRecentFolders = 15;
|
||||||
|
|
||||||
rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
rtSettings.lensfunDbDirectory = lensfunDbPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
Options* Options::copyFrom (Options* other)
|
Options* Options::copyFrom (Options* other)
|
||||||
|
Reference in New Issue
Block a user