DFTFringe Telescope Mirror interferometry analysis Program. This is the successor to OpenFringe which is a Telescope Mirror interferometry analysis program.
This code is distributed with DLLs from:
- QT
- OpenCV
- QWT
- Armadillo
- Lapack
- BLAS
It also integrates code from:
You can find tutorials at https://youtu.be/wWdG3wrGAbM
Additional information and help is availlable at https://groups.io/g/Interferometry
π Follow the link and use the installer: link to latest release.
sudo apt update
sudo apt install -y apt-utils build-essential wget qt5-qmake qt5-qmake-bin qt5-assistant qtbase5-dev qtmultimedia5-dev libqt5charts5 libqt5charts5-dev libqt5multimedia* libqt5datavisualization5-dev libqt5datavisualization5 libopencv-core-dev libopencv-core4.5d libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libarmadillo10
qmake
make -j4
ποΈ Under construction ποΈ
There are many different solutions combinations for building. Pick the one you prefer/need. You can mix different options at each stage.
Option A | Option B | Option C | |
---|---|---|---|
Stage 1: getting compiler and QT | aqt command line | QT IDE | WSL |
Stage 2: DLL dependencies | full build | lazy method | β |
Stage 3: Building DFTFringe | command line | QT IDE | β |
Stage 4: Copy necessary DLLs | command line | holistic approach | from release |
Stage 5: Making installer | QT installer framework | β | β |
Personnaly I use C:\buildingDFTFringe
to have a short path. All tools and dependencies will be stored here. It's important that inside folder structure is indentical for the project to build but you can change the base path.
The easiest way I have found to install it from command line requires to have Python installed. It then uses aqtinstall.
From within C:\buildingDFTFringe
do the following:
pip install aqtinstall
aqt install-tool windows desktop tools_mingw qt.tools.win64_mingw810
Add minGW to your Path: C:\buildingDFTFringe\Tools\mingw810_64\bin
Add Qmake to your Path: C:\buildingDFTFringe\5.15.2\mingw81_64\bin
Here again, I have found easier to use Python and aqtinstall to get QT.
From within C:\buildingDFTFringe
do the following:
aqt install-qt windows desktop 5.15.2 win64_mingw81 -m qtcharts qtdatavis3d
aqt install-qt windows desktop 5.15.2 win64_mingw81 --archives qtbase qtsvg
This is not a necessary step but if you are building on your own computer you probably want to debug and need Qt creator IDE.
aqt install-tool windows desktop tools_qtcreator
Download the open source version of Qt framework https://www.qt.io/download-open-source
Run the installer and go through it.
When it's time to select which components to install in custom installation you must first tick the archive
checkbox and click on filter
. Without this, you won't be able to install the old Qt 5.15.2 version.
Which components to choose ?
You will need QT 5.15.2
.
For faster installation, you probably do not need Qt design studio
.
In the details of Qt 5.15.2 you only need MinGW 8.1.0 64-bit
, QT Charts
and Qt Data Visualization
.
You probably want to install Qt Creator
. This is Qt's IDE and if you are here it's probably because you need to debug (breakpoints, step by step, variables, ...).
You may want to install Cmake
, Ninja
and Qt Installer Framework
.
Since Windows 10, Windows provides a native Linux subsystem. You don't need a virtual machine or a dual boot and can run any Linux application directly inside Windows. It works also for graphical applications.
More information about installation are available here: https://learn.microsoft.com/en-us/windows/wsl/install
All what you need to do is:
wsl --install
Once a Linux distribution is installed, you only need this to run same one each time:
wsl
For the rest of the build process you can now rely on Linux build process.
What will be described here is the same method used to build the installer GitHub action workflow. It relies heavily on command line but you can transpose everything to your prefered approch. For example using CMake-gui instead of cmake command line. Versions might have changed, rely on the workflow if you want to duplicate with same versions as the repository.
If you haven't already, you will need to install latest version of CMake first.
Get OpenCV source code version 4.6.0 in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named C:\buildingDFTFringe\openCV
Then from within C:\buildingDFTFringe
do the following:
cmake -G "MinGW Makefiles" -S openCV -B build_openCV -D WITH_QT=ON -D WITH_OPENGL=ON -D Qt5_DIR=:./5.15.2/mingw81_64/lib/cmake/Qt5
cmake -G "MinGW Makefiles" -S openCV -B build_openCV
cmake --build ./build_openCV -j4
cmake --install ./build_openCV
You may need to adapt Qt5_DIR
to you actual installation directory. If you installed Qt with the official isntaller the path is C:/Qt/5.15.2/mingw81_64/lib/cmake/Qt5
.
Get Qwt source code version 6.1.6 in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named C:\buildingDFTFringe\qwt-6.1.6
.
Then from within C:\buildingDFTFringe\qwt-6.1.6
do the following:
qmake.exe
mingw32-make -j4
Get Lapack source code version 3.11.0 in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named C:\buildingDFTFringe\lapack
. Lapack comes with Blas.
Then from within C:\buildingDFTFringe
do the following:
cmake -G "MinGW Makefiles" -S lapack -B build_lapack -D BUILD_SHARED_LIBS=ON -D CMAKE_SHARED_LINKER_FLAGS="-Wl,--allow-multiple-definition"
cmake --build ./build_lapack -j4
Get Armadillo source code version 12.6.7 in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named C:\buildingDFTFringe\armadillo-12.6.7
.
Then from within C:\buildingDFTFringe
do the following:
cmake -D CMAKE_PREFIX_PATH=C:/buildingDFTFringe/build_lapack -G "MinGW Makefiles" -S armadillo-12.6.7 -B build_armadillo
cmake --build ./build_armadillo -j4
It's important that Armadillo knows the path to Lapack to work correctly. Here we use CMAKE_PREFIX_PATH but you can also add it to your Path or use other methods.
Get OpenCV installer (not source code) 4.6.0 in your prefered way (typically from their GitHub or website). Run the installer opencv-4.6.0-vc14_vc15.exe
.
Copy content from yourExtractionLocation\opencv\build\include
to C:\buildingDFTFringe\build_openCV\install\include
.
Get Qwt source code version 6.1.6 in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named C:\buildingDFTFringe\qwt-6.1.6
.
No additional modification required here.
Get Armadillo source code version 12.6.7 in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named C:\buildingDFTFringe\armadillo-12.6.7
.
Then follow the information in DFTFringe.pro
to create appropriate folders for header files and DLLs.
Copy content from armadillo-12.6.7\include
to build_armadillo\tmp\include
.
Previous steps have permitted to get necessary header files to build the code. DLLs are still requires.
Install DFTFringe from official installer and copy the DLLs from install folder to the folder expected by DFTFringe.pro
:
qwt-6.1.6\lib\qwt.dll
build_lapack\bin\libblas.dll
build_lapack\bin\liblapack.dll
build_openCV\install\x64\mingw\bin\libopencv_calib3d460.dll
build_openCV\install\x64\mingw\bin\libopencv_core460.dll
build_openCV\install\x64\mingw\bin\libopencv_features2d460.dll
build_openCV\install\x64\mingw\bin\libopencv_highgui460.dll
build_openCV\install\x64\mingw\bin\libopencv_imgcodecs460.dll
build_openCV\install\x64\mingw\bin\libopencv_imgproc460.dll
Get DFTFringe source code in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named C:\buildingDFTFringe\DFTFringe
.
From within C:\buildingDFTFringe\DFTFringe
do the following:
qmake.exe
mingw32-make -j4
Open Qt Creator
Open the project file DFTFringe.pro
Build
This step is only necessary if you want to run DFTFringe.exe standalone. Execution and debugging from within Qt Creator IDE does not require any additional step.
From within C:\buildingDFTFringe
do the following:
Note Copy-Item
is for powershell.
windeployqt.exe DFTFringe\Release\DFTFringe.exe
Copy-Item ".\build_lapack\bin\liblapack.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\build_lapack\bin\libblas.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_calib3d460.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_core460.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_features2d460.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_flann460.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_highgui460.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgcodecs460.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgproc460.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\qwt-6.1.6\lib\qwt.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\5.15.2\mingw81_64\bin\Qt5OpenGL.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\tools\mingw810_64\bin\libquadmath-0.dll" -Destination ".\DFTFringe\Release"
Copy-Item ".\DFTFringe\ColorMaps" -Destination ".\DFTFringe\Release\ColorMaps" -Recurse
mkdir ".\DFTFringe\Release\res"
Copy-Item ".\DFTFringe\res\help" -Destination ".\DFTFringe\Release\res\help" -Recurse
Copy-Item ".\DFTFringe\RevisionHistory.html" -Destination ".\DFTFringe\Release"
Run your newly built DFTFringe.exe.
Identify missing DLLs by reading error message.
Copy the missing DLLs from wherever they are to the build folder. Take care to use correct version of each DLL.
Continue to do so until it works.
Use the official installer to install DFTFringe.
From the install folder, copy these file to your build folder:
- All
.dll
files ColorMaps
folderimageformats
folderplatform
folderres
folder
First you need to get Qt Installer Framework. The easiest way I have found to install it from command line requires to have Python installed. It then uses aqtinstall. You can also install it with official Qt installer.
From within C:\buildingDFTFringe
do the following:
pip install aqtinstall
aqt install-tool windows desktop tools_ifw
ποΈ Under construction ποΈ
- Need to copy all DLLs (see github action build-windows.yml)
- Create the installer
- To test on a developper computer, remember to remove path to DLLs (compiler, ...)
ποΈ Under construction ποΈ
ποΈ Under construction ποΈ