githubdoe / DFTFringe

DFTFringe Telescope Mirror interferometry analysis Program.
GNU General Public License v3.0
168 stars 59 forks source link

Check how DLLs are added in .pro #146

Closed atsju closed 8 months ago

atsju commented 8 months ago

Sounds strange to me that the DLLs needed to run DFTFringe when it has just been build in Qt Creator need to be manually copied. Something must be off in the process.

I had a look at Qt documentation and here is what I get when following the recommended process.

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../build_openCV/install/x64/mingw/lib/ -llibopencv_calib3d460.dll
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../build_openCV/install/x64/mingw/lib/ -llibopencv_calib3d460.dlld
else:unix: LIBS += -L$$PWD/../build_openCV/install/x64/mingw/lib/ -llibopencv_calib3d460.dll

INCLUDEPATH += $$PWD/../build_openCV/install/include
DEPENDPATH += $$PWD/../build_openCV/install/include

I think we must update the .pro to take DLLs cleanly. It might even help for creating the installer. I let this here for tracking and will confirm+solve later.

atsju commented 8 months ago

OK I dis some tests and made it work.

Something like this removes the need to copy the DLLs into build folder to run DFTFringe from within the IDE. Running standalone still required the DLLs locally.

    LIBS += -L"$$PWD/../build_openCV/install/x64/mingw/bin/" -llibopencv_calib3d460
    LIBS += -L"$$PWD/../build_openCV/install/x64/mingw/bin/" -llibopencv_core460
    LIBS += -L"$$PWD/../build_openCV/install/x64/mingw/bin/" -llibopencv_features2d460
    LIBS += -L"$$PWD/../build_openCV/install/x64/mingw/bin/" -llibopencv_highgui460
    LIBS += -L"$$PWD/../build_openCV/install/x64/mingw/bin/" -llibopencv_imgcodecs460
    LIBS += -L"$$PWD/../build_openCV/install/x64/mingw/bin/" -llibopencv_imgproc460

Unfortunately it didn't change the behavior of windeployqt.exe and manual copy of the DLLs to make the installer is still required.