Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1ab2004

Browse files
authored
Further attempt to fix qt5 build (#1106)
* Further attempt to fix qt5 build* add qt6 to linux CI* add dep on X11Extras back* don't cancel qt6 if qt5 failed* put conditional QEvent back* add missing qt5 include to windows and macosI'm not attempting to fix qt6 build here* don't link to x11 on macos* Skip Release CI jobs in PRs* Remove deprecated noop macros* QStringLiteral* install missing library necessary for xcb on qt6
1 parent2f361cd commit1ab2004

19 files changed

+84
-39
lines changed

‎.github/scripts/build_ksnip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
mkdir build&&cd build
44

5-
cmake .. -G"${CMAKE_GENERATOR}" -DBUILD_TESTS=${BUILD_TESTS} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DVERSION_SUFIX=${VERSION_SUFFIX} -DBUILD_NUMBER=${BUILD_NUMBER} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
5+
cmake .. -G"${CMAKE_GENERATOR}" -DBUILD_TESTS=${BUILD_TESTS} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DVERSION_SUFIX=${VERSION_SUFFIX} -DBUILD_NUMBER=${BUILD_NUMBER} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DBUILD_WITH_QT6="${USE_QT6}"
66
${MAKE_BINARY}
77

88

‎.github/scripts/setup_build_variables.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,11 @@ fi
5151
ACTION_LINK_TEXT="Build logs: https://github.com/ksnip/ksnip/actions"
5252
BUILD_TIME_TEXT="Build Time:$(TZ=CET date +"%d.%m.%Y %T %Z")"
5353
UPLOADTOOL_BODY="${ACTION_LINK_TEXT} %0A${BUILD_TIME_TEXT}"
54-
echo"UPLOADTOOL_BODY=$UPLOADTOOL_BODY">>$GITHUB_ENV
54+
echo"UPLOADTOOL_BODY=$UPLOADTOOL_BODY">>$GITHUB_ENV
55+
56+
57+
if [["$QT_VERSION"== 6* ]];then
58+
echo"USE_QT6=yes">>$GITHUB_ENV
59+
else
60+
echo"USE_QT6=no">>$GITHUB_ENV
61+
fi

‎.github/scripts/setup_kColorPicker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ fi
1313

1414
cd kColorPicker||exit
1515
mkdir build&&cd build||exit
16-
cmake .. -G"${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DBUILD_EXAMPLE=OFF -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
17-
${MAKE_BINARY}&&${MAKE_BINARY} install
16+
cmake .. -G"${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DBUILD_EXAMPLE=OFF -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DBUILD_WITH_QT6="${USE_QT6}"
17+
${MAKE_BINARY}&&${MAKE_BINARY} install

‎.github/scripts/setup_kImageAnnotator.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ fi
1313

1414
cd kImageAnnotator||exit
1515
mkdir build&&cd build||exit
16-
cmake .. -G"${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DBUILD_EXAMPLE=OFF -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES="${INSTALL_PREFIX}/include"
17-
${MAKE_BINARY}&&${MAKE_BINARY} install
16+
cmake .. -G"${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DBUILD_EXAMPLE=OFF -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES="${INSTALL_PREFIX}/include" -DBUILD_WITH_QT6="${USE_QT6}"
17+
${MAKE_BINARY}&&${MAKE_BINARY} install

‎.github/workflows/linux.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ on:
1010
jobs:
1111
test-linux:
1212
runs-on:ubuntu-latest
13+
strategy:
14+
fail-fast:false
15+
matrix:
16+
qtversion:['5.15.2', '6.8.1']
1317
steps:
1418
-name:Checkout
1519
uses:actions/checkout@v3
1620

1721
-name:Set up build variables
22+
env:
23+
QT_VERSION:${{ matrix.qtversion }}
1824
run:bash ./.github/scripts/setup_build_variables.sh
1925

2026
-name:Set up linux build variables
@@ -23,13 +29,17 @@ jobs:
2329
-name:Install Qt
2430
uses:jurplel/install-qt-action@v3
2531
with:
26-
version:'5.15.2'
32+
version:${{ matrix.qtversion }}
2733
host:'linux'
2834
install-deps:'true'
2935

3036
-name:Install dependencies
3137
run:sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev xvfb
3238

39+
-name:Install Qt6 dependencies
40+
# https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform
41+
run:sudo apt-get install libxcb-cursor-dev
42+
3343
-name:Set up GoogleTest
3444
run:bash ./.github/scripts/setup_googleTest.sh
3545

@@ -55,6 +65,7 @@ jobs:
5565

5666

5767
package-appImage:
68+
if:${{ github.event_name == 'push' }}
5869
runs-on:ubuntu-20.04
5970
needs:test-linux
6071
steps:
@@ -77,6 +88,10 @@ jobs:
7788
-name:Install dependencies
7889
run:sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev libssl-dev
7990

91+
-name:Install Qt6 dependencies
92+
# https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform
93+
run:sudo apt-get install libxcb-cursor-dev
94+
8095
-name:Set up kColorPicker
8196
run:bash ./.github/scripts/setup_kColorPicker.sh
8297

@@ -117,6 +132,7 @@ jobs:
117132

118133

119134
package-rpm:
135+
if:${{ github.event_name == 'push' }}
120136
runs-on:ubuntu-latest
121137
needs:test-linux
122138
steps:
@@ -139,6 +155,10 @@ jobs:
139155
-name:Install dependencies
140156
run:sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev libssl-dev rpm
141157

158+
-name:Install Qt6 dependencies
159+
# https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform
160+
run:sudo apt-get install libxcb-cursor-dev
161+
142162
-name:Set up kColorPicker
143163
run:bash ./.github/scripts/setup_kColorPicker.sh
144164

@@ -179,6 +199,7 @@ jobs:
179199

180200

181201
package-deb:
202+
if:${{ github.event_name == 'push' }}
182203
runs-on:ubuntu-latest
183204
needs:test-linux
184205
steps:
@@ -201,6 +222,10 @@ jobs:
201222
-name:Install dependencies
202223
run:sudo apt-get install cmake extra-cmake-modules libxcb-xfixes0-dev libssl-dev devscripts debhelper
203224

225+
-name:Install Qt6 dependencies
226+
# https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform
227+
run:sudo apt-get install libxcb-cursor-dev
228+
204229
-name:Set up kColorPicker
205230
run:bash ./.github/scripts/setup_kColorPicker.sh
206231

‎.github/workflows/macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252

5353

5454
package-dmg:
55+
if:${{ github.event_name == 'push' }}
5556
runs-on:macos-13
5657
needs:test-macos
5758
steps:

‎.github/workflows/windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262

6363

6464
package-exe:
65+
if:${{ github.event_name == 'push' }}
6566
runs-on:windows-latest
6667
needs:test-windows
6768
steps:
@@ -132,6 +133,7 @@ jobs:
132133

133134

134135
package-msi:
136+
if:${{ github.event_name == 'push' }}
135137
runs-on:windows-latest
136138
needs:test-windows
137139
steps:

‎CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ set(QT_MIN_VERSION 5.15.2)
4444

4545
option(BUILD_WITH_QT6"Build against Qt6"OFF)
4646

47+
set(KSNIP_QT6${BUILD_WITH_QT6})
4748
configure_file(src/BuildConfig.h.in${CMAKE_CURRENT_BINARY_DIR}/src/BuildConfig.h)
4849

4950
if (BUILD_WITH_QT6)

‎src/BuildConfig.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212
#defineKIMAGEANNOTATOR_LANG_INSTALL_DIR "@KIMAGEANNOTATOR_LANG_INSTALL_DIR@"
1313

14-
#cmakedefine01 KSNIP_QT6 @BUILD_WITH_QT6@
14+
#cmakedefine01 KSNIP_QT6
1515

1616
#endif

‎src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ set(DEPENDENCY_LIBRARIES
265265

266266
if (BUILD_WITH_QT6)
267267
list(APPENDDEPENDENCY_LIBRARIESQt6::GuiPrivate)
268+
elseif (UNIXANDNOTAPPLE)
269+
list(APPENDDEPENDENCY_LIBRARIESQt5::X11Extras)
268270
endif ()
269271

270272
if (APPLE)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp