[KDE/Mac] Getting applications to run

Jeremy Whiting jpwhiting at kde.org
Thu Dec 18 04:11:12 UTC 2014


I appologize in advance for this rambling. tldr, I got kanagram to run with
vanilla open source qt here, but had to tweak/move some things to do it.

Starting a new thread because I have some progress and I see the QSP issue
as orthogonal to running applications in an osx way (a way that they could
possibly some time get into the mac app store and/or an installer with
"drag the application to your Applications folder" style with their needed
libraries and files bundled).

In testing kf5 and qt5 on mac osx here I found a couple of ways to make
things work with vanilla Qt open source version from qt-project.org itself.
Since kanagram is something I know very well I started looking at it first.

After getting all the frameworks to build with kdesrc-build on osx (by
setting the right paths and compiler arguments) I built libkeduvocdocument,
kdeedu-data and kanagram with kdesrc-build. It of course puts things in not
the places that QSP looks for them, but a copy or two later and kanagram is
running.

First issue, kanagram looks for it's qml files
in QStandardPaths::locate(QStandardPaths::DataLocation, "ui/main.qml"); now
according to Qt Assistant, DataLocation should include
~/Libraries/Application Support/<APPNAME> /Library/Application
Support/<APPNAME> and <APPDIR>/../Resources yet for some reason
QStandardPaths::standardLocations(QStandardPaths::DataLocation); is giving
the first two and then /Applications/KDE/kanagram.app not the Resources
subdir. At any rate I copied the ui folder which holds kanagram's qml files
and images into /Applications/KDE/kanagram.app/ and it runs.

Second issue, it runs but doesn't find the kvtml files it is trying to find
with QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
"apps/kvtml", QStandardPaths::LocateDirectory); which on linux are in
/usr/share/apps/kvtml . If I move them from /usr/local/share/apps/kvtml to
~/Library/Application Support/apps/kvtml though kanagram starts and finds
it's data files just fine. <-- This is a case for the QSP patch imo so we
can put the data files into /opt/local/share/apps/kvtml or something for
both kanagram and khangman to find and read them. They come from
kdeedu-data. I can't think of how these data files could be shared between
two different applications the "Mac" way either, are there other
applications in OSX that put files into /Library/Application Support at all
? I mean real mac app store types of applications, I'll check tomorrow I
guess. I can't picture how an installer for kanagram would work, it would
have to let the user drag kanagram to Applications, but also drag data
files to /Library/Application Support ? I've never seen anything like that
in the few mac software installers I've used, though maybe it would work
with Qt Installation Framework.

After the above modifications/tweaks/workarounds, kanagram runs and is
playable, though I have to disable sound effects since phononqt5 crashes
for some reason. If I use QtMultimedia in qml to play the sounds instead of
a phonon MediaObject in C++ they work ok though, and I was leaning towards
doing that lately anyway. I did notice that the left and right arrow icons
are just white squares, and moving the mouse cursor gives it a white square
background when I move it over kanagram's ui that I don't see when using
other applications so it's not because of the VirtualBox I'm running it in.
Also the window titlebar says only the category name, not Kanagram and the
category name like it does on windows and linux, not sure why that is.

Any thoughts or suggestions about anything I've spewed out here is welcome.
I'm very open to ideas for how to make this work properly.

thanks,
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20141217/e4f1ddb6/attachment.html>


More information about the kde-mac mailing list