[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-mac
Subject:    Re: [KDE/Mac] Multiplatform frameworks
From:       Jeremy Whiting <jpwhiting () kde ! org>
Date:       2015-03-02 12:42:05
Message-ID: CADWV2K4tqGREBgS_n7gj4YSnYyvxJSORmY-brvsjF0_wpg7KnA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Ian,

I read that KDEInstallDirs documentation, and it seems it's a bit outdated
or at least not complete. If I change just -DKDE_INSTALL_DATADIR but
nothing else here. kdesrc-build is installing data (stuff that went under
$prefix/share) in "~/Library/Application Support" but nothing else so far.
For example .desktop files for applications are currently in
/usr/local/share/applications and kservice5 stuff is still in
/usr/local/share/kservices5. Now after rereading that page it seems I
changed the DATA_INSTALL_DIR but not the DATAROOTDIR, and since I set it to
an absolute path it's installing those files correctly. I guess ultimately
we would need/want to change all those paths on OS X. In my test here I've
simply added -DKDE_INSTALL_DATADIR="/Users/jeremy/Library/Application
Support" to the cmake options in my ~/.kdesrc-buildrc If there's somewhere
where default cmake arguments are set per platform maybe that would be
better to use and we can figure out the best places for all of these
various paths one at a time.

BR,
Jeremy

On Sun, Mar 1, 2015 at 7:30 PM, Ian Wadham <iandw.au@gmail.com> wrote:

> Hi Jeremy,
>
> My apologies for going back to basics.  Some things you said earlier made
> me
> think we are not on the same page, but I now see that we are.
>
> On 02/03/2015, at 3:15 AM, Jeremy Whiting wrote:
> >
> > The example code you've given does already use prefixes. I'll explain
> below.
> >
> > On Sat, Feb 28, 2015 at 7:56 PM, Ian Wadham <iandw.au@gmail.com> wrote:
> </snip>
> > > Note that the code could have said '(QStandardPaths::DataLocation,
> "arenas", '.  So no
> > > way for a "kf5" suffix to get in there.  Maybe it comes from
> $XDG_DATA_DIRS (?).
> >
> > Correct, DataLocation (newly clarified as AppDataLocation) is where the
> application stores it's own files, so it's Application Support/<appname> In
> this case granatier (or whatever QApplication::setApplicationName is given
> in main.cpp.
> >
> > > Also, there would be several shared data folders in
> GenericDataLocation, alongside
> > > the DataLocation folders for the apps.  See [2] for details.  These
> would fit in quite well
> > > with standard paths on Apple OS X set to:
> > >
> > >      "~/Library/Application Support/<subdir>", "/Library/Application
> Support/<subdir>"
> > >
> > > always supposing we really *want* to be good Apple citizens.  They
> would not look at
> > > all good if they were directly under "Application Support/", because
> they are not apps.
> >
> > I'm not sure what you mean here, are you referring to kf5 frameworks,
> kdoctools uses kf5/kdoctools/ prefix beneath this to keep it's data
> separated from others, Other kf5 frameworks do the same. If they didn't we
> would have a ton of data in $prefix/share on linux which is also
> discouraged.
>
> I am talking about regular apps, not Frameworks, but I am glad that
> Frameworks'
> doctools is inserting the "kf5/" subdir.
>
> If I were to build Granatier in KF5/Qt5, using standard QSP paths on OS X,
> I would
> expect to find "/Library/Application Support/granatier/" containing all
> the data specific
> to Granatier (arenas, etc.).  But also I expect "/Library/Application
> Support/kxmlgui5/",
> containing "granatierui.rc" (?), and ""/Library/Application
> Support/applications/" containing
> "granatier.desktop" (?).  Maybe there would be other subdirs, see [2],
> depending on
> whether Granatier shares other data with other apps or libraries or
> whether it uses shared
> resources such as "/Library/Application Support/icons" (?) (which I assume
> it does).
>
> If I have understood [2] correctly (BTW there seems to be a misprint under
> KXMLGUI5DIR),
> it seems to me that "kxmlgui5/", "applications/" and "icons/", *whatever*
> they contain, would
> be out-of-place [3] in "/Library/Application Support/" because they are
> not apps.  And even
> the application subdirs (granatier, etc.) run the risk of name-clashes
> with other software
> from sources other than KDE.  That is why I proposed a special subdir if
> we go the Apple
> and (unaltered) QStandardPaths 5.4 way.
>
> Cheers, Ian W.
>
> > [1]
> https://projects.kde.org/projects/kde/kdegames/granatier/repository/revisions/master/entry/src/game.cpp
> > [2] http://api.kde.org/ecm/kde-module/KDEInstallDirs.html
>
> [3] "Out-of-place" ... "like feathers on a dog"… :-)
>
>

[Attachment #5 (text/html)]

<div dir="ltr">Ian,<div><br></div><div>I read that KDEInstallDirs documentation, and \
it seems it&#39;s a bit outdated or at least not complete. If I change just \
-DKDE_INSTALL_DATADIR but nothing else here. kdesrc-build is installing data (stuff \
that went under $prefix/share) in &quot;~/Library/Application Support&quot; but \
nothing else so far. For example .desktop files for applications are currently in \
/usr/local/share/applications and kservice5 stuff is still in \
/usr/local/share/kservices5. Now after rereading that page it seems I changed the  \
<span style="color:rgb(0,0,0);font-family:monospace;font-size:16.1499996185303px;line- \
height:26px;text-align:justify;background-color:rgb(236,240,243)">DATA_INSTALL_DIR \
but not the DATAROOTDIR, and since I set it to an absolute path it&#39;s installing \
those files correctly. I guess ultimately we would need/want to change all those \
paths on OS X. In my test here I&#39;ve simply added \
-DKDE_INSTALL_DATADIR=&quot;/Users/jeremy/Library/Application Support&quot; to the \
cmake options in my ~/.kdesrc-buildrc If there&#39;s somewhere where default cmake \
arguments are set per platform maybe that would be better to use and we can figure \
out the best places for all of these various paths one at a \
time.</span></div><div><span \
style="color:rgb(0,0,0);font-family:monospace;font-size:16.1499996185303px;line-height \
:26px;text-align:justify;background-color:rgb(236,240,243)"><br></span></div><div><span \
style="color:rgb(0,0,0);font-family:monospace;font-size:16.1499996185303px;line-height \
:26px;text-align:justify;background-color:rgb(236,240,243)">BR,</span></div><div><span \
style="color:rgb(0,0,0);font-family:monospace;font-size:16.1499996185303px;line-height \
:26px;text-align:justify;background-color:rgb(236,240,243)">Jeremy</span></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 1, 2015 at 7:30 PM, Ian \
Wadham <span dir="ltr">&lt;<a href="mailto:iandw.au@gmail.com" \
target="_blank">iandw.au@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi Jeremy,<br> <br>
My apologies for going back to basics.   Some things you said earlier made me<br>
think we are not on the same page, but I now see that we are.<br>
<span class=""><br>
On 02/03/2015, at 3:15 AM, Jeremy Whiting wrote:<br>
&gt;<br>
&gt; The example code you&#39;ve given does already use prefixes. I&#39;ll explain \
below.<br> &gt;<br>
&gt; On Sat, Feb 28, 2015 at 7:56 PM, Ian Wadham &lt;<a \
href="mailto:iandw.au@gmail.com">iandw.au@gmail.com</a>&gt; wrote:<br> \
</span>&lt;/snip&gt;<br> <span class="">&gt; &gt; Note that the code could have said \
&#39;(QStandardPaths::DataLocation, &quot;arenas&quot;, &#39;.   So no<br> &gt; &gt; \
way for a &quot;kf5&quot; suffix to get in there.   Maybe it comes from \
$XDG_DATA_DIRS (?).<br> &gt;<br>
&gt; Correct, DataLocation (newly clarified as AppDataLocation) is where the \
application stores it&#39;s own files, so it&#39;s Application \
Support/&lt;appname&gt; In this case granatier (or whatever \
QApplication::setApplicationName is given in main.cpp.<br> &gt;<br>
&gt; &gt; Also, there would be several shared data folders in GenericDataLocation, \
alongside<br> &gt; &gt; the DataLocation folders for the apps.   See [2] for details. \
These would fit in quite well<br> &gt; &gt; with standard paths on Apple OS X set \
to:<br> &gt; &gt;<br>
&gt; &gt;         &quot;~/Library/Application Support/&lt;subdir&gt;&quot;, \
&quot;/Library/Application Support/&lt;subdir&gt;&quot;<br> &gt; &gt;<br>
&gt; &gt; always supposing we really *want* to be good Apple citizens.   They would \
not look at<br> &gt; &gt; all good if they were directly under &quot;Application \
Support/&quot;, because they are not apps.<br> &gt;<br>
&gt; I&#39;m not sure what you mean here, are you referring to kf5 frameworks, \
kdoctools uses kf5/kdoctools/ prefix beneath this to keep it&#39;s data separated \
from others, Other kf5 frameworks do the same. If they didn&#39;t we would have a ton \
of data in $prefix/share on linux which is also discouraged.<br> <br>
</span>I am talking about regular apps, not Frameworks, but I am glad that \
Frameworks&#39;<br> doctools is inserting the &quot;kf5/&quot; subdir.<br>
<br>
If I were to build Granatier in KF5/Qt5, using standard QSP paths on OS X, I \
would<br> expect to find &quot;/Library/Application Support/granatier/&quot; \
containing all the data specific<br> to Granatier (arenas, etc.).   But also I expect \
&quot;/Library/Application Support/kxmlgui5/&quot;,<br> containing \
&quot;granatierui.rc&quot; (?), and &quot;&quot;/Library/Application \
Support/applications/&quot; containing<br> &quot;granatier.desktop&quot; (?).   Maybe \
there would be other subdirs, see [2], depending on<br> whether Granatier shares \
other data with other apps or libraries or whether it uses shared<br> resources such \
as &quot;/Library/Application Support/icons&quot; (?) (which I assume it does).<br> \
<br> If I have understood [2] correctly (BTW there seems to be a misprint under \
KXMLGUI5DIR),<br> it seems to me that &quot;kxmlgui5/&quot;, \
&quot;applications/&quot; and &quot;icons/&quot;, *whatever* they contain, would<br> \
be out-of-place [3] in &quot;/Library/Application Support/&quot; because they are not \
apps.   And even<br> the application subdirs (granatier, etc.) run the risk of \
name-clashes with other software<br> from sources other than KDE.   That is why I \
proposed a special subdir if we go the Apple<br> and (unaltered) QStandardPaths 5.4 \
way.<br> <span class=""><br>
Cheers, Ian W.<br>
<br>
&gt; [1] <a href="https://projects.kde.org/projects/kde/kdegames/granatier/repository/revisions/master/entry/src/game.cpp" \
target="_blank">https://projects.kde.org/projects/kde/kdegames/granatier/repository/revisions/master/entry/src/game.cpp</a><br>
 &gt; [2] <a href="http://api.kde.org/ecm/kde-module/KDEInstallDirs.html" \
target="_blank">http://api.kde.org/ecm/kde-module/KDEInstallDirs.html</a><br> <br>
</span>[3] &quot;Out-of-place&quot; ... &quot;like feathers on a dog&quot;… :-)<br>
<br>
</blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
kde-mac@kde.org
List Information: https://mail.kde.org/mailman/listinfo/kde-mac
KDE/Mac Information: http://community.kde.org/Mac

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic