diff --git a/.github/workflows/build-linux-QT5.yml b/.github/workflows/build-linux-QT5.yml new file mode 100644 index 00000000..bb82f26d --- /dev/null +++ b/.github/workflows/build-linux-QT5.yml @@ -0,0 +1,26 @@ +name: build-linux-QT5 +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + workflow_call: + +jobs: + build-linux-QT5: + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - run: sudo apt update + - run: 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-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev + - run: qmake DFTFringe_QT5.pro + #- uses: ammaraskar/gcc-problem-matcher@master + #- run: echo "::add-matcher::.github/matcher/uic_matcher.json" + - run: make -j4 + #- run: echo "::remove-matcher owner=uic-problem-matcher::" + diff --git a/.github/workflows/build-linux-clazy.yml b/.github/workflows/build-linux-clazy.yml index a0222614..7aed6c8e 100644 --- a/.github/workflows/build-linux-clazy.yml +++ b/.github/workflows/build-linux-clazy.yml @@ -7,6 +7,9 @@ on: workflow_dispatch: workflow_call: +env: + QWT_version: 6.3.0 + jobs: build-linux-clazy: # This build is only done on one Linux version as it is here only to get the warnings from clazy. @@ -14,9 +17,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: sudo apt update - - run: sudo apt install -y clazy 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-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev - - run: qmake -spec linux-clang QMAKE_CXX="clazy" + - run: sudo apt update + - run: sudo apt install -y clazy apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libqt6core5compat6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev + - run: wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber + - run: 7z x qwt-${{env.QWT_version}}.zip + - run: cd qwt-${{env.QWT_version}} ; /usr/lib/qt6/bin/qmake + - run: cd qwt-${{env.QWT_version}} ; make -j4 + - run: cd qwt-${{env.QWT_version}} ; sudo make install + - run: /usr/lib/qt6/bin/qmake -spec linux-clang QMAKE_CXX="clazy" - uses: ammaraskar/gcc-problem-matcher@master # ignore noisy dirs from QT files itself # all level 1 checks but ignore clazy-no-connect-by-name diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 6539a3a3..e5ef47a9 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -7,6 +7,9 @@ on: workflow_dispatch: workflow_call: +env: + QWT_version: 6.3.0 + jobs: build-linux: strategy: @@ -16,11 +19,15 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: sudo apt update - - run: 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-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev - - run: qmake + - run: sudo apt update + - run: sudo apt install -y apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libqt6core5compat6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev + - run: wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber + - run: 7z x qwt-${{env.QWT_version}}.zip + - run: cd qwt-${{env.QWT_version}} ; /usr/lib/qt6/bin/qmake + - run: cd qwt-${{env.QWT_version}} ; make -j4 + - run: cd qwt-${{env.QWT_version}} ; sudo make install + - run: /usr/lib/qt6/bin/qmake - uses: ammaraskar/gcc-problem-matcher@master - run: echo "::add-matcher::.github/matcher/uic_matcher.json" - run: make -j4 - run: echo "::remove-matcher owner=uic-problem-matcher::" - diff --git a/.github/workflows/build-windows-QT5.yml b/.github/workflows/build-windows-QT5.yml new file mode 100644 index 00000000..e5f5a5bf --- /dev/null +++ b/.github/workflows/build-windows-QT5.yml @@ -0,0 +1,378 @@ +name: build-windows-QT5 +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + workflow_call: + +env: + armadillo_version: 14.4.0 + QWT_version: 6.1.6 + openCV_version: 4.6.0 + QT_version: 5.15.2 + lapack_version: 3.11.0 + mingw_version: 810 + python_version: 3.13 + +jobs: + cache-mingw-from-QT: + runs-on: windows-latest + steps: + # this will restore/cache everything in /Tools depending on cache hit/miss + - name: Cache minGW + id: cache-minGW + uses: actions/cache@v4 + with: + path: Tools + key: ${{ runner.os }}-mingw${{env.mingw_version}}_64 + + # all what follows is only run on cache miss + - name: install newer python + if: steps.cache-minGW.outputs.cache-hit != 'true' + uses: actions/setup-python@v5 + with: + python-version: ${{env.python_version}} + - name: install aqtinstall tool + if: steps.cache-minGW.outputs.cache-hit != 'true' + run: pip install aqtinstall + - name: install correct minGW version + if: steps.cache-minGW.outputs.cache-hit != 'true' + run: aqt install-tool windows desktop tools_mingw qt.tools.win64_mingw${{env.mingw_version}} + # path is Tools\mingw${{env.mingw_version}}_64\bin\ + - name: install QT installer framework + if: steps.cache-minGW.outputs.cache-hit != 'true' + run: aqt install-tool windows desktop tools_ifw + # path is Tools\QtInstallerFramework\4.7\bin\ + + build-openCV-with-QT: + runs-on: windows-latest + needs: cache-mingw-from-QT + steps: + # this will restore/cache everything depending on cache hit/miss + - name: Cache QT and openCV + uses: actions/cache/@v4 + id: cache-openCV-QT + with: + path: | + build_openCV\install\x64\mingw\bin\*.dll + build_openCV\install\include\* + ${{env.QT_version}}\mingw81_64\bin\* + ${{env.QT_version}}\mingw81_64\include\* + ${{env.QT_version}}\mingw81_64\lib\* + ${{env.QT_version}}\mingw81_64\mkspecs\* + ${{env.QT_version}}\mingw81_64\plugins\platforms\* + ${{env.QT_version}}\mingw81_64\plugins\imageformats\* + key: ${{ runner.os }}-openCV-${{env.openCV_version}}-QT-${{env.QT_version}} + + # all what follows is only run on cache miss + + # restore cached minGW + - uses: actions/cache/restore@v4 + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + id: cache-minGW + with: + path: Tools + key: ${{ runner.os }}-mingw${{env.mingw_version}}_64 + fail-on-cache-miss: true + - name: install newer python + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + uses: actions/setup-python@v5 + with: + python-version: ${{env.python_version}} + - name: add minGW to path + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + shell: bash + run: echo "${{github.workspace}}\Tools\mingw${{env.mingw_version}}_64\bin" >> $GITHUB_PATH + - name: install aqtinstall tool + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + run: pip install aqtinstall + - name: install QT + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + run: aqt install-qt windows desktop ${{env.QT_version}} win64_mingw81 -m qtcharts qtdatavis3d + - uses: actions/checkout@v4 + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + with: + repository: 'opencv/opencv' + ref: '${{env.openCV_version}}' + path: './openCV' + - name: cmake generate + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + run: cmake -G "MinGW Makefiles" -S openCV -B build_openCV -D WITH_QT=ON -D WITH_OPENGL=ON -D Qt5_DIR=:./${{env.QT_version}}/mingw81_64/lib/cmake/Qt5 + - name: cmake generate again + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + run: cmake -G "MinGW Makefiles" -S openCV -B build_openCV + - name: cmake build + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + run: cmake --build ./build_openCV -j4 + - name: cmake install + if: steps.cache-openCV-QT.outputs.cache-hit != 'true' + run: cmake --install ./build_openCV + + build-QWT: + runs-on: windows-latest + needs: cache-mingw-from-QT + steps: + # this will restore/cache everything depending on cache hit/miss + - name: cache QWT + uses: actions/cache/@v4 + id: cache-QWT + with: + path: | + qwt-${{env.QWT_version}}\src + qwt-${{env.QWT_version}}\lib\*.dll + key: ${{ runner.os }}-QWT-${{env.QWT_version}} + + # all what follows is only run on cache miss + + # restore cached minGW + - uses: actions/cache/restore@v4 + if: steps.cache-QWT.outputs.cache-hit != 'true' + id: cache-minGW + with: + path: Tools + key: ${{ runner.os }}-mingw${{env.mingw_version}}_64 + fail-on-cache-miss: true + - name: add minGW to path + if: steps.cache-QWT.outputs.cache-hit != 'true' + shell: bash + run: echo "${{github.workspace}}\Tools\mingw${{env.mingw_version}}_64\bin" >> $GITHUB_PATH + - name: install wget + if: steps.cache-QWT.outputs.cache-hit != 'true' + run: choco install -y wget + - name: download QWT + if: steps.cache-QWT.outputs.cache-hit != 'true' + # I specified the mirror because one of the random mirrors did not work during my tests + run: wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber + - name: extract archive + if: steps.cache-QWT.outputs.cache-hit != 'true' + run: 7z x qwt-${{env.QWT_version}}.zip + - name: install newer python + if: steps.cache-QWT.outputs.cache-hit != 'true' + uses: actions/setup-python@v5 + with: + python-version: ${{env.python_version}} + - name: install aqtinstall tool + if: steps.cache-QWT.outputs.cache-hit != 'true' + run: pip install aqtinstall + - name: install qmake + if: steps.cache-QWT.outputs.cache-hit != 'true' + run: aqt install-qt windows desktop ${{env.QT_version}} win64_mingw81 --archives qtbase qtsvg + - name: qmake + if: steps.cache-QWT.outputs.cache-hit != 'true' + run: cd qwt-${{env.QWT_version}} ; ..\${{env.QT_version}}\mingw81_64\bin\qmake.exe + - name: build + if: steps.cache-QWT.outputs.cache-hit != 'true' + run: cd qwt-${{env.QWT_version}} ; mingw32-make -j4 + + build-lapack-armadillo: + runs-on: windows-latest + needs: cache-mingw-from-QT + steps: + # this will restore/cache everything depending on cache hit/miss + - name: Cache lapack build + id: cache-lapack + uses: actions/cache@v4 + with: + path: | + build_lapack\bin\liblapack.dll + build_lapack\bin\libblas.dll + build_armadillo\tmp\include + key: ${{ runner.os }}-lapack-${{env.lapack_version}}-armadillo-${{env.armadillo_version}} + + # all what follows is only run on cache miss + + # restore cached minGW + - uses: actions/cache/restore@v4 + if: steps.cache-lapack.outputs.cache-hit != 'true' + id: cache-minGW + with: + path: Tools + key: ${{ runner.os }}-mingw${{env.mingw_version}}_64 + fail-on-cache-miss: true + - name: add minGW to path + if: steps.cache-lapack.outputs.cache-hit != 'true' + shell: bash + run: echo "${{github.workspace}}\Tools\mingw${{env.mingw_version}}_64\bin" >> $GITHUB_PATH + - uses: actions/checkout@v4 + if: steps.cache-lapack.outputs.cache-hit != 'true' + with: + repository: 'Reference-LAPACK/lapack' + ref: 'v${{env.lapack_version}}' + path: './lapack' + # See https://github.com/Reference-LAPACK/lapack/issues/305 : CMAKE_SHARED_LINKER_FLAGS is fixing a build issue + - name: cmake generate + if: steps.cache-lapack.outputs.cache-hit != 'true' + run: cmake -G "MinGW Makefiles" -S lapack -B build_lapack -D BUILD_SHARED_LIBS=ON -D CMAKE_SHARED_LINKER_FLAGS="-Wl,--allow-multiple-definition" + - name: cmake build + if: steps.cache-lapack.outputs.cache-hit != 'true' + run: cmake --build ./build_lapack -j4 + # now that Lapack is built, do the Armadillo build + - name: install wget + if: steps.cache-lapack.outputs.cache-hit != 'true' + run: choco install -y wget + - name: download armadillo + if: steps.cache-lapack.outputs.cache-hit != 'true' + # I specified the mirror because one of the random mirrors did not work during my tests + run: wget -O armadillo-${{env.armadillo_version}}.tar.xz http://sourceforge.net/projects/arma/files/armadillo-${{env.armadillo_version}}.tar.xz/download?use_mirror=versaweb + # Extract in two step. First step write to stdo and second step read from stdi. + # This avoids intermediate file creation + # It must run in CMD because powershell corrupts pipes + - name: extract archive + if: steps.cache-lapack.outputs.cache-hit != 'true' + run: 7z x -so armadillo-${{env.armadillo_version}}.tar.xz | 7z x -si -ttar + shell: cmd + # Armadillo relies on Lapack, it's important it knowns where it is during genration to be configured correctly + - name: cmake generate + if: steps.cache-lapack.outputs.cache-hit != 'true' + run: cmake -D CMAKE_PREFIX_PATH=${{github.workspace}}/build_lapack -G "MinGW Makefiles" -S armadillo-${{env.armadillo_version}} -B build_armadillo + - name: cmake build + if: steps.cache-lapack.outputs.cache-hit != 'true' + run: cmake --build ./build_armadillo -j4 + + build-DFTFringe: + runs-on: windows-latest + needs: [cache-mingw-from-QT, build-lapack-armadillo, build-QWT, build-openCV-with-QT] + steps: + + # because problem matcher will not work when chechout in a subfolder, + # checkout at root and then copy everything in folder. + # Match will be done in build folder, and file at root will be used to link the match + # Note checkouting twice is not working. + # This copy is done before adding any more file into folders + - uses: actions/checkout@v4 + # with: + # path: 'DFTFringe' + + # copy all files for problem matcher to work + - name: copy files into build folder (problem matcher workaround) + run: | + mkdir ".\DFTFringe" + Copy-Item ".\*" -Destination ".\DFTFringe" -Exclude @("DFTFringe") -Recurse + + + # restore cached minGW + - uses: actions/cache/restore@v4 + id: cache-minGW + with: + path: Tools + key: ${{ runner.os }}-mingw${{env.mingw_version}}_64 + fail-on-cache-miss: true + - name: add minGW to path + shell: bash + run: echo "${{github.workspace}}\Tools\mingw${{env.mingw_version}}_64\bin" >> $GITHUB_PATH + # restore cached lapack and armadillo + - uses: actions/cache/restore@v4 + id: cache-lapack + with: + path: | + build_lapack\bin\liblapack.dll + build_lapack\bin\libblas.dll + build_armadillo\tmp\include + key: ${{ runner.os }}-lapack-${{env.lapack_version}}-armadillo-${{env.armadillo_version}} + fail-on-cache-miss: true + # restore cached QWT + - uses: actions/cache/restore@v4 + id: cache-QWT + with: + path: | + qwt-${{env.QWT_version}}\src + qwt-${{env.QWT_version}}\lib\*.dll + key: ${{ runner.os }}-QWT-${{env.QWT_version}} + fail-on-cache-miss: true + # restore cached openCV and QT + - uses: actions/cache/restore@v4 + id: cache-openCV-QT + with: + path: | + build_openCV\install\x64\mingw\bin\*.dll + build_openCV\install\include\* + ${{env.QT_version}}\mingw81_64\bin\* + ${{env.QT_version}}\mingw81_64\include\* + ${{env.QT_version}}\mingw81_64\lib\* + ${{env.QT_version}}\mingw81_64\mkspecs\* + ${{env.QT_version}}\mingw81_64\plugins\platforms\* + ${{env.QT_version}}\mingw81_64\plugins\imageformats\* + key: ${{ runner.os }}-openCV-${{env.openCV_version}}-QT-${{env.QT_version}} + fail-on-cache-miss: true + + # this enables the problem matcher + #- uses: ammaraskar/gcc-problem-matcher@master + + # Update the 2 strings automatically + # MY_AUTOMATED_VERSION_STRING + # MY_AUTOMATED_DATE_STRING + - name: Put release name into a variable (pull request) + if: ${{ github.event_name == 'pull_request' }} + # suffix will be c18a74e0f4f4db36eddc66a68eb08e91cd6c6a1c_5108ce7c3ac60bec1e0867bb10c4497db67e3606 + # Because build is a merge commit, clearly identifies the PR commit and base commit + run: | + echo "WORKFLOW_VERSION=${{github.event.pull_request.head.sha}}_${{github.event.pull_request.base.sha}}" >> $env:GITHUB_ENV + - name: Put release name into a variable (tag) + if: ${{ startsWith(github.event.ref, 'refs/tags/v') }} + # suffix will be tag like v1.2.3 or v1.0.0-beta+exp.sha.5114f8512 as long as it respects semver + run: | + echo "WORKFLOW_VERSION=${{github.ref_name}}" >> $env:GITHUB_ENV + - name: Put release name into a variable (single commit) + if: ${{ !startsWith(github.event.ref, 'refs/tags/v') && github.event_name != 'pull_request'}} + # suffix will be commit sha 5108ce7c3ac60bec1e0867bb10c4497db67e3606 + run: | + echo "WORKFLOW_VERSION=${{github.sha}}" >> $env:GITHUB_ENV + + - name: Find and Replace MY_AUTOMATED_VERSION_STRING + run: | + echo "${{env.WORKFLOW_VERSION}}" + (Get-Content DFTFringe/DFTFringeInstaller/config/config.xml).replace('MY_AUTOMATED_VERSION_STRING', '${{env.WORKFLOW_VERSION}}') | Set-Content DFTFringe/DFTFringeInstaller/config/config.xml + (Get-Content DFTFringe/DFTFringeInstaller/packages/com.githubdoe.DFTFringe/meta/package.xml).replace('MY_AUTOMATED_VERSION_STRING', '${{env.WORKFLOW_VERSION}}') | Set-Content DFTFringe/DFTFringeInstaller/packages/com.githubdoe.DFTFringe/meta/package.xml + (Get-Content DFTFringe/DFTFringe.pro).replace('MY_AUTOMATED_VERSION_STRING', '${{env.WORKFLOW_VERSION}}') | Set-Content DFTFringe/DFTFringe.pro + - name: Put current date into a variable + run: | + $NOW=& Get-Date -format yyyy-MM-dd + echo "NOW=$NOW" >> $env:GITHUB_ENV + - name: Find and Replace MY_AUTOMATED_DATE_STRING + run: | + echo "${{env.NOW}}" + (Get-Content DFTFringe/DFTFringeInstaller/packages/com.githubdoe.DFTFringe/meta/package.xml).replace('MY_AUTOMATED_DATE_STRING', '${{env.NOW}}') | Set-Content DFTFringe/DFTFringeInstaller/packages/com.githubdoe.DFTFringe/meta/package.xml + + - run: cd DFTFringe ; ..\${{env.QT_version}}\mingw81_64\bin\qmake.exe DFTFringe_QT5.pro + #- run: echo "::add-matcher::.github/matcher/uic_matcher.json" + - run: cd DFTFringe ; mingw32-make -j4 + #- run: echo "::remove-matcher owner=uic-problem-matcher::" + + - name: copy needed dlls not found by windeployqt + run: | + Copy-Item ".\DFTFringe\Release\DFTFringe.exe.debug" -Destination ".\" + mkdir ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\DFTFringe\Release\DFTFringe.exe" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_lapack\bin\liblapack.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_lapack\bin\libblas.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_calib3d460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_core460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_features2d460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_flann460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_highgui460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgcodecs460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgproc460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\qwt-${{env.QWT_version}}\lib\qwt.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\${{env.QT_version}}\mingw81_64\bin\Qt5OpenGL.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\tools\mingw${{env.mingw_version}}_64\bin\libquadmath-0.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\DFTFringe\ColorMaps" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\ColorMaps" -Recurse + mkdir ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\res" + Copy-Item ".\DFTFringe\res\surface_LeY_icon.ico" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\res" + Copy-Item ".\DFTFringe\res\help" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\res\help" -Recurse + Copy-Item ".\DFTFringe\RevisionHistory.html" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + - name: automatically add QT dependencies with windeployqt + run: .\${{env.QT_version}}\mingw81_64\bin\windeployqt.exe DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\DFTFringe.exe + + - name: make installer using QT installer framework + run: Tools\QtInstallerFramework\4.7\bin\binarycreator.exe -c DFTFringe\DFTFringeInstaller\config\config.xml -p DFTFringe\DFTFringeInstaller\packages DFTFringeInstaller_QT5_${{env.WORKFLOW_VERSION}} + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: DFTFringe-windows-build-artifact-QT5 + path: | + DFTFringeInstaller_QT5_${{env.WORKFLOW_VERSION}}.exe + DFTFringe.exe.debug + diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 81b4efa3..0724ccba 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -9,11 +9,11 @@ on: env: armadillo_version: 14.4.0 - QWT_version: 6.1.6 - openCV_version: 4.6.0 - QT_version: 5.15.2 + QWT_version: 6.3.0 + openCV_version: 4.12.0 + QT_version: 6.8.3 lapack_version: 3.11.0 - mingw_version: 810 + mingw_version: 1310 python_version: 3.13 jobs: @@ -39,7 +39,7 @@ jobs: run: pip install aqtinstall - name: install correct minGW version if: steps.cache-minGW.outputs.cache-hit != 'true' - run: aqt install-tool windows desktop tools_mingw qt.tools.win64_mingw${{env.mingw_version}} + run: aqt install-tool windows desktop tools_mingw1310 qt.tools.win64_mingw${{env.mingw_version}} # path is Tools\mingw${{env.mingw_version}}_64\bin\ - name: install QT installer framework if: steps.cache-minGW.outputs.cache-hit != 'true' @@ -58,12 +58,14 @@ jobs: path: | build_openCV\install\x64\mingw\bin\*.dll build_openCV\install\include\* - ${{env.QT_version}}\mingw81_64\bin\* - ${{env.QT_version}}\mingw81_64\include\* - ${{env.QT_version}}\mingw81_64\lib\* - ${{env.QT_version}}\mingw81_64\mkspecs\* - ${{env.QT_version}}\mingw81_64\plugins\platforms\* - ${{env.QT_version}}\mingw81_64\plugins\imageformats\* + ${{env.QT_version}}\mingw_64\bin\* + ${{env.QT_version}}\mingw_64\include\* + ${{env.QT_version}}\mingw_64\lib\* + ${{env.QT_version}}\mingw_64\mkspecs\* + ${{env.QT_version}}\mingw_64\modules\* + ${{env.QT_version}}\mingw_64\plugins\platforms\* + ${{env.QT_version}}\mingw_64\plugins\imageformats\* + ${{env.QT_version}}\mingw_64\translations\* key: ${{ runner.os }}-openCV-${{env.openCV_version}}-QT-${{env.QT_version}} # all what follows is only run on cache miss @@ -90,7 +92,7 @@ jobs: run: pip install aqtinstall - name: install QT if: steps.cache-openCV-QT.outputs.cache-hit != 'true' - run: aqt install-qt windows desktop ${{env.QT_version}} win64_mingw81 -m qtcharts qtdatavis3d + run: aqt install-qt windows desktop ${{env.QT_version}} win64_mingw -m qtcharts qtdatavis3d qt5compat - uses: actions/checkout@v4 if: steps.cache-openCV-QT.outputs.cache-hit != 'true' with: @@ -99,7 +101,7 @@ jobs: path: './openCV' - name: cmake generate if: steps.cache-openCV-QT.outputs.cache-hit != 'true' - run: cmake -G "MinGW Makefiles" -S openCV -B build_openCV -D WITH_QT=ON -D WITH_OPENGL=ON -D Qt5_DIR=:./${{env.QT_version}}/mingw81_64/lib/cmake/Qt5 + run: cmake -G "MinGW Makefiles" -S openCV -B build_openCV -D WITH_QT=ON -D WITH_OPENGL=ON -D Qt6_DIR=:./${{env.QT_version}}/mingw_64/lib/cmake/Qt6 - name: cmake generate again if: steps.cache-openCV-QT.outputs.cache-hit != 'true' run: cmake -G "MinGW Makefiles" -S openCV -B build_openCV @@ -122,7 +124,7 @@ jobs: path: | qwt-${{env.QWT_version}}\src qwt-${{env.QWT_version}}\lib\*.dll - key: ${{ runner.os }}-QWT-${{env.QWT_version}} + key: ${{ runner.os }}-QWT-${{env.QWT_version}}-mingw${{env.mingw_version}} # all what follows is only run on cache miss @@ -158,10 +160,10 @@ jobs: run: pip install aqtinstall - name: install qmake if: steps.cache-QWT.outputs.cache-hit != 'true' - run: aqt install-qt windows desktop ${{env.QT_version}} win64_mingw81 --archives qtbase qtsvg + run: aqt install-qt windows desktop ${{env.QT_version}} win64_mingw --archives qtbase qtsvg - name: qmake if: steps.cache-QWT.outputs.cache-hit != 'true' - run: cd qwt-${{env.QWT_version}} ; ..\${{env.QT_version}}\mingw81_64\bin\qmake.exe + run: cd qwt-${{env.QWT_version}} ; ..\${{env.QT_version}}\mingw_64\bin\qmake.exe - name: build if: steps.cache-QWT.outputs.cache-hit != 'true' run: cd qwt-${{env.QWT_version}} ; mingw32-make -j4 @@ -179,7 +181,7 @@ jobs: build_lapack\bin\liblapack.dll build_lapack\bin\libblas.dll build_armadillo\tmp\include - key: ${{ runner.os }}-lapack-${{env.lapack_version}}-armadillo-${{env.armadillo_version}} + key: ${{ runner.os }}-lapack-${{env.lapack_version}}-armadillo-${{env.armadillo_version}}-mingw${{env.mingw_version}} # all what follows is only run on cache miss @@ -270,7 +272,7 @@ jobs: build_lapack\bin\liblapack.dll build_lapack\bin\libblas.dll build_armadillo\tmp\include - key: ${{ runner.os }}-lapack-${{env.lapack_version}}-armadillo-${{env.armadillo_version}} + key: ${{ runner.os }}-lapack-${{env.lapack_version}}-armadillo-${{env.armadillo_version}}-mingw${{env.mingw_version}} fail-on-cache-miss: true # restore cached QWT - uses: actions/cache/restore@v4 @@ -279,7 +281,7 @@ jobs: path: | qwt-${{env.QWT_version}}\src qwt-${{env.QWT_version}}\lib\*.dll - key: ${{ runner.os }}-QWT-${{env.QWT_version}} + key: ${{ runner.os }}-QWT-${{env.QWT_version}}-mingw${{env.mingw_version}} fail-on-cache-miss: true # restore cached openCV and QT - uses: actions/cache/restore@v4 @@ -288,12 +290,14 @@ jobs: path: | build_openCV\install\x64\mingw\bin\*.dll build_openCV\install\include\* - ${{env.QT_version}}\mingw81_64\bin\* - ${{env.QT_version}}\mingw81_64\include\* - ${{env.QT_version}}\mingw81_64\lib\* - ${{env.QT_version}}\mingw81_64\mkspecs\* - ${{env.QT_version}}\mingw81_64\plugins\platforms\* - ${{env.QT_version}}\mingw81_64\plugins\imageformats\* + ${{env.QT_version}}\mingw_64\bin\* + ${{env.QT_version}}\mingw_64\include\* + ${{env.QT_version}}\mingw_64\lib\* + ${{env.QT_version}}\mingw_64\mkspecs\* + ${{env.QT_version}}\mingw_64\modules\* + ${{env.QT_version}}\mingw_64\plugins\platforms\* + ${{env.QT_version}}\mingw_64\plugins\imageformats\* + ${{env.QT_version}}\mingw_64\translations\* key: ${{ runner.os }}-openCV-${{env.openCV_version}}-QT-${{env.QT_version}} fail-on-cache-miss: true @@ -335,7 +339,7 @@ jobs: echo "${{env.NOW}}" (Get-Content DFTFringe/DFTFringeInstaller/packages/com.githubdoe.DFTFringe/meta/package.xml).replace('MY_AUTOMATED_DATE_STRING', '${{env.NOW}}') | Set-Content DFTFringe/DFTFringeInstaller/packages/com.githubdoe.DFTFringe/meta/package.xml - - run: cd DFTFringe ; ..\${{env.QT_version}}\mingw81_64\bin\qmake.exe + - run: cd DFTFringe ; ..\${{env.QT_version}}\mingw_64\bin\qmake.exe - run: echo "::add-matcher::.github/matcher/uic_matcher.json" - run: cd DFTFringe ; mingw32-make -j4 - run: echo "::remove-matcher owner=uic-problem-matcher::" @@ -347,15 +351,15 @@ jobs: Copy-Item ".\DFTFringe\Release\DFTFringe.exe" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" Copy-Item ".\build_lapack\bin\liblapack.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" Copy-Item ".\build_lapack\bin\libblas.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_calib3d460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_core460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_features2d460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_flann460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_highgui460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgcodecs460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgproc460.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_calib3d4120.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_core4120.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_features2d4120.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_flann4120.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_highgui4120.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgcodecs4120.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgproc4120.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" Copy-Item ".\qwt-${{env.QWT_version}}\lib\qwt.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - Copy-Item ".\${{env.QT_version}}\mingw81_64\bin\Qt5OpenGL.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" + Copy-Item ".\${{env.QT_version}}\mingw_64\bin\Qt6OpenGL.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" Copy-Item ".\tools\mingw${{env.mingw_version}}_64\bin\libquadmath-0.dll" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" Copy-Item ".\DFTFringe\ColorMaps" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\ColorMaps" -Recurse mkdir ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\res" @@ -363,7 +367,7 @@ jobs: Copy-Item ".\DFTFringe\res\help" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\res\help" -Recurse Copy-Item ".\DFTFringe\RevisionHistory.html" -Destination ".\DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data" - name: automatically add QT dependencies with windeployqt - run: .\${{env.QT_version}}\mingw81_64\bin\windeployqt.exe DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\DFTFringe.exe + run: .\${{env.QT_version}}\mingw_64\bin\windeployqt.exe DFTFringe\DFTFringeInstaller\packages\com.githubdoe.DFTFringe\data\DFTFringe.exe - name: make installer using QT installer framework run: Tools\QtInstallerFramework\4.7\bin\binarycreator.exe -c DFTFringe\DFTFringeInstaller\config\config.xml -p DFTFringe\DFTFringeInstaller\packages DFTFringeInstaller_${{env.WORKFLOW_VERSION}} diff --git a/DFTFringe.pro b/DFTFringe.pro index 0271d3fc..d3b3dc7c 100644 --- a/DFTFringe.pro +++ b/DFTFringe.pro @@ -14,11 +14,11 @@ DEFINES += QAPPLICATION_CLASS=QApplication TEMPLATE = app -QT += charts concurrent core datavisualization gui multimedia multimediawidgets network opengl widgets xml +QT += charts concurrent core core5compat datavisualization gui network opengl widgets xml qtHaveModule(printsupport): QT += printsupport -QMAKE_CXXFLAGS += -std=c++14 +QMAKE_CXXFLAGS += -std=c++17 # disable qDebug() in release CONFIG( release, debug|release ) { @@ -33,9 +33,9 @@ win32 { message("Using WINDOWS project configuration.") CONFIG( debug, debug|release ) { - LIBS += -L..\qwt-6.1.6\lib -lqwtd # debug + LIBS += -L..\qwt-6.3.0\lib -lqwtd # debug } else { - LIBS += -L..\qwt-6.1.6\lib -lqwt # release + LIBS += -L..\qwt-6.3.0\lib -lqwt # release CONFIG+=force_debug_info # keep debug infos (even in release build) to be able to link stacktrace address to actual function CONFIG+=separate_debug_info # separate debug infos into a .exe.debug to not grow the .exe } @@ -43,18 +43,18 @@ win32 { # NOTE: RC_FILE is Windows only, breaks Mac (and Linux?) builds if it in their scope. RC_FILE = DFTFringe.rc - INCLUDEPATH += ..\qwt-6.1.6\src + INCLUDEPATH += ..\qwt-6.3.0\src INCLUDEPATH += ..\build_armadillo\tmp\include INCLUDEPATH += ..\build_openCV\install\include LIBS += -L..\build_lapack\bin -llibblas LIBS += -L..\build_lapack\bin -lliblapack - LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_calib3d460 - LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_core460 - LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_features2d460 - LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_highgui460 - LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_imgcodecs460 - LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_imgproc460 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_calib3d4120 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_core4120 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_features2d4120 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_highgui4120 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_imgcodecs4120 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_imgproc4120 LIBS += -ldbghelp # for SetUnhandledExceptionFilter @@ -68,7 +68,9 @@ unix: !mac { contains( CONFIG,debug ) { message("no extra debug libraries") } INCLUDEPATH += /usr/include/opencv4 - INCLUDEPATH += /usr/include/qwt + INCLUDEPATH += /usr/local/qwt-6.3.0/include + + QMAKE_RPATHDIR += /usr/local/qwt-6.3.0/lib LIBS += -larmadillo LIBS += -lGLU @@ -78,8 +80,7 @@ unix: !mac { LIBS += -lopencv_highgui LIBS += -lopencv_imgcodecs LIBS += -lopencv_imgproc - LIBS += -lopencv_imgproc - LIBS += -lqwt-qt5 + LIBS += -L/usr/local/qwt-6.3.0/lib -lqwt } # MAC ############## diff --git a/DFTFringe_QT5.pro b/DFTFringe_QT5.pro new file mode 100644 index 00000000..0271d3fc --- /dev/null +++ b/DFTFringe_QT5.pro @@ -0,0 +1,571 @@ +# ____ _____ _____ _____ _ +# | \| __|_ _| __|___|_|___ ___ ___ +# | | | __| | | | __| _| | | . | -_| +# |____/|__| |_| |__| |_| |_|_|_|_ |___| +# |___| + + +TARGET = DFTFringe + +VERSION = MY_AUTOMATED_VERSION_STRING + +DEFINES += APP_VERSION=\\\"$$VERSION\\\" +DEFINES += QAPPLICATION_CLASS=QApplication + +TEMPLATE = app + +QT += charts concurrent core datavisualization gui multimedia multimediawidgets network opengl widgets xml + +qtHaveModule(printsupport): QT += printsupport + +QMAKE_CXXFLAGS += -std=c++14 + +# disable qDebug() in release +CONFIG( release, debug|release ) { + message("Release build") + DEFINES += QT_NO_DEBUG_OUTPUT +} + +# Below are the three platform specific project configurations for WINDOWS, LINUX and MAC + +# WINDOWS ########## +win32 { + message("Using WINDOWS project configuration.") + + CONFIG( debug, debug|release ) { + LIBS += -L..\qwt-6.1.6\lib -lqwtd # debug + } else { + LIBS += -L..\qwt-6.1.6\lib -lqwt # release + CONFIG+=force_debug_info # keep debug infos (even in release build) to be able to link stacktrace address to actual function + CONFIG+=separate_debug_info # separate debug infos into a .exe.debug to not grow the .exe + } + + # NOTE: RC_FILE is Windows only, breaks Mac (and Linux?) builds if it in their scope. + RC_FILE = DFTFringe.rc + + INCLUDEPATH += ..\qwt-6.1.6\src + INCLUDEPATH += ..\build_armadillo\tmp\include + INCLUDEPATH += ..\build_openCV\install\include + + LIBS += -L..\build_lapack\bin -llibblas + LIBS += -L..\build_lapack\bin -lliblapack + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_calib3d460 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_core460 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_features2d460 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_highgui460 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_imgcodecs460 + LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_imgproc460 + LIBS += -ldbghelp # for SetUnhandledExceptionFilter + + + # This is for armadillo to not use wrapper. See https://gitlab.com/conradsnicta/armadillo-code#6-linux-and-macos-compiling-and-linking + DEFINES += ARMA_DONT_USE_WRAPPER +} + +# LINUX ############ +unix: !mac { + message("Using LINUX project configuration.") + contains( CONFIG,debug ) { message("no extra debug libraries") } + + INCLUDEPATH += /usr/include/opencv4 + INCLUDEPATH += /usr/include/qwt + + LIBS += -larmadillo + LIBS += -lGLU + LIBS += -lopencv_calib3d + LIBS += -lopencv_core + LIBS += -lopencv_features2d + LIBS += -lopencv_highgui + LIBS += -lopencv_imgcodecs + LIBS += -lopencv_imgproc + LIBS += -lopencv_imgproc + LIBS += -lqwt-qt5 +} + +# MAC ############## +macx { + message("Using MACOS project configuration.") + message( ................................ ) + message("..........PRO FILE: $$_PRO_FILE_") + message("......PRO FILE PWD: $$_PRO_FILE_PWD_") + message( ................... ) + + CONFIG += app_bundle + CONFIG += sdk_no_version_check + CONFIG += link_pkgconfig + CONFIG += silent + + QMAKE_FULL_VERSION=APP_VERSION + QMAKE_MACOSX_DEPLOYMENT_TARGET = 11.0 + QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64 + + CONFIG( debug, debug|release ) { DESTDIR = build/debug } + CONFIG( release, debug|release ) { DESTDIR = build/release } + + MOC_DIR = $$DESTDIR/.moc + OBJECTS_DIR = $$DESTDIR/.obj #these change between build and release. + RCC_DIR = $$DESTDIR/.qrc + UI_DIR = $$DESTDIR/.ui + QMAKE_MKDIR = /usr/local/bin/mkdir # This tells QMAKE which mkdir command to use. + QMAKE_PKG_CONFIG = /opt/homebrew/bin/pkg-config # This tells QMAKE which pkg-config executable to use. + PKG_CONFIG_PATH = $$[QT_INSTALL_LIBS]/pkgconfig + INCLUDEPATH += -I$$[QT_INSTALL_PLUGINS] + LIBS += -L$$[QT_INSTALL_PLUGINS] + PKGCONFIG += armadillo opencv Qt5Qwt6 + + message(........QT_VERSION: $$[QT_VERSION]) + message(.QT_INSTALL_PREFIX: $$[QT_INSTALL_PREFIX]) + message(QT_INSTALL_HEADERS: $$[QT_INSTALL_HEADERS]) + message(...QT_INSTALL_LIBS: $$[QT_INSTALL_LIBS]) + message(QT_INSTALL_PLUGINS: $$[QT_INSTALL_PLUGINS]) + message(...................) + message(...........DESTDIR: $$DESTDIR) + message(...........MOC_DIR: $$MOC_DIR) + message(.......OBJECTS_DIR: $$OBJECTS_DIR) + message(...........RCC_DIR: $$RCC_DIR) + message(............UI_DIR: $$UI_DIR) + message(...................) + message(.......QMAKE_MKDIR: $$QMAKE_MKDIR) + message(..QMAKE_PKG_CONFIG: $$QMAKE_PKG_CONFIG) + message(...PKG_CONFIG_PATH: $$PKG_CONFIG_PATH) + message(.......INCLUDEPATH: $$INCLUDEPATH) + message(..............LIBS: $$LIBS) + message(.........PKGCONFIG: $$PKGCONFIG) + message(............CONFIG: $$CONFIG) +} + +# Below are the includes for source files and other resources, sorted alphabetically. ################################## +# If a filename contains spaces it will need quoting. + + +RESOURCES += DFTResources.qrc + +TRANSLATIONS += dftfringe_fr.ts + +INCLUDEPATH += ./bezier ./SingleApplication + +SOURCES += SingleApplication/singleapplication.cpp \ + SingleApplication/singleapplication_p.cpp \ + annulushelpdlg.cpp \ + arbitrarywavefronthelp.cpp \ + arbitrarywavwidget.cpp \ + astigpolargraph.cpp \ + astigscatterplot.cpp \ + astigstatsdlg.cpp \ + astigzoomer.cpp \ + averagewavefrontfilesdlg.cpp \ + batchigramwizard.cpp \ + bathastigdlg.cpp \ + camcalibrationreviewdlg.cpp \ + cameracalibwizard.cpp \ + camwizardpage1.cpp \ + ccswappeddlg.cpp \ + circlefit.cpp \ + circleoutline.cpp \ + colorchannel.cpp \ + colorchanneldisplay.cpp \ + colormapviewerdlg.cpp \ + contourplot.cpp \ + contourrulerparams.cpp \ + contourtools.cpp \ + contourview.cpp \ + counterrotationdlg.cpp \ + cpoint.cpp \ + defocusdlg.cpp \ + dftarea.cpp \ + dftcolormap.cpp \ + dftthumb.cpp \ + dfttools.cpp \ + edgeplot.cpp \ + filteroutlinesdlg.cpp \ + foucaultview.cpp \ + generatetargetdlg.cpp \ + gplus.cpp \ + graphicsutilities.cpp \ + helpdlg.cpp \ + hotkeysdlg.cpp \ + igramarea.cpp \ + igramintensity.cpp \ + imagehisto.cpp \ + intensityplot.cpp \ + jitteroutlinedlg.cpp \ + lensdialog.cpp \ + lensetablemodel.cpp \ + main.cpp \ + mainwindow.cpp \ + messagereceiver.cpp \ + metricsdisplay.cpp \ + mirrordlg.cpp \ + myplotpicker.cpp \ + myutils.cpp \ + nullmarginhelpdlg.cpp \ + nullvariationdlg.cpp \ + oglrendered.cpp \ + oglview.cpp \ + outlinedialog.cpp \ + outlinehelpdocwidget.cpp \ + outlineplots.cpp \ + outlinestatsdlg.cpp \ + pdfcalibrationdlg.cpp \ + percentcorrectiondlg.cpp \ + pixelstats.cpp \ + plotcolor.cpp \ + profileplot.cpp \ + profileplotpicker.cpp \ + psfplot.cpp \ + psi_dlg.cpp \ + psiphasedisplay.cpp \ + psiresizeimagesdlg.cpp \ + psitiltoptions.cpp \ + punwrap.cpp \ + regionedittools.cpp \ + rejectedwavefrontsdlg.cpp \ + renamewavefrontdlg.cpp \ + reportdlg.cpp \ + reviewwindow.cpp \ + rmsplot.cpp \ + rotationdlg.cpp \ + savewavedlg.cpp \ + settings2.cpp \ + settingsdebug.cpp \ + settingsdft.cpp \ + settingsGeneral2.cpp \ + settingsigram.cpp \ + settingsigramimportconfig.cpp \ + settingsprofile.cpp \ + showaliasdlg.cpp \ + showallcontoursdlg.cpp \ + simigramdlg.cpp \ + simulationsview.cpp \ + squareimage.cpp \ + standastigwizard.cpp \ + statsview.cpp \ + subtractwavefronatsdlg.cpp \ + surface3dcontrolsdlg.cpp \ + surfaceanalysistools.cpp \ + surfacegraph.cpp \ + surfacelightingproxy.cpp \ + surfacemanager.cpp \ + surfacepropertiesdlg.cpp \ + transformwavefrontdlg.cpp \ + unwraperrorsview.cpp \ + usercolormapdlg.cpp \ + userdrawnprofiledlg.cpp \ + utilil.cpp \ + videosetupdlg.cpp \ + vortexdebug.cpp \ + wavefront.cpp \ + wavefrontaveragefilterdlg.cpp \ + wavefrontfilterdlg.cpp \ + wavefrontloader.cpp \ + wftexaminer.cpp \ + wftstats.cpp \ + zapm.cpp \ + zernikedlg.cpp \ + zernikeeditdlg.cpp \ + zernikepolar.cpp \ + zernikeprocess.cpp \ + zernikes.cpp \ + zernikesmoothingdlg.cpp + +HEADERS += bezier/bezier.h \ + SingleApplication/singleapplication_p.h \ + SingleApplication/singleapplication.h \ + annulushelpdlg.h \ + arbitrarywavefronthelp.h \ + astigpolargraph.h \ + arbitrarywavwidget.h \ + astigscatterplot.h \ + astigstatsdlg.h \ + astigzoomer.h \ + averagewavefrontfilesdlg.h \ + batchigramwizard.h \ + bathastigdlg.h \ + boundary.h \ + camcalibrationreviewdlg.h \ + cameracalibwizard.h \ + camwizardpage1.h \ + ccswappeddlg.h \ + circle.h \ + circleoutline.h \ + circleutils.h \ + colorchannel.h \ + colorchanneldisplay.h \ + colormapviewerdlg.h \ + contourplot.h \ + contourrulerparams.h \ + contourtools.h \ + contourview.h \ + counterrotationdlg.h \ + cpoint.h \ + defocusdlg.h \ + dftarea.h \ + dftcolormap.h \ + dftthumb.h \ + dfttools.h \ + edgeplot.h \ + filteroutlinesdlg.h \ + foucaultview.h \ + generatetargetdlg.h \ + gplus.h \ + graphicsutilities.h \ + helpdlg.h \ + hotkeysdlg.h \ + IgramArea.h \ + igramintensity.h \ + imagehisto.h \ + intensityplot.h \ + jitteroutlinedlg.h \ + lensdialog.h \ + lensetablemodel.h \ + mainwindow.h \ + messagereceiver.h \ + metricsdisplay.h \ + mirrordlg.h \ + myplotpicker.h \ + myutils.h \ + nullmarginhelpdlg.h \ + nullvariationdlg.h \ + oglrendered.h \ + oglview.h \ + outlinedialog.h \ + outlinehelpdocwidget.h \ + outlineplots.h \ + outlinestatsdlg.h \ + pdfcalibrationdlg.h \ + percentcorrectiondlg.h \ + percentCorrectionSurface.h \ + pixelstats.h \ + plotcolor.h \ + profileplot.h \ + profileplotpicker.h \ + psfplot.h \ + psi_dlg.h \ + psiphasedisplay.h \ + psiresizeimagesdlg.h \ + psitiltoptions.h \ + punwrap.h \ + regionedittools.h \ + rejectedwavefrontsdlg.h \ + renamewavefrontdlg.h \ + reportdlg.h \ + reviewwindow.h \ + rmsplot.h \ + rotationdlg.h \ + savewavedlg.h \ + settings2.h \ + settingsdebug.h \ + settingsdft.h \ + settingsGeneral2.h \ + settingsigram.h \ + settingsigramimportconfig.h \ + settingsprofile.h \ + showaliasdlg.h \ + showallcontoursdlg.h \ + simigramdlg.h \ + simulationsview.h \ + squareimage.h \ + standastigwizard.h \ + statsview.h \ + subtractwavefronatsdlg.h \ + surface3dcontrolsdlg.h \ + surfaceanalysistools.h \ + surfacegraph.h \ + surfacelightingproxy.h \ + surfacemanager.h \ + surfacepropertiesdlg.h \ + transformwavefrontdlg.h \ + unwraperrorsview.h \ + usercolormapdlg.h \ + userdrawnprofiledlg.h \ + utils.h \ + videosetupdlg.h \ + vortex.h \ + vortexdebug.h \ + wavefront.h \ + wavefrontaveragefilterdlg.h \ + wavefrontfilterdlg.h \ + wavefrontloader.h \ + wavefrontstats.h \ + wftexaminer.h \ + wftstats.h \ + zernikedlg.h \ + zernikeeditdlg.h \ + zernikepolar.h \ + zernikeprocess.h \ + zernikes.h \ + zernikesmoothingdlg.h + +FORMS += arbitrarywavefronthelp.ui \ + annulushelpdlg.ui \ + astigpolargraph.ui \ + astigstatsdlg.ui \ + averagewavefrontfilesdlg.ui \ + batchigramwizard.ui \ + bathastigdlg.ui \ + camcalibrationreviewdlg.ui \ + cameracalibwizard.ui \ + camwizardpage1.ui \ + ccswappeddlg.ui \ + colorchanneldisplay.ui \ + colormapviewerdlg.ui \ + contourrulerparams.ui \ + contourtools.ui \ + contourview.ui \ + counterrotationdlg.ui \ + defocusdlg.ui \ + dftarea.ui \ + dftthumb.ui \ + dfttools.ui \ + edgeplot.ui \ + filteroutlinesdlg.ui \ + foucaultview.ui \ + generatetargetdlg.ui \ + helpdlg.ui \ + hotkeysdlg.ui \ + igramintensity.ui \ + jitteroutlinedlg.ui \ + lensdialog.ui \ + mainwindow.ui \ + metricsdisplay.ui \ + mirrordlg.ui \ + nullmarginhelpdlg.ui \ + nullvariationdlg.ui \ + oglrendered.ui \ + outlinedialog.ui \ + outlinehelpdocwidget.ui \ + outlineplots.ui \ + outlinestatsdlg.ui \ + pdfcalibrationdlg.ui \ + percentcorrectiondlg.ui \ + pixelstats.ui \ + profilearea.ui \ + profileplot.ui \ + psfplot.ui \ + psi_dlg.ui \ + psiphasedisplay.ui \ + psiresizeimagesdlg.ui \ + psitiltoptions.ui \ + regionedittools.ui \ + rejectedwavefrontsdlg.ui \ + renamewavefrontdlg.ui \ + reportdlg.ui \ + reviewwindow.ui \ + rotationdlg.ui \ + savewavedlg.ui \ + settings2.ui \ + settingsdebug.ui \ + settingsdft.ui \ + settingsGeneral2.ui \ + settingsigram.ui \ + settingsigramimportconfig.ui \ + settingsprofile.ui \ + showaliasdlg.ui \ + showallcontoursdlg.ui \ + simigramdlg.ui \ + simulationsview.ui \ + standastigwizard.ui \ + statsview.ui \ + subtractwavefronatsdlg.ui \ + surface3dcontrolsdlg.ui \ + surfaceanalysistools.ui \ + surfacepropertiesdlg.ui \ + transformwavefrontdlg.ui \ + unwraperrorsview.ui \ + usercolormapdlg.ui \ + userdrawnprofiledlg.ui \ + videosetupdlg.ui \ + vortexdebug.ui \ + wavefrontaveragefilterdlg.ui \ + wavefrontfilterdlg.ui \ + wavefrontnulldlg.ui \ + wftexaminer.ui \ + zernikedlg.ui \ + zernikeeditdlg.ui \ + zernikesmoothingdlg.ui + +DISTFILES += buildingDFTFringe64.txt \ + ColorMaps/Dale1.cmp \ + ColorMaps/Dale2.cmp \ + ColorMaps/Dale3.cmp \ + ColorMaps/Diverging_BrBG.cmp \ + ColorMaps/Diverging_bwr.cmp \ + ColorMaps/Diverging_coolwarm.cmp \ + ColorMaps/Diverging_PiYG.cmp \ + ColorMaps/Diverging_PRGn.cmp \ + ColorMaps/Diverging_PuOr.cmp \ + ColorMaps/Diverging_RdBu.cmp \ + ColorMaps/Diverging_RdGy.cmp \ + ColorMaps/Diverging_RdYlBu.cmp \ + ColorMaps/Diverging_RdYlGn.cmp \ + ColorMaps/Diverging_seismic.cmp \ + ColorMaps/Diverging_Spectral.cmp \ + ColorMaps/Miscellaneous_brg.cmp \ + ColorMaps/Miscellaneous_CMRmap.cmp \ + ColorMaps/Miscellaneous_cubehelix.cmp \ + ColorMaps/Miscellaneous_flag.cmp \ + ColorMaps/Miscellaneous_gist_earth.cmp \ + ColorMaps/Miscellaneous_gist_ncar.cmp \ + ColorMaps/Miscellaneous_gist_rainbow.cmp \ + ColorMaps/Miscellaneous_gist_stern.cmp \ + ColorMaps/Miscellaneous_gnuplot.cmp \ + ColorMaps/Miscellaneous_gnuplot2.cmp \ + ColorMaps/Miscellaneous_hsv.cmp \ + ColorMaps/Miscellaneous_jet.cmp \ + ColorMaps/Miscellaneous_nipy_spectral.cmp \ + ColorMaps/Miscellaneous_ocean.cmp \ + ColorMaps/Miscellaneous_prism.cmp \ + ColorMaps/Miscellaneous_rainbow.cmp \ + ColorMaps/Miscellaneous_terrain.cmp \ + "ColorMaps/Perceptually Uniform Sequential_inferno.cmp" \ + "ColorMaps/Perceptually Uniform Sequential_magma.cmp" \ + "ColorMaps/Perceptually Uniform Sequential_plasma.cmp" \ + "ColorMaps/Perceptually Uniform Sequential_viridis.cmp" \ + ColorMaps/Qualitative_Accent.cmp \ + ColorMaps/Qualitative_Dark2.cmp \ + ColorMaps/Qualitative_Paired.cmp \ + ColorMaps/Qualitative_Pastel1.cmp \ + ColorMaps/Qualitative_Pastel2.cmp \ + ColorMaps/Qualitative_Set1.cmp \ + ColorMaps/Qualitative_Set2.cmp \ + ColorMaps/Qualitative_Set3.cmp \ + "ColorMaps/Sequential (2)_afmhot.cmp" \ + "ColorMaps/Sequential (2)_autumn.cmp" \ + "ColorMaps/Sequential (2)_bone.cmp" \ + "ColorMaps/Sequential (2)_cool.cmp" \ + "ColorMaps/Sequential (2)_copper.cmp" \ + "ColorMaps/Sequential (2)_gist_heat.cmp" \ + "ColorMaps/Sequential (2)_gray.cmp" \ + "ColorMaps/Sequential (2)_hot.cmp" \ + "ColorMaps/Sequential (2)_pink.cmp" \ + "ColorMaps/Sequential (2)_spring.cmp" \ + "ColorMaps/Sequential (2)_summer.cmp" \ + "ColorMaps/Sequential (2)_winter.cmp" \ + ColorMaps/Sequential_Blues.cmp \ + ColorMaps/Sequential_BuGn.cmp \ + ColorMaps/Sequential_BuPu.cmp \ + ColorMaps/Sequential_GnBu.cmp \ + ColorMaps/Sequential_Greens.cmp \ + ColorMaps/Sequential_Greys.cmp \ + ColorMaps/Sequential_Oranges.cmp \ + ColorMaps/Sequential_OrRd.cmp \ + ColorMaps/Sequential_PuBu.cmp \ + ColorMaps/Sequential_PuBuGn.cmp \ + ColorMaps/Sequential_PuRd.cmp \ + ColorMaps/Sequential_Purples.cmp \ + ColorMaps/Sequential_RdPu.cmp \ + ColorMaps/Sequential_Reds.cmp \ + ColorMaps/Sequential_YlGn.cmp \ + ColorMaps/Sequential_YlGnBu.cmp \ + ColorMaps/Sequential_YlOrBr.cmp \ + ColorMaps/Sequential_YlOrRd.cmp \ + ColorMaps/spring.cmp \ + COPYING.LESSER.txt \ + COPYING.txt \ + helptext.txt \ + README.md \ + RevisionHistory.html + + + + diff --git a/README.md b/README.md index efa8ff00..79f0b2ed 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,20 @@ Additional information and help is availlable at https://groups.io/g/Interferome # How to build DFTFringe on Linux + +We need to manually build Qwt as distributed library does not support Qt6 + ``` -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-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev -qmake +sudo apt update +sudo apt install -y apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libqt6core5compat6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev +wget -O qwt-6.3.0.zip https://sourceforge.net/projects/qwt/files/qwt/6.3.0/qwt-6.3.0.zip/download?use_mirror=pilotfiber +7z x qwt-6.3.0.zip +cd qwt-6.3.0 +/usr/lib/qt6/bin/qmake +make -j4 +sudo make install +cd .. +/usr/lib/qt6/bin/qmake make -j4 ``` @@ -73,11 +83,11 @@ The easiest way I have found to install it from command line requires to have Py From within `C:\buildingDFTFringe` do the following: ``` pip install aqtinstall -aqt install-tool windows desktop tools_mingw qt.tools.win64_mingw810 +aqt install-tool windows desktop tools_mingw1310 qt.tools.win64_mingw1310 ``` -Add minGW to your Path: `C:\buildingDFTFringe\Tools\mingw810_64\bin` -Add Qmake to your Path: `C:\buildingDFTFringe\5.15.2\mingw81_64\bin` +Add minGW to your Path: `C:\buildingDFTFringe\Tools\mingw1310_64\bin` +Add Qmake to your Path: `C:\buildingDFTFringe\6.8.3\mingw_64\bin` #### Get QT @@ -85,8 +95,8 @@ Here again, I have found easier to use Python and [aqtinstall](https://aqtinstal 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 +aqt install-qt windows desktop 6.8.3 win64_mingw -m qtcharts qtdatavis3d qt5compat +aqt install-qt windows desktop 6.8.3 win64_mingw --archives qtbase qtsvg ``` #### Get Qt creator @@ -99,13 +109,12 @@ aqt install-tool windows desktop tools_qtcreator ### Option B: using QT IDE 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. +Run the installer and go through it. You will need to do a custom installation to get Qt version 6.8.3. you might be able to compile with a different version. **Which components to choose ?** -You will need `QT 5.15.2`. +You will need `QT 6.8.3`. 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`. +In the details of Qt 6.8.3 you only need `MinGW 13.1.0 64-bit`, `Qt 5 Compatibility module`, `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`. @@ -136,23 +145,23 @@ If you haven't already, you will need to install latest version of [CMake](https #### Build OpenCV -Get [OpenCV](https://opencv.org/) 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` +Get [OpenCV](https://opencv.org/) source code version 4.12.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 -D WITH_QT=ON -D WITH_OPENGL=ON -D Qt6_DIR=:./6.8.3/mingw_64/lib/cmake/Qt6 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`. +You may need to adapt `Qt6_DIR` to you actual installation directory. If you installed Qt with the official isntaller the path is `C:/Qt/6.8.3/mingw_64/lib/cmake/Qt6`. #### Build Qwt -Get [Qwt](https://qwt.sourceforge.io/) 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`. +Get [Qwt](https://qwt.sourceforge.io/) source code version 6.3.0 in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named `C:\buildingDFTFringe\qwt-6.3.0`. -Then from within `C:\buildingDFTFringe\qwt-6.1.6` do the following: +Then from within `C:\buildingDFTFringe\qwt-6.3.0` do the following: ``` qmake.exe mingw32-make -j4 @@ -184,13 +193,13 @@ It's important that Armadillo knows the path to Lapack to work correctly. Here w #### Build OpenCV -Get [OpenCV](https://opencv.org/) **installer (not source code)** 4.6.0 in your prefered way (typically from their [GitHub](https://github.com/opencv/opencv/releases) or [website](https://opencv.org/releases/)). Run the installer `opencv-4.6.0-vc14_vc15.exe`. +Get [OpenCV](https://opencv.org/) **installer (not source code)** 4.12.0 in your prefered way (typically from their [GitHub](https://github.com/opencv/opencv/releases) or [website](https://opencv.org/releases/)). Run the installer `opencv-4.12.0-windows.exe`. Copy content from `yourExtractionLocation\opencv\build\include` to `C:\buildingDFTFringe\build_openCV\install\include`. #### Build Qwt -Get [Qwt](https://qwt.sourceforge.io/) 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`. +Get [Qwt](https://qwt.sourceforge.io/) source code version 6.3.0 in your prefered way (clone the repo, download the archive, homing pigeon, ...) and have it in folder named `C:\buildingDFTFringe\qwt-6.3.0`. No additional modification required here. @@ -206,15 +215,15 @@ Copy content from `armadillo-14.4.0\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 +qwt-6.3.0\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 +build_openCV\install\x64\mingw\bin\libopencv_calib3d4110.dll +build_openCV\install\x64\mingw\bin\libopencv_core4110.dll +build_openCV\install\x64\mingw\bin\libopencv_features2d4110.dll +build_openCV\install\x64\mingw\bin\libopencv_highgui4110.dll +build_openCV\install\x64\mingw\bin\libopencv_imgcodecs4110.dll +build_openCV\install\x64\mingw\bin\libopencv_imgproc4110.dll ``` ## Stage 3: Building DFTFringe @@ -248,16 +257,16 @@ 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 ".\build_openCV\install\x64\mingw\bin\libopencv_calib3d4110.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_core4110.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_features2d4110.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_flann4110.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_highgui4110.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgcodecs4110.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\build_openCV\install\x64\mingw\bin\libopencv_imgproc4110.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\qwt-6.3.0\lib\qwt.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\6.8.3\mingw1_64\bin\Qt6OpenGL.dll" -Destination ".\DFTFringe\Release" +Copy-Item ".\tools\mingw1310_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 diff --git a/RevisionHistory.html b/RevisionHistory.html index 8971d515..44651d48 100644 --- a/RevisionHistory.html +++ b/RevisionHistory.html @@ -460,5 +460,12 @@ + diff --git a/astigpolargraph.h b/astigpolargraph.h index 9a1e7013..edf1605a 100644 --- a/astigpolargraph.h +++ b/astigpolargraph.h @@ -11,7 +11,11 @@ #include "wavefront.h" #include -QT_CHARTS_USE_NAMESPACE +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + // keep compatibility with Qt5 + QT_CHARTS_USE_NAMESPACE +#endif + namespace Ui { class astigPolargraph; } diff --git a/contourplot.cpp b/contourplot.cpp index 70dda44d..5496829d 100644 --- a/contourplot.cpp +++ b/contourplot.cpp @@ -106,11 +106,54 @@ SpectrogramData::SpectrogramData(): m_wf(0) } +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +// keep compatibility with newer version of QWT used in QT6 +QwtInterval SpectrogramData::interval(Qt::Axis axis) const +{ + switch (axis) + { + case Qt::XAxis: + return m_xInterval; + case Qt::YAxis: + return m_yInterval; + case Qt::ZAxis: + return m_zInterval; + default: + return QwtInterval(); + } +} + +void SpectrogramData::setInterval(Qt::Axis axis, const QwtInterval &interval) +{ + switch (axis) + { + case Qt::XAxis: + m_xInterval = interval; + break; + case Qt::YAxis: + m_yInterval = interval; + break; + case Qt::ZAxis: + m_zInterval = interval; + break; + default: + break; + } +} +#endif void SpectrogramData::setSurface(wavefront *surface) { m_wf = surface; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // keep compatibility with newer version of QWT used in QT6 + + // Store interval info for use in `interval()` + m_xInterval = QwtInterval(0, m_wf->workData.cols); + m_yInterval = QwtInterval(0, m_wf->workData.rows); +#else setInterval( Qt::XAxis, QwtInterval(0,m_wf->workData.cols)); setInterval( Qt::YAxis, QwtInterval(0, m_wf->workData.rows)); +#endif } #include extern double g_angle; diff --git a/contourplot.h b/contourplot.h index d67bfe7d..350b7d38 100644 --- a/contourplot.h +++ b/contourplot.h @@ -25,8 +25,10 @@ #include "contourtools.h" #include "usercolormapdlg.h" #include "wavefront.h" -# include -# include +#include +#include +#include + class MyZoomer; class SpectrogramData: public QwtRasterData { @@ -34,9 +36,20 @@ class SpectrogramData: public QwtRasterData SpectrogramData(); wavefront *m_wf; void setSurface(wavefront *surface); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // keep compatibility with newer version of QWT used in QT6 + QwtInterval interval(Qt::Axis axis) const override; + void setInterval(Qt::Axis axis, const QwtInterval &interval); +#endif + virtual double value( double x, double y ) const override; - virtual double value( double x, double y ) const; - +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // keep compatibility with newer version of QWT used in QT6 +private: + QwtInterval m_xInterval; + QwtInterval m_yInterval; + QwtInterval m_zInterval; +#endif }; class ContourPlot: public QwtPlot { diff --git a/graphmodifier.h b/graphmodifier.h index 0d9a526f..0b294866 100644 --- a/graphmodifier.h +++ b/graphmodifier.h @@ -40,7 +40,11 @@ #include #include #include "percentCorrectionSurface.h" + +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +//keep compatiblity with Qt5 using namespace QtDataVisualization; +#endif class GraphModifier : public QObject { diff --git a/psfplot.cpp b/psfplot.cpp index 8fea6e57..4aba939f 100644 --- a/psfplot.cpp +++ b/psfplot.cpp @@ -28,7 +28,12 @@ psfPlot::psfPlot(QWidget *parent) : { ui->setupUi(this); QwtPlotLegendItem *customLegend = new QwtPlotLegendItem(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // keep compatibility with newer version of QWT used in QT6 + customLegend->setAlignmentInCanvas(Qt::AlignLeft | Qt::AlignBottom); +#else customLegend->setAlignment(Qt::AlignLeft | Qt::AlignBottom); +#endif customLegend->attach(this); QwtPlotTextLabel *t = new QwtPlotTextLabel(); QwtText title( "PSF" ); diff --git a/simulationsview.cpp b/simulationsview.cpp index c489c5ef..625beb3b 100644 --- a/simulationsview.cpp +++ b/simulationsview.cpp @@ -115,7 +115,12 @@ void SimulationsView::initMTFPlot(){ m_arcSecScaleDraw = new arcSecScaleDraw(mirrorDlg::get_Instance()->diameter); ui->MTF->setAxisScaleDraw(ui->MTF->xBottom, m_arcSecScaleDraw); QwtPlotLegendItem *customLegend = new QwtPlotLegendItem(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // keep compatibility with newer version of QWT used in QT6 + customLegend->setAlignmentInCanvas(Qt::AlignLeft | Qt::AlignBottom); +#else customLegend->setAlignment(Qt::AlignLeft | Qt::AlignBottom); +#endif customLegend->attach(ui->MTF); QwtPlotTextLabel *t = new QwtPlotTextLabel(); QwtText title( "MTF" ); diff --git a/simulationsview.h b/simulationsview.h index cc52dde4..91e30d89 100644 --- a/simulationsview.h +++ b/simulationsview.h @@ -23,8 +23,14 @@ #include #include #include + class arcSecScaleDraw; + +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +//keep compatiblity with Qt5 using namespace QtDataVisualization; +#endif + namespace Ui { class SimulationsView; } diff --git a/surfacegraph.h b/surfacegraph.h index e51d96c0..a4213ea0 100644 --- a/surfacegraph.h +++ b/surfacegraph.h @@ -39,7 +39,11 @@ #include "dftcolormap.h" #include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +//keep compatiblity with Qt5 using namespace QtDataVisualization; +#endif + extern double maxHeightSelections[]; class SurfaceGraph : public QObject { diff --git a/usercolormapdlg.h b/usercolormapdlg.h index f8aebd60..f7100c29 100644 --- a/usercolormapdlg.h +++ b/usercolormapdlg.h @@ -32,14 +32,36 @@ class userColorMapDlg; class SpectrogramData2: public QwtRasterData { public: +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // keep compatibility with newer version of QWT used in QT6 + SpectrogramData2() + { + } + + QwtInterval interval(Qt::Axis axis) const override + { + switch (axis) + { + case Qt::XAxis: + return QwtInterval(-5, 5); + case Qt::YAxis: + return QwtInterval(-5, 5); + case Qt::ZAxis: + return QwtInterval(-25, 25); + default: + return QwtInterval(); + } + } +#else SpectrogramData2() { setInterval( Qt::XAxis, QwtInterval( -5, 5 ) ); setInterval( Qt::YAxis, QwtInterval( -5, 5 ) ); setInterval( Qt::ZAxis, QwtInterval( -25, 25) ); } +#endif - virtual double value( double x, double y ) const + virtual double value( double x, double y ) const override { return x * y;