June 8, 2008
Adding/Installing a .desktop File In Anjuta Projects
Filed under: Software Development — Samuel @ 8:22 pm
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.desktop.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.
No comments yet »