Bug 250555 - kst2 does not install a desktop file
Summary: kst2 does not install a desktop file
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: packaging (show other bugs)
Version: 2.0.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 2.0.3
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-08 13:39 UTC by Christian Trippe
Modified: 2011-01-19 20:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Trippe 2010-09-08 13:39:54 UTC
Version:           2.0.0 (using KDE 4.5.0) 
OS:                Linux

Trying to install kst2 via the method './install-kst release /tmp/package/usr' I cannot find a desktop file which gets installed, although there are everal present in kst-2.0.0/src/kst in the released tarball.

In addition to manual gets installed although there are several docbooks present in kst-2.0.0/docbook/kst

Reproducible: Always




OS: Linux
Comment 1 Nicolas Brisset 2011-01-07 22:43:21 UTC
Peter, 

has this possibly been handled with your cmake commit introducing install rules earlier today?

By the way, one point that matters a lot to me is that we keep the option of installing kst as non-root, i.e. specifying a specific non-standard prefix should work (which is normally the case with KDE apps if you care to set the KDE_DIRS env variable). Not every user has root privileges, and relying on sysadmins or distros to provide up-to-date versions of the fast-moving target that kst is (when everything goes well) has already proven to be impossible in the past.
Comment 2 Peter Kümmel 2011-01-13 12:47:49 UTC
On 07.01.2011 22:43, Nicolas Brisset wrote:
> https://bugs.kde.org/show_bug.cgi?id=250555
> --- Comment #1 from Nicolas Brisset <nicolas brisset eurocopter com>  2011-01-07 22:43:21 ---
> Peter, 
> 
> has this possibly been handled with your cmake commit introducing install rules
> earlier today?

I don't think so, the cmake rules are completely unrelated to the old build system.

> 
> By the way, one point that matters a lot to me is that we keep the option of
> installing kst as non-root, i.e. specifying a specific non-standard prefix
> should work (which is normally the case with KDE apps if you care to set the
> KDE_DIRS env variable). Not every user has root privileges, and relying on
> sysadmins or distros to provide up-to-date versions of the fast-moving target
> that kst is (when everything goes well) has already proven to be impossible in
> the past.
> 

By default the install path is currently <build-folder>/INSTALLED which could
be changed by the cmake option kst_install_prefix.

BTW what are the .desktop good for? Are they Kst specific?

Peter
Comment 3 Christian Trippe 2011-01-13 19:53:35 UTC
(In reply to comment #2)
> BTW what are the .desktop good for? Are they Kst specific?

No they are not, see:
http://standards.freedesktop.org/desktop-entry-spec/latest/

They make sure that the program appears in the menu of GNOME and KDE and tells which Mimetype is supported by the program.

As a consequence at the moment you have to launch kst from a terminal and have to know the name of the executable.
Comment 4 Peter Kümmel 2011-01-13 20:45:59 UTC
OK, I've added install rules to the cmake build (qmake will become obsolete):
http://mail.kde.org/pipermail/kst/2011-January/018844.html
see the pathes at the end of the patch.

You could set the prefix with -Dkst_install_prefix=, without the option it installs into <your build folder>/INSTALLED. The complete command line would 
look like this:

cmake ../kst/cmake -Dkst_merge_files=1 -Dkst_install_prefix=/my/install/math


And what must be done with the desktop file, could this also be automated?
I ask here before searching the web, sorry ;)
Comment 5 Peter Kümmel 2011-01-13 21:08:48 UTC
I see, have to call xdg- tools somehow.
Comment 6 Peter Kümmel 2011-01-13 21:32:11 UTC
But I assume we could only provide the files, to install them
correctly in the distributions' paths system isn't our job.

Therefore, make the special install pathes for the .desktop
files sense? Shouldn't we simply copy them into 'bin' an 'plugin'?
Comment 7 Christian Trippe 2011-01-13 21:46:31 UTC
Distributions usually do not install files which are not created/installed via the normal make/cmake/.. procedure. So you should install it. 
Kile for example uses
INSTALL( FILES kile.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
in the corresponding CMakeLists.txt
This should work for you too I would guess.
Comment 8 Nicolas Brisset 2011-01-13 22:37:25 UTC
Yes, we have to install it. No, not into ${XDG_APPS_INSTALL_DIR} which is in most cases a dir which is writeable only by root. 
It should default to that if no specific prefix is indicated, otherwise we should install under $kst_install_dir/share/applications and output a message to please add the directory to the correct $XDG_xx environment variable (I believe XDG_DATA_DIRS). I have to check whether we then have to relaunch some xdg executable from http://portland.freedesktop.org/wiki/XdgUtils so that it gets picked up.

I wonder whether we also need to install .desktop files for all the plugins?
Comment 9 Peter Kümmel 2011-01-14 10:06:37 UTC
I found ${XDG_APPS_INSTALL_DIR} is also only a hard coded path, no
usage of xdg tools, so we could also hard code the path, without
the starting /usr, which makes it possible to install to arbitrary 
pathes.

.desktop files for plugins: I think I saw qtcreator plugins also had
desktop files.

When istalling to /usr we will install this files:

/usr/bin
/usr/share/applnk/Graphics/kst.desktop
/usr/share/apps/kst/kstui.rc 
/usr/share/mimelink/application/x-kst.desktop
/usr/share/applications/kst.desktop

and plugins into 
/usr/plugin

Christian, Nicolas, do you think this is ok?
Then I would close the ticket.
Comment 10 Christian Trippe 2011-01-14 21:17:55 UTC
Sounds fine to me, but be aware that I do not have much knowledge on the matter, I only found this bug because I help with packaging kst for openSUSE and recognized it is not available in the application menu.
Comment 11 Peter Kümmel 2011-01-17 08:57:07 UTC
OK, then I close the bug.