Subject: Follow-up: Full Functional Verification of KMyMoney 5.2 on macOS (ARM64/M4)
Hi everyone,
Following up on my previous post regarding a successful build of KMyMoney 5.2 (Qt6/master) on macOS (M4). While I initially reported a successful compile, further testing revealed that the AqBanking/KBanking components required specific source patches and resource-linking to be fully functional.
I have now verified a 100% āground-upā build from a clean Craft environment that resolves a āMenu Hijackā issue and the AqBanking initialization errors. Below are the technical details and the specific ārecipeā used.
1. The āMenu Hijackā Fix (kbanking plugin)
Issue: On macOS, the settings_aqbanking action was automatically moved to the āApp Name > Preferencesā slot by the Qt framework. This suppressed the main KMyMoney configuration window (the one with the sidebar).
Solution: In kmymoney/plugins/kbanking/kbanking.cpp, the MenuRole was explicitly set to NoRole.
Code Change:
settings_aqbanking->setMenuRole(QAction::NoRole);
Result: This restores the Sidebar-driven āConfigure KMyMoneyā window and leaves AqBanking as a separate item under āSettings.ā
2. Banking Library Build Issues
Issue: Modern Clang (Xcode 15+) treats implicit function declarations as errors, and the Gwenhywfar/AqBanking build fails to locate Qt6 moc and uic.
Solution:
3. Missing Bundle Resources (Runtime Fix)
Issue: The app would launch, but āConfigure AqBankingā¦ā would fail to open with: Dialog description file not found (-51).
Root Cause: The .app bundle was missing internal links to the banking drivers and XML dialog blueprints.
Verification: Manually symlinking lib/gwenhywfar, lib/aqbanking, and their respective share folders into the .app/Contents/ directory resolved all runtime errors.
The Reproduction Steps (M4/ARM64)
For those looking to reproduce or update the CI scripts, these are the exact steps that resulted in a fully functional build:
# 1. Clean Bootstrap
rm -rf ~/CraftRoot
mkdir ~/CraftRoot
curl https://raw.githubusercontent.com/KDE/craft/master/setup/CraftBootstrap.py -o setup.py
python3 setup.py --prefix ~/CraftRoot # Select macOS/arm64
source ~/CraftRoot/craft/craftenv.sh
# 2. Patch Source (The Menu Fix)
craft --fetch kmymoney
# Apply: settings_aqbanking->setMenuRole(QAction::NoRole); to kbanking.cpp
# 3. Set M4 Environment Guardrails
export CFLAGS="-Wno-error=implicit-function-declaration"
export CXXFLAGS="-Wno-error=implicit-function-declaration"
export LDFLAGS="-L${CRAFT_ROOT}/lib -liconv"
export PATH=${CRAFT_ROOT}/libexec:$PATH
# 4. Build Core Stack
craft extragear/alkimia
craft libs/qt6/qtwebengine
# 5. Build Banking Drivers (Injected Paths)
craft --set "args=--without-x --with-guis=qt6 MOC=${CRAFT_ROOT}/libexec/moc UIC=${CRAFT_ROOT}/libexec/uic" libs/gwenhywfar
craft libs/gwenhywfar libs/aqbanking
# 6. Final Build with Bundle Flag
craft --set "args=-DBUILD_WITH_QT6=ON -DCMAKE_OSX_ARCHITECTURES=arm64 -DKDE_INSTALL_BUNDLEDIR=Applications/KDE" kmymoney
craft kmymoney
# 7. Final Bundle Repair (Symlinks)
APP_CON="~/CraftRoot/Applications/KDE/kmymoney.app/Contents"
ln -sf ~/CraftRoot/lib/gwenhywfar "$APP_CON/lib/"
ln -sf ~/CraftRoot/lib/aqbanking "$APP_CON/lib/"
ln -sf ~/CraftRoot/share/gwenhywfar "$APP_CON/Resources/"
ln -sf ~/CraftRoot/share/aqbanking "$APP_CON/Resources/"
The executable now ends up at: ~/CraftRoot/Applications/KDE/kmymoney.app/Contents/MacOS/kmymoney. I have not performed exhaustive testing, but so far I havenāt found anything additional. Hopefully this can help get the official macOS CI/CD going again.