Merge remote-tracking branch 'scrawl/cmdline-savegame'

openmw-35
Marc Zinnschlag 10 years ago
commit f8a3ec3ee3

@ -366,6 +366,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()
@ -431,6 +433,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")

@ -61,7 +61,8 @@ void MWState::Character::addSlot (const ESM::SavedGame& profile)
stream << "_";
}
slot.mPath = mPath / stream.str();
const std::string ext = ".omwsave";
slot.mPath = mPath / (stream.str() + ext);
// Append an index if necessary to ensure a unique file
int i=0;
@ -70,7 +71,7 @@ void MWState::Character::addSlot (const ESM::SavedGame& profile)
std::ostringstream test;
test << stream.str();
test << " - " << ++i;
slot.mPath = mPath / test.str();
slot.mPath = mPath / (test.str() + ext);
}
slot.mProfile = profile;

@ -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