Commit 83a7ab7e authored by Jason Rhinelander's avatar Jason Rhinelander

Add desktop and mimetype entries

This makes Creativity show up in Gnome's list of applications, makes
crstate files open by default in creativity-gui, and uses the icon for
both.
parent 60fd1946
......@@ -150,11 +150,22 @@ if (GUI)
list(APPEND creativity_install_targets creativity-gui)
# Copy the glade and icon to the install datadir
install(FILES gui.glade creativity.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/creativity/)
install(FILES gui.glade creativity-gui.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/creativity/)
# Also copy them into the build dir (so that running ./creativity-gui from build/ works)
configure_file(gui.glade ${CMAKE_BINARY_DIR}/gui.glade COPYONLY)
configure_file(creativity.svg ${CMAKE_BINARY_DIR}/creativity.svg COPYONLY)
configure_file(creativity-gui.svg ${CMAKE_BINARY_DIR}/creativity-gui.svg COPYONLY)
# Install the desktop file
install(FILES creativity-gui.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications/)
# Mime type registration
install(FILES creativity-gui.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages/)
# Also copy the icon into the pixmaps directory so it'll be picked up by things reading the desktop file
install(FILES creativity-gui.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/pixmaps/)
# And put a copy in for the mime type icon
install(FILES creativity-gui.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/pixmaps/ RENAME application-x-creativity.crstate.svg)
endif()
......
[Desktop Entry]
Version=1.0
Name=Creativity Simulator
Exec=creativity-gui %f
Comment=Create or view Creativity model simulations
MimeType=application/x-creativity.crstate
Terminal=false
Type=Application
Categories=GTK;Education;Science;Economy
Icon=creativity-gui
<?xml version='1.0' encoding='utf-8'?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-creativity.crstate">
<comment>Creativity simulator simulation state file</comment>
<glob pattern="*.crstate"/>
</mime-type>
</mime-info>
......@@ -260,7 +260,7 @@
<property name="title" translatable="yes">Creativity Simulator</property>
<property name="default_width">1000</property>
<property name="default_height">880</property>
<property name="icon">creativity.svg</property>
<property name="icon">creativity-gui.svg</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment