Skip to content

Commit

Permalink
Switching the mac CI to qt6 (#2612)
Browse files Browse the repository at this point in the history
* try switching the mac CI to qt6; remove the cmake hardcoded deploy, use macdeployqt instead

* mac: Try to mode kvilib and modules to Contents/Frameworks for macdeployqt to pick them up

* Add Mattoje's patch

* Just disable python by now
  • Loading branch information
ctrlaltca authored Mar 8, 2024
1 parent dcba7a1 commit 27f96bb
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_linux_qt6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.6.1
version: 6.6.2
modules: qt5compat qtmultimedia

- name: Install other prerequisites
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.6.2
modules: qt5compat qtmultimedia

- name: Install other prerequisites
run: |
Expand All @@ -37,7 +40,11 @@ jobs:
cd '${{github.workspace}}'
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DWANT_PYTHON=OFF \
..
- name: Build
run: |
Expand All @@ -51,6 +58,11 @@ jobs:
cd build
cmake --install .
- name: Deployt Qt
run: |
cd '${{github.workspace}}'
macdeployqt "build/KVIrc.app" -appstore-compliant
- name: Detect version
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.6.1
version: 6.6.2
modules: qt5compat qtmultimedia
cache: true

Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ endif()
if(UNIX)
if(APPLE)
set(CMAKE_KVIRC_RESOURCES_DIR "${CMAKE_INSTALL_PREFIX}/Contents/Resources/")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
else()
# Assume GNU/Linux
set(CMAKE_KVIRC_RESOURCES_DIR "${CMAKE_INSTALL_PREFIX}/share/kvirc/${VERSION_BRANCH}/")
Expand Down Expand Up @@ -1310,7 +1311,7 @@ endif()
# KviLib path
if(UNIX)
if(APPLE)
set(KVIRC_LIB_PATH ${CMAKE_INSTALL_PREFIX}/Contents/MacOS/)
set(KVIRC_LIB_PATH ${CMAKE_INSTALL_PREFIX}/Contents/Frameworks/)
else()
# Assume Linux
set(KVIRC_LIB_PATH ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/)
Expand Down
38 changes: 1 addition & 37 deletions src/kvirc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -303,40 +303,4 @@ endif()
install(TARGETS ${KVIRC_BINARYNAME} RUNTIME DESTINATION "${KVIRC_BIN_PATH}")
if(MSVC)
install(FILES $<TARGET_PDB_FILE:${KVIRC_BINARYNAME}> DESTINATION ${KVIRC_BIN_PATH} OPTIONAL)
endif()

if(APPLE)
set(plugin_dest_dir ${CMAKE_INSTALL_PREFIX}/Contents/Plugins)
set(qtconf_dest_dir ${CMAKE_INSTALL_PREFIX}/Contents/Resources)
#fixme dirty hack
set(QT_PLUGINS_DIR "${Qt5Widgets_DIR}/../../../plugins")
set(QT_LIBRARY_DIR "${Qt5Widgets_DIR}/../../")
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE)

# qt5: audio, iconengines, imageformats, mediaservice, platforms, sqldrivers
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
FILES_MATCHING
PATTERN "*.dSYM" EXCLUDE
PATTERN "*_debug.dylib" EXCLUDE
PATTERN "audio/*.dylib"
PATTERN "iconengines/*.dylib"
PATTERN "imageformats/*.dylib"
PATTERN "mediaservice/*.dylib"
PATTERN "platforms/*.dylib"
PATTERN "sqldrivers/*.dylib"
)

install(CODE "
file(WRITE \"${qtconf_dest_dir}/qt.conf\" \"[Paths]
Plugins = Plugins\")
" COMPONENT Runtime)

install(CODE "
file(GLOB_RECURSE QTPLUGINS
\"${plugin_dest_dir}/*.dylib\")
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
fixup_bundle(\"${CMAKE_INSTALL_PREFIX}\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\" IGNORE_ITEM \"Python;libqsqlodbc.dylib;libqsqlpsql.dylib\")
" COMPONENT Runtime)
endif()
endif()
7 changes: 1 addition & 6 deletions src/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,4 @@ endif()

if(COMPILE_ENCHANT_SUPPORT)
subdirs(spellchecker)
endif()

if(APPLE)
# This is a dirty trick ensure we get some code executed after the last module gets installed
subdirs(zzz_afterlastmodule)
endif()
endif()
13 changes: 0 additions & 13 deletions src/modules/zzz_afterlastmodule/CMakeLists.txt

This file was deleted.

0 comments on commit 27f96bb

Please sign in to comment.