~neon/openmw-wrapper-compatibility-tool

3f1b82a14301ed548201f9919fa8c5e3a3387e09 — Jens Pitkanen 3 years ago
Add compatibility tool
3 files changed, 37 insertions(+), 0 deletions(-)

A compatibilitytool.vdf
A launchmw
A toolmanifest.vdf
A  => compatibilitytool.vdf +23 -0
@@ 1,23 @@
"compatibilitytools"
{
  "compat_tools"
  {
    "openmw-wrapper-compatibility-tool" // Internal name of this tool
    {
      // Can register this tool with Steam in two ways:
      //
      // - The tool can be placed as a subdirectory in compatibilitytools.d, in which case this
      //   should be '.'
      //
      // - This manifest can be placed directly in compatibilitytools.d, in which case this should
      //   be the relative or absolute path to the tool's dist directory.
      "install_path" "."

      // For this template, we're going to substitute the display_name key in here, e.g.:
      "display_name" "OpenMW Wrapper"

      "from_oslist"  "windows"
      "to_oslist"    "linux"
    }
  }
}

A  => launchmw +10 -0
@@ 1,10 @@
#!/bin/sh

# Steam will call this script multiple times, with $1 seemingly being
# the executable it wants to run. The idea of the script is to run
# `openmw` when Steam requests us to run "Morrowind Launcher.exe".

EXECUTABLE_FILENAME="$(echo $1 | xargs -d'/' -l1 | grep -v "^$" | tail -n1)"
if [ "$EXECUTABLE_FILENAME" = "Morrowind Launcher.exe"  ]; then
    openmw
fi

A  => toolmanifest.vdf +4 -0
@@ 1,4 @@
"manifest"
{
  "commandline" "/launchmw"
}