CarVac / filmulator-gui

Filmulator --- Simplified raw editing with the power of film
https://filmulator.org
Other
670 stars 32 forks source link

Building on Debian 10 #87

Closed Floessie closed 5 years ago

Floessie commented 5 years ago

Hi Carlo,

Here's my summary on what is needed to build filmulator out-of-tree on Debian 10:

Install dependencies

$ sudo apt-get install cmake git libexiv2-dev libraw-dev qt5-default libtiff5-dev libjpeg-dev qtdeclarative5-dev libqt5sql5-sqlite qml-module-qtquick2 qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick-controls qml-module-qtqml-models2

Also build and install librtprocess.

Prepare the sources

$ git clone https://github.com/CarVac/filmulator-gui.git
$ cd filmulator-gui/filmulator-gui
$ git checkout highlightrecovery

Patch FindExiv2.cmake:

diff --git a/filmulator-gui/cmake/Modules/FindExiv2.cmake b/filmulator-gui/cmake/Modules/FindExiv2.cmake
index b2f8bd3..fe03345 100644
--- a/filmulator-gui/cmake/Modules/FindExiv2.cmake
+++ b/filmulator-gui/cmake/Modules/FindExiv2.cmake
@@ -48,11 +48,11 @@ endif (EXIV2_LIBRARY)

 # Get the version number from exiv2/version.hpp and store it in the cache:
 if (EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION)
-    if (EXISTS ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h)
+#    if (EXISTS ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h)
         set(EXIV_VERSION_HEADER ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h)
-    else()
+#    else()
         set(EXIV_VERSION_HEADER ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp)
-    endif()
+#    endif()

     file(READ ${EXIV_VERSION_HEADER} EXIV2_VERSION_CONTENT)
$ mkdir build
$ cd build
$ cmake ..
$ make -j [NUMOFCORES]

Run it without installing

$ cd ..
$ ./build/filmulator-gui

This is just FYI. :smile:

Best, Flössie

CarVac commented 5 years ago

So does this patch work everywhere? It wasn't working on my desktop before this patch and now it does.

Floessie commented 5 years ago

@CarVac

So does this patch work everywhere?

My guess is: it depends on the exiv2 version. Obviously the version information can be found in different header files and there is not a single place the CMake script can rely on. @cryptomilk tried to work around that with his update to support 0.27.1 but that breaks the detection of older versions. So no, I won't expect the patch to work everywhere. Andreas is aware of the problems and will surely come up with a proper solution.

Here's a better patch BTW:

diff --git a/filmulator-gui/cmake/Modules/FindExiv2.cmake b/filmulator-gui/cmake/Modules/FindExiv2.cmake
index b2f8bd3..c2d92d1 100644
--- a/filmulator-gui/cmake/Modules/FindExiv2.cmake
+++ b/filmulator-gui/cmake/Modules/FindExiv2.cmake
@@ -48,11 +48,11 @@ endif (EXIV2_LIBRARY)

 # Get the version number from exiv2/version.hpp and store it in the cache:
 if (EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION)
-    if (EXISTS ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h)
-        set(EXIV_VERSION_HEADER ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h)
-    else()
+#    if (EXISTS ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h)
+#        set(EXIV_VERSION_HEADER ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h)
+#    else()
         set(EXIV_VERSION_HEADER ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp)
-    endif()
+#    endif()

     file(READ ${EXIV_VERSION_HEADER} EXIV2_VERSION_CONTENT)

HTH, Flössie

cryptomilk commented 5 years ago

That's wrong, the thing is we need to parse both files and check for the version numbers :-(

In 0.27.1 the version stuff is in exiv2/exv_conf.h In <= 0.27.0 the version stuff is in exiv2/version.hpp

CarVac commented 5 years ago

That didn't end up fixing it.

In 0.25.0 on my system, it tries to read the versions from exv_conf.h.

cryptomilk commented 5 years ago

You can use message(STATUS "..") to print out the variables and find out what is going on ...

CarVac commented 5 years ago

Can both of you test my latest commit?

cryptomilk commented 5 years ago

It needs to be:

if (NOT EXIV2_VERSION_STRING_FOUND AND EXISTS ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h)

CarVac commented 5 years ago

What about line 57? Does that need the ${} removed as well?

cryptomilk commented 5 years ago

line57 should be fine

CarVac commented 5 years ago

I made that change.

Floessie commented 5 years ago

@cryptomilk

That's wrong, the thing is we need to parse both files and check for the version numbers :-(

I guess you mean my workaround patch. That the version info can be found in different headers is true, though.

Floessie commented 5 years ago

@CarVac

Can both of you test my latest commit?

Works fine now on Debian 10 with exiv2 0.25.0. :+1:

CarVac commented 5 years ago

Shall I close this issue?

Floessie commented 5 years ago

@CarVac I can do so as well.