Skip to content

Commit

Permalink
Update Qt and OpenCV versions in build scripts
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn>
  • Loading branch information
QQxiaoming committed Feb 7, 2024
1 parent 81a37be commit ba36b3b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
git fetch --tags --force
sed -i 's/--long --dirty/--long/g' ./tools/generate_info.sh
sed -i 's/QT_DIR=\/opt\/Qt6.2.0\/6.2.0\/gcc_64/QT_DIR=$(cd "$(dirname "$0")";pwd)\/..\/Qt\/6.2.0\/gcc_64/g' build_deb.sh
sed -i 's/QT_DIR=\/opt\/Qt6.2.0\/6.2.0\/gcc_64/QT_DIR=$(cd "$(dirname "$0")";pwd)\/..\/Qt\/6.5.3\/gcc_64/g' build_deb.sh
sed -i 's/\/home\/xiaoming\/Desktop\/opencv/\/usr\/local/g' build_deb.sh
sed -i 's/\/home\/xiaoming\/Desktop\/opencv/\/usr\/local/g' partform_unix.pri
./build_deb.sh
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: windows

on:
push:
branches: [ main ]
branches: [ main,test ]
paths-ignore:
- 'doc/**'
- 'README.md'
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
with:
args: install innosetup --no-progress

- name: Install prerequisites
- name: build opencv
run: |
$c="C:\opencv4.0.0"
if(-not (Test-Path $c))
Expand All @@ -74,13 +74,16 @@ jobs:
git fetch --tags --force
./tools/sed/sed.exe -i 's/--long --dirty/--long/g' ./tools/generate_info.ps1
./tools/sed/sed.exe -i "s/QT_DIR=C:\/Qt\/Qt6.2.0\/6.2.0\/mingw81_32\/bin/QT_DIR=%Qt5_Dir%/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/QT_TOOLS_DIR=C:\/Qt\/Qt6.2.0\/Tools\/mingw810_32\/bin/QT_TOOLS_DIR=C:\/ProgramData\/Chocolatey\/lib\/mingw\/tools\/install\/mingw64\/bin/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/QT_TOOLS_DIR=C:\/Qt\/Qt6.2.0\/Tools\/mingw810_32\/bin/QT_TOOLS_DIR=C:\/mingw64\/bin/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/OPENCV_DIR=D:\/Qt\/opencv4.2.0\/x64\/mingw\/bin/OPENCV_DIR=C:\/opencv4.0.0\/x64\/mingw\/bin/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/libopencv_imgproc420/libopencv_imgproc400/g" ./build_setup.bat
./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
./tools/sed/sed.exe -i "s/build_info.inc/build_info.inc.bak/g" ./YUVviewer.pro
c:/Windows/system32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -File "./tools/generate_info.ps1" > ./build_info.inc.bak
c:/Windows/system32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -File "./tools/generate_info.ps1" > ./build_info.inc
cat ./build_info.inc
./build_setup.bat
- name: Upload build asserts
Expand Down
1 change: 1 addition & 0 deletions build_setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ windeployqt --dir .\InnoSetup\build .\InnoSetup\build\YUVviewer.exe
xcopy /y "%OPENCV_DIR%\libopencv_imgproc420.dll" ".\InnoSetup\build\"
xcopy /y "%OPENCV_DIR%\libopencv_imgcodecs420.dll" ".\InnoSetup\build\"
xcopy /y "%OPENCV_DIR%\libopencv_core420.dll" ".\InnoSetup\build\"
xcopy /y "%QT_TOOLS_DIR%\*.dll" ".\InnoSetup\build\"
:: 打包
echo "wait inno build setup..."
iscc /q ".\InnoSetup\build_temp_setup.iss"
Expand Down
1 change: 1 addition & 0 deletions tools/generate_info.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ Write-Output "#define BUILD_DATE ""$date_info"""
Write-Output "#define BUILD_DATE_LEN $($date_info.Length)"
Write-Output ""
Write-Output "#endif // __BUILD_INFO_INC__"
Write-Output ""

0 comments on commit ba36b3b

Please sign in to comment.