Windows 64 build with integration of lensfun

Ah! no :thinking:

edit:

The difference between the two branches is that the lensfun-db-path-bundle generates an absolute path to the installdir/share/lensfun.

Loading lensfun database from 'Y:\5.2-182-g6f7ca3f5\./share/lensfun'...OK
That is written in option file.

The dev branch generates only a relative path.

All builds are available on same location.

thanks for testing. the above is indeed the problem, because of you run RT not from the installation directory, then the lensfun db wonā€™t be found.

Iā€™ll merge the fix into Dev tomorrow

:+1: To allow portable windows builds of rt we need a path relative to the rt directory

agriggio,

I think encountered another issue. Itā€™s more related to the lensfun I have on my computer, other than RT. Could you please give me a hand?

In order to obtain the newest database, I compiled lensfun in MSYS2. It turns out that the database is installed in c:\ProgramData\lensfun. After RT is compiled, it looks for the lensfun database at that place and only that place.

After I copied the locally compiled RT to another computer, it couldnā€™t find the database, even if I copied the database to c:\ProgramData\lensfun folder.

Do you know how to make lensfun install the database under mingw64\share\lensfun?

I found you gave a short description about make a local build of lensfun. Do you happen to know how to change the directory of the database of lensfun? It keeps installing the database into \ProgramData\lensfun. I want to let it install the database into the place where the MSYS package installs the database. Thanks!

@noteasy2beme build RT with -DLENSFUNDBDIR=share/lensfun. then copy the Database in RTinstalldir/share/lensfun.(see rawpedia).

@agriggio

shouldnā€™t the relative path .share/lensfun be written in options file and absolute path defined at execution time?

I donā€™t know, you can argue for both alternatives. The solution I implemented was simply the cheapest code-wise (meaning that it had the smallest impact on the code), unless thereā€™s a strong argument to change it, Iā€™d say it stays that way.

In fact, if you want a ā€œhard-codedā€ prefix defined at execution time, I think we can get rid of the options completely and simply fix the path in the executableā€¦

@noteasy2beme Perhaps can you try
-DCMAKE_INSTALL_DATAROOTDIR=/what/you/want

@agriggio for me, it is ok as it is.
Only my opinion: the hard coding (as for LCP or DCP) is perhaps the best way to avoid future problems (mainly on windows). Should it be applicable also on Linux?

Presently, I cannot really say we can generate a portable version of rawtherapee as explained in Rawpedia. In fact, except the cache and option file, the config folder remains external to the RT directory.
Thus when you copy RT on a USB key and go on an other computer you miss the dynamicprofile.cfg, the profiles dir and batch dir. But nobody seems to worry about that, included me.
@partha was able, I donā€™t know how, to generate a truly portable version of RT

Thanks for the kind explanation. I was able to change the install directory for the lens database. But even though I used the -DLENSFUNDBDIR=share/lensfun switch when I ran cmake, lensfun simply insisted looking for the database in the directory where it was originally installed.

I wanted to run RT in verbose mode, but I donā€™t know what exactly to do (could you please explain to me?). What makes the story even funnier is that Iā€™m not to run RT in the console of MinGW. It simply quit, without a single piece of error message. To extract a little more information, I used GDB to run rawtherapee.exe. It turns out that RT exited with code 0xc0000139. Do you happen to know what that code means?

Thanks again and apologize for my ignoranceā€¦

Are you aware of lensfun-update-data? That should just grab the latest database suitable for the installed msys2 package.

Yes, I am. But it needs a Python module which canā€™t be found in the package.

You should open at the options file of RawTherapee (I suppose under %APPDATA%\RawTherapee or something like that), and look at the following:

[Lensfun]
DBDirectory=/path/to/lensfun/db

RT will search for the lensfun database only in /path/to/lensfun/db, unless the config entry is empty, i.e. you see the following:

[Lensfun]
DBDirectory=

In this case, the default DB locations of lensfun will be used.

So, just set the proper DBDirectory to where you have the database (e.g. C:\Program Files\RawTherapee\share\lensfun) and everything should be good.

If not, then you have found a bug :slight_smile:

What RT branch are you building? Is it the last version? In all cases, delete the lensfun paragraph in options file.

In option file, set VERBOSE=true. Execute in mingw console.

I guess that the lensfun DB is not compatible with the lensfun build you use or you didā€™nt copy the good dll.

Thanks for the kind reply. Besides what you suggested, I found itā€™s also necessary to clean the cache in order for lensfun to work.

Thanks for the suggestions and explanation.
I guess my system is some kind of messed up. Iā€™ll reinstall MinGW.

last dev build including lensfun

RawTherapee_dev_5.2-187-ga1f86bff_WinVista_64.zip

uploaded at https://drive.google.com/open?id=0B2q9OrgyDEfPS2FpdDAtMVI1RG8

Thanks. Will try it !

Before, my problem was :

  • I created an automatic minimum profile with auto lens distortion correction, but the value applied was the one of one of the lens when creating the profile.

With lensfun, I hope most of the profile created will automatch to correct distortion, right?

(except with manual lenses, althoughtin the Raw their is the info of the focal lenght I give the cameraā€¦)

Yes if lens profile is in the lensfun data base.

Ver. 5.2-187: in ā€œno-File-Browserā€ mode, it still canā€™t load the lensfun database.