8 Jun 2008 knipknap   » (Journeyer)

Adding/Installing a .desktop File In Anjuta Projects

With help from yura_dev in #anjuta I just figured out how to add a .desktop file to your project in Anjuta:

  • Create the desktop file, name it test.in.in and place it in your project root.
  • Edit Makefile.am and add the following lines:

desktopdir = ${prefix}/share/applications
desktop_in_file = test.desktop.in
desktop_DATA = $(desktop_in_file:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

EXTRA_DIST = $(testdoc_DATA) \
test.desktop.in.in

%.desktop.in: %.desktop.in.in
sed -e 's,[@]PACKAGE_PIXMAPS_DIR[@],@datadir@,g’ $< > $@

  • Edit the line that says “sed -e …” according to whichever variables you want to replace in your desktop.in.in file.
  • Make sure that the replacement variables are defined in your project. You can do this under Project -> Properties -> Variables.

If this does not work then I will probably not be able to help you. I do hope Autotools finally die a quick yet painful death.

Syndicated 2008-06-08 19:22:17 from Debain.org

Latest blog entries     Older blog entries

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!