diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b2f29d6..5b41896 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -31,7 +31,8 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v3.3.0 with: - version: '6.2.0' + version: '6.5.3' + aqtversion: ==3.1.7 - name: Setup OpenCV uses: Dovyski/setup-opencv-action@v1.1 @@ -44,7 +45,7 @@ jobs: - name: Install prerequisites run: | sudo apt update - sudo apt install -y make gcc patchelf chrpath qt5-default + sudo apt install -y make gcc patchelf chrpath qt5-default libxcb-cursor0 build-essential libgtk-3-dev - name: Build all run: | @@ -56,7 +57,7 @@ jobs: ./build_deb.sh - name: Upload build asserts - uses: actions/upload-artifact@v4.3.0 + uses: actions/upload-artifact@v4.3.1 with: name: YUVviewer_Ubuntu2004 path: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7360d98..c9e751b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -31,7 +31,8 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v3.3.0 with: - version: '6.2.0' + version: '6.5.3' + aqtversion: ==3.1.7 - name: Install prerequisites shell: bash -l {0} @@ -52,13 +53,13 @@ jobs: run: | git fetch --tags --force sed -i'.original' -e 's/--long --dirty/--long/g' ./tools/generate_info.sh - sed -i'.original' -e 's/QT_DIR=\/opt\/Qt6.2.0\/6.2.0\/gcc_64/QT_DIR=$(cd "$(dirname "$0")";pwd)\/..\/Qt\/6.2.0\/macos/g' build_dmg.sh + sed -i'.original' -e 's/QT_DIR=\/opt\/Qt6.2.0\/6.2.0\/gcc_64/QT_DIR=$(cd "$(dirname "$0")";pwd)\/..\/Qt\/6.5.3\/macos/g' build_dmg.sh sed -i'.original' -e 's/\/home\/xiaoming\/Desktop\/opencv/\/usr\/local/g' build_dmg.sh sed -i'.original' -e 's/\/home\/xiaoming\/Desktop\/opencv/\/usr\/local/g' partform_unix.pri ./build_dmg.sh - name: Upload build asserts - uses: actions/upload-artifact@v4.3.0 + uses: actions/upload-artifact@v4.3.1 with: name: YUVviewer_macos path: | @@ -78,7 +79,8 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v3.3.0 with: - version: '6.2.0' + version: '6.5.3' + aqtversion: ==3.1.7 - name: Install prerequisites shell: bash -l {0} @@ -99,15 +101,15 @@ jobs: run: | git fetch --tags --force sed -i'.original' -e 's/--long --dirty/--long/g' ./tools/generate_info.sh - sed -i'.original' -e 's/QT_DIR=\/opt\/Qt6.2.0\/6.2.0\/gcc_64/QT_DIR=$(cd "$(dirname "$0")";pwd)\/..\/Qt\/6.2.0\/macos/g' build_dmg.sh + sed -i'.original' -e 's/QT_DIR=\/opt\/Qt6.2.0\/6.2.0\/gcc_64/QT_DIR=$(cd "$(dirname "$0")";pwd)\/..\/Qt\/6.5.3\/macos/g' build_dmg.sh sed -i'.original' -e 's/\/home\/xiaoming\/Desktop\/opencv/\/usr\/local/g' build_dmg.sh sed -i'.original' -e 's/\/home\/xiaoming\/Desktop\/opencv/\/usr\/local/g' partform_unix.pri ./build_dmg.sh - name: Upload build asserts - uses: actions/upload-artifact@v4.3.0 + uses: actions/upload-artifact@v4.3.1 with: - name: YUVviewer_macos + name: YUVviewer_macos_arm64 path: | ./build_release/out/YUVviewer.dmg diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 705cc09..828fffc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -31,8 +31,9 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v3.3.0 with: - arch: win64_mingw81 - version: '6.2.0' + arch: win64_mingw + version: '6.5.3' + aqtversion: ==3.1.7 - name: Cache opencv uses: actions/cache@v4 @@ -79,10 +80,11 @@ jobs: ./tools/sed/sed.exe -i "s/libopencv_imgcodecs420/libopencv_imgcodecs400/g" ./build_setup.bat ./tools/sed/sed.exe -i "s/libopencv_core420/libopencv_core400/g" ./build_setup.bat ./tools/sed/sed.exe -i "s/OPENCV_DIR=D:\\Qt\\opencv4.2.0/OPENCV_DIR=C:\\opencv4.0.0/g" ./partform_win32.pri + c:/Windows/system32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -File "./tools/generate_info.ps1" > ./build_info.inc ./build_setup.bat - name: Upload build asserts - uses: actions/upload-artifact@v4.3.0 + uses: actions/upload-artifact@v4.3.1 with: name: YUVviewer_windows path: | diff --git a/README.md b/README.md index 187a24e..71c88b4 100644 --- a/README.md +++ b/README.md @@ -44,4 +44,4 @@ YV12、YU12/I420、NV21、NV12、YUY2/YUYV、YVYU、UYVY、YUV444、RGB565_L、R If you have suggestions or ideas for this project, please submit issues and pull requests on GitHub or Gitee. -At present, the project has been completely migrated to Qt6 development, it is recommended to use version Qt6.2.0 or higher. +At present, the project has been completely migrated to Qt6 development, it is recommended to use version Qt6.5.0 or higher. diff --git a/README_zh_CN.md b/README_zh_CN.md index 088f75e..3243680 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -44,4 +44,4 @@ YV12、YU12/I420、NV21、NV12、YUY2/YUYV、YVYU、UYVY、YUV444、RGB565_L、R 如果您对本项目有建议或想法,欢迎在GitHub或Gitee上提交issue和pull requests。 -目前项目已完全迁移至Qt6开发,建议使用版本Qt6.2.0或更高版本。 +目前项目已完全迁移至Qt6开发,建议使用版本Qt6.5.0或更高版本。 diff --git a/YUVviewer.pro b/YUVviewer.pro index a6b16ac..d9552c1 100644 --- a/YUVviewer.pro +++ b/YUVviewer.pro @@ -15,6 +15,12 @@ unix:{ YUVVIEWER_VERSION="$$cat(./version.txt)" ############################################################################### + +!versionAtLeast(QT_VERSION, 6.5.0) { + message("Cannot use Qt $$QT_VERSION") + error("Use Qt 6.5.0 or newer") +} + # 定义需要的Qt组件 QT += core gui QT += xml svg @@ -28,6 +34,10 @@ DEFINES += APP_VERSION="\\\"V$${YUVVIEWER_VERSION}\\\"" CONFIG += c++11 # 源文件配置 +INCLUDEPATH += \ + $$PWD \ + $$PWD/src + SOURCES += \ src/YUVviewer.cpp \ src/ImgViewer.cpp \ diff --git a/tools/generate_info.ps1 b/tools/generate_info.ps1 index 13b7987..47638ac 100644 --- a/tools/generate_info.ps1 +++ b/tools/generate_info.ps1 @@ -4,8 +4,8 @@ $git_short_hash = $(git rev-parse --short HEAD) $git_hash = $(git rev-parse HEAD) $date_info = $([String]::Format("{0:yyyy-MM-ddTHH:mm:ss.fffZ}", $(Get-Date).ToUniversalTime())) -Write-Output "#ifndef __BUILD_INFO_H__" -Write-Output "#define __BUILD_INFO_H__" +Write-Output "#ifndef __BUILD_INFO_INC__" +Write-Output "#define __BUILD_INFO_INC__" Write-Output "" Write-Output "#define BUILD_INFO ""$git_info""" Write-Output "#define BUILD_INFO_LEN $($git_info.Length)" @@ -16,5 +16,5 @@ Write-Output "#define BUILD_SHORT_HASH_LEN $($git_short_hash.Length)" Write-Output "#define BUILD_DATE ""$date_info""" Write-Output "#define BUILD_DATE_LEN $($date_info.Length)" Write-Output "" -Write-Output "#endif // __BUILD_INFO_H__" +Write-Output "#endif // __BUILD_INFO_INC__" diff --git a/tools/generate_info.sh b/tools/generate_info.sh index e469780..05a8e4a 100755 --- a/tools/generate_info.sh +++ b/tools/generate_info.sh @@ -13,8 +13,8 @@ git_info=$(git describe --always --long --dirty --abbrev=10 --tags) git_short_hash=$(git rev-parse --short HEAD) git_hash=$(git rev-parse HEAD) -echo "#ifndef __BUILD_INFO_H__" -echo "#define __BUILD_INFO_H__" +echo "#ifndef __BUILD_INFO_INC__" +echo "#define __BUILD_INFO_INC__" echo echo "#define BUILD_INFO \"${git_info}\"" echo "#define BUILD_INFO_LEN ${#git_info}" @@ -25,4 +25,4 @@ echo "#define BUILD_SHORT_HASH_LEN ${#git_short_hash}" echo "#define BUILD_DATE \"${date_info}\"" echo "#define BUILD_DATE_LEN ${#date_info}" echo -echo "#endif /* __BUILD_INFO_H__ */" +echo "#endif /* __BUILD_INFO_INC__ */" diff --git a/tools/linuxdeploy-plugin-qt-x86_64.AppImage b/tools/linuxdeploy-plugin-qt-x86_64.AppImage index 7ff6acc..30b4587 100755 Binary files a/tools/linuxdeploy-plugin-qt-x86_64.AppImage and b/tools/linuxdeploy-plugin-qt-x86_64.AppImage differ