Add freedesktop.org mimeinfo for OpenMW save game files

This allows us to launch OpenMW when the user opens a save game file through the file manager.
openmw-35
scrawl 10 years ago
parent 4684014a83
commit 94002b0758

@ -386,6 +386,8 @@ configure_file(${OpenMW_SOURCE_DIR}/files/opencs/defaultfilters
if (NOT WIN32 AND NOT APPLE)
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.desktop
"${OpenMW_BINARY_DIR}/openmw.desktop")
configure_file(${OpenMW_SOURCE_DIR}/files/openmw-mimeinfo.xml
"${OpenMW_BINARY_DIR}/openmw-mimeinfo.xml")
configure_file(${OpenMW_SOURCE_DIR}/files/opencs.desktop
"${OpenMW_BINARY_DIR}/opencs.desktop")
endif()
@ -451,6 +453,7 @@ IF(NOT WIN32 AND NOT APPLE)
# Install icon and desktop file
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.desktop" DESTINATION "${DATAROOTDIR}/applications" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw-mimeinfo.xml" DESTINATION "${DATAROOTDIR}/mime/packages" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_SOURCE_DIR}/files/launcher/images/openmw.png" DESTINATION "${ICONDIR}" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
IF(BUILD_OPENCS)
INSTALL(FILES "${OpenMW_BINARY_DIR}/opencs.desktop" DESTINATION "${DATAROOTDIR}/applications" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "opencs")

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-openmw-savegame">
<icon name="openmw" />
<generic-icon name="applications-games"/>
<comment>OpenMW Savegame</comment>
<glob weight="60" pattern="*.omwsave"/>
</mime-type>
</mime-info>

@ -8,3 +8,16 @@ TryExec=omwlauncher
Exec=omwlauncher
Icon=openmw
Categories=Game;RolePlaying;
[Desktop Entry]
Type=Application
Name=OpenMW
GenericName=Role Playing Game
Comment=An engine replacement for The Elder Scrolls III: Morrowind
Keywords=Morrowind;Reimplementation Mods;esm;bsa;
Exec=openmw --load-savegame=%f
Icon=openmw
Categories=Game;RolePlaying;
Terminal=false
NoDisplay=true
MimeType=application/x-openmw-savegame;

Loading…
Cancel
Save