Make akonadi applications non bundle for macOS
ClosedPublic

Authored by fazevedo on Mar 22 2019, 9:43 PM.

Details

Summary

QStandardPaths::findExecutable() is not able to find bundles so akonadi
is unable to start. Fix that generating non bundles applications.
The processes are still visible in the macos Dock, but a follow up
patch could hide them.
See https://stackoverflow.com/questions/620841/how-to-hide-the-dock-icon

Diff Detail

Repository
R165 Akonadi
Branch
master-macos-bundle (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11589
Build 11607: arc lint + arc unit
fazevedo created this revision.Mar 22 2019, 9:43 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptMar 22 2019, 9:43 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
fazevedo requested review of this revision.Mar 22 2019, 9:43 PM
dvratil added inline comments.
templates/akonadiresource/src/CMakeLists.txt
27

The problem is that resources can have GUI (the settings dialog) - wouldn't marking them as non-gui affect this? Will the app still be able to create new windows on demand? Especially on Windows, since the app won't be marked as a win32 app...?

Hm indeed, this would have to be tested from a windows user as well.
I did tested it on mac os and it works fine, akonadi resources can show their UI when requested.
Please add a widows reviewer if possible, i would not be able to test that on my own.

The main difference for a Qt application not marked as gui/WIN32 is that a console Windows will pop up when the application is executed.

dvratil requested changes to this revision.Mar 25 2019, 9:27 AM

The main difference for a Qt application not marked as gui/WIN32 is that a console Windows will pop up when the application is executed.

Thanks Hannah. So this change is a no-go, we would end up with a dozen terminals on Windows this way.

Would it make sense to think about Kontact on Mac in the terms of a singular bundle, similar to Kontact Flatpak/Appimage, and take a completely different approach in packaging Kontact for Mac?

This revision now requires changes to proceed.Mar 25 2019, 9:27 AM

Would it make sense to think about Kontact on Mac in the terms of a singular bundle, similar to Kontact Flatpak/Appimage, and take a completely different approach in packaging Kontact for Mac?

I have no idea / knowledge about flatpack/appimage, nor how it's packaged.
More largely, Having pim packaged in a single bundle would be a huge task (ie, need patched Qt, los of patched stuff etc, and the most annoying one dbus service).
I only do use Craft on macos to get KDE stuff built / used.
I do have pending fixes for craft that fixed dbus and it's service registering for the user session, that make akonadi and some dbus based applications to starts.
Does not mean it works fine for all though, but having kontact working first in Craft would be a first step closer to have a standalone bundle.

I will rework the patch to if/def the non gui marking to Apple only soon.

fazevedo updated this revision to Diff 54759.Mar 25 2019, 11:13 AM

Rework patches so they apply only on macOS

dfaure requested changes to this revision.Mar 25 2019, 5:58 PM
dfaure added inline comments.
src/agentserver/CMakeLists.txt
13

I wonder if it wouldn't be simpler, instead of these three lines, to just write

set_target_properties(akonadi_agent_server PROPERTIES MACOSX_BUNDLE FALSE)

This is more standard CMake, and doesn't need an ugly if().

ecm_mark_nongui_executable only has value in the fact that it encapsulates Mac and Windows. If it's mac only, then I wouldn't use it.

src/akonadictl/CMakeLists.txt
21

order matters? or is this a no-op change?

This revision now requires changes to proceed.Mar 25 2019, 5:58 PM

To which branch should I rebase this change ?

fazevedo updated this revision to Diff 57635.May 6 2019, 9:59 AM

Better mac os cmake code

dvratil accepted this revision.May 6 2019, 2:14 PM

Thanks. Merge to master, please.

This revision was not accepted when it landed; it landed in state Needs Review.May 7 2019, 10:33 AM
This revision was automatically updated to reflect the committed changes.