Skip to content

Commit 5102f9e

Browse files
authored
Merge pull request #16 from rrr-001/shot/feature
合并恢复矩形选框代码
2 parents 737961a + 928e8e5 commit 5102f9e

File tree

2 files changed

+155
-206
lines changed

2 files changed

+155
-206
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-macos:
11-
runs-on: macos-14
11+
runs-on: macos-13 # 使用 Intel macOS 以支持 x64 Qt 5.15.2
1212
steps:
1313
- uses: actions/checkout@v3
1414

@@ -21,27 +21,22 @@ jobs:
2121

2222
- name: Install Dependencies
2323
run: |
24-
# Use Rosetta to install x86_64 versions of dependencies
25-
arch -x86_64 /usr/local/bin/brew update
26-
arch -x86_64 /usr/local/bin/brew install opencv tesseract
24+
# Install dependencies for Intel macOS
25+
brew update
26+
brew install opencv tesseract
2727
2828
- name: Configure Project (local_config.pri)
2929
run: |
3030
# Generate a local config for CI environment
31-
# Note: GitHub Actions macos-latest (Intel) uses /usr/local, macos-14 (ARM) uses /opt/homebrew
32-
# We add both to be safe, but we must ensure we link against the correct architecture.
33-
# The error "ignoring file ... found architecture 'arm64', required architecture 'x86_64'"
34-
# suggests we are building for x86_64 but linking against arm64 libs, or vice versa.
35-
# Qt 5.15.2 on macos-latest is likely x86_64.
31+
# Note: Intel macOS (macos-13) uses /usr/local for Homebrew
32+
# Qt 5.15.2 on Intel macOS is x86_64.
3633
3734
echo "macx: {" > local_config.pri
3835
echo " DEFINES += USE_TESSERACT" >> local_config.pri
39-
echo " INCLUDEPATH += /usr/local/include /opt/homebrew/include" >> local_config.pri
40-
41-
# Explicitly look for libs in both locations
42-
echo " LIBS += -L/usr/local/lib -L/opt/homebrew/lib -ltesseract -lleptonica" >> local_config.pri
43-
echo " INCLUDEPATH += /usr/local/opt/opencv/include/opencv4 /opt/homebrew/opt/opencv/include/opencv4" >> local_config.pri
44-
echo " LIBS += -L/usr/local/opt/opencv/lib -L/opt/homebrew/opt/opencv/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_videoio" >> local_config.pri
36+
echo " INCLUDEPATH += /usr/local/include" >> local_config.pri
37+
echo " LIBS += -L/usr/local/lib -ltesseract -lleptonica" >> local_config.pri
38+
echo " INCLUDEPATH += /usr/local/opt/opencv/include/opencv4" >> local_config.pri
39+
echo " LIBS += -L/usr/local/opt/opencv/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_videoio -lopencv_dnn -lopencv_objdetect" >> local_config.pri
4540
echo "}" >> local_config.pri
4641
4742
- name: Build

0 commit comments

Comments
 (0)