Skip to content

Commit

Permalink
Update Qt versions in GitHub workflows and project configuration files
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Feb 6, 2024
1 parent 71d745d commit 81a37be
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 21 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
- name: Install Qt
uses: jurplel/[email protected]
with:
version: '6.2.0'
version: '6.5.3'
aqtversion: ==3.1.7

- name: Setup OpenCV
uses: Dovyski/[email protected]
Expand All @@ -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: |
Expand All @@ -56,7 +57,7 @@ jobs:
./build_deb.sh
- name: Upload build asserts
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
name: YUVviewer_Ubuntu2004
path: |
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
- name: Install Qt
uses: jurplel/[email protected]
with:
version: '6.2.0'
version: '6.5.3'
aqtversion: ==3.1.7

- name: Install prerequisites
shell: bash -l {0}
Expand All @@ -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/[email protected].0
uses: actions/[email protected].1
with:
name: YUVviewer_macos
path: |
Expand All @@ -78,7 +79,8 @@ jobs:
- name: Install Qt
uses: jurplel/[email protected]
with:
version: '6.2.0'
version: '6.5.3'
aqtversion: ==3.1.7

- name: Install prerequisites
shell: bash -l {0}
Expand All @@ -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/[email protected].0
uses: actions/[email protected].1
with:
name: YUVviewer_macos
name: YUVviewer_macos_arm64
path: |
./build_release/out/YUVviewer.dmg
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ jobs:
- name: Install Qt
uses: jurplel/[email protected]
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
Expand Down Expand Up @@ -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/[email protected].0
uses: actions/[email protected].1
with:
name: YUVviewer_windows
path: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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或更高版本。
10 changes: 10 additions & 0 deletions YUVviewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,6 +34,10 @@ DEFINES += APP_VERSION="\\\"V$${YUVVIEWER_VERSION}\\\""
CONFIG += c++11

# 源文件配置
INCLUDEPATH += \
$$PWD \
$$PWD/src

SOURCES += \
src/YUVviewer.cpp \
src/ImgViewer.cpp \
Expand Down
6 changes: 3 additions & 3 deletions tools/generate_info.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -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__"

6 changes: 3 additions & 3 deletions tools/generate_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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__ */"
Binary file modified tools/linuxdeploy-plugin-qt-x86_64.AppImage
Binary file not shown.

0 comments on commit 81a37be

Please sign in to comment.