Installer might-and-magic-4-5-world-of-windows-gog-v1

This script is for reference only and can't be directly used to install the game in the Lutris client. To install the game, download the full script.

files:
- game: N/A:Select GOG installer.
- inno: https://lutris.nyc3.digitaloceanspaces.com/tools/innoextract/innoextract-1.8-dev-2019-01-13-linux.tar.xz
- xcopy: https://github.com/appoloin/WfW/raw/master/XCOPY.EXE
game:
  game_id: worldofxeen
  path: $GAMEDIR
installer:
- write_file:
    content: '#!/bin/bash

      src=$1

      dst=$2

      find "$src" -maxdepth 1 -type f \( -iname "*.pdf" -o -iname "BOSS.MM$" -o -iname
      "XEEN.*" -o -iname "*.EXE" -o -iname "INTRO.CC" -o -iname "GAME1.GOG" \) -exec
      cp {} "$dst" \;'
    file: $CACHE/selectcopy.sh
- chmodx: $CACHE/selectcopy.sh
- write_file:
    content: '#!/bin/bash

      src=$1

      dst=$2

      echo $dst

      find "$src" -maxdepth 1 -type f -iname "*.ogg" -print0 |

      while IFS="" read -r -d "" FILENAME;

      do name="${FILENAME##*/}"

      mv "$FILENAME" "$dst""/""${name/xeen/Track}";

      done '
    file: $CACHE/copyrename.sh
- chmodx: $CACHE/copyrename.sh
- extract:
    dst: $CACHE
    file: $inno
- execute:
    args: -d "$CACHE" "$game"
    file: $CACHE/innoextract
- copy:
    dst: $GAMEDIR
    src: $xcopy
- execute:
    args: $CACHE $GAMEDIR
    file: $CACHE/selectcopy.sh
- execute:
    args: $CACHE/MUSIC $GAMEDIR
    file: $CACHE/copyrename.sh
- write_file:
    content: '[autoexec]

      mount C "$GAMEDIR" -t dir

      imgmount D "$GAMEDIR/GAME1.GOG" -t iso

      ver set 6 22

      D:

      CD GAME

      C:\xcopy.exe /E *.CC C:\

      exit'
    file: $CACHE/MM45.conf
- task:
    config_file: $CACHE/MM45.conf
    name: dosbox.dosexec
    working_dir: $GAMEDIR
- execute:
    args: -r $GAMEDIR/GAME1.GOG
    file: /bin/rm
- execute:
    args: -r $GAMEDIR/XCOPY.EXE
    file: /bin/rm
scummvm:
  fullscreen: true
{
  "files": [
    {
      "game": "N/A:Select GOG installer."
    },
    {
      "inno": "https://lutris.nyc3.digitaloceanspaces.com/tools/innoextract/innoextract-1.8-dev-2019-01-13-linux.tar.xz"
    },
    {
      "xcopy": "https://github.com/appoloin/WfW/raw/master/XCOPY.EXE"
    }
  ],
  "game": {
    "game_id": "worldofxeen",
    "path": "$GAMEDIR"
  },
  "installer": [
    {
      "write_file": {
        "content": "#!/bin/bash\nsrc=$1\ndst=$2\nfind \"$src\" -maxdepth 1 -type f \\( -iname \"*.pdf\" -o -iname \"BOSS.MM$\" -o -iname \"XEEN.*\" -o -iname \"*.EXE\" -o -iname \"INTRO.CC\" -o -iname \"GAME1.GOG\" \\) -exec cp {} \"$dst\" \\;",
        "file": "$CACHE/selectcopy.sh"
      }
    },
    {
      "chmodx": "$CACHE/selectcopy.sh"
    },
    {
      "write_file": {
        "content": "#!/bin/bash\nsrc=$1\ndst=$2\necho $dst\nfind \"$src\" -maxdepth 1 -type f -iname \"*.ogg\" -print0 |\nwhile IFS=\"\" read -r -d \"\" FILENAME;\ndo name=\"${FILENAME##*/}\"\nmv \"$FILENAME\" \"$dst\"\"/\"\"${name/xeen/Track}\";\ndone ",
        "file": "$CACHE/copyrename.sh"
      }
    },
    {
      "chmodx": "$CACHE/copyrename.sh"
    },
    {
      "extract": {
        "dst": "$CACHE",
        "file": "$inno"
      }
    },
    {
      "execute": {
        "args": "-d \"$CACHE\" \"$game\"",
        "file": "$CACHE/innoextract"
      }
    },
    {
      "copy": {
        "dst": "$GAMEDIR",
        "src": "$xcopy"
      }
    },
    {
      "execute": {
        "args": "$CACHE $GAMEDIR",
        "file": "$CACHE/selectcopy.sh"
      }
    },
    {
      "execute": {
        "args": "$CACHE/MUSIC $GAMEDIR",
        "file": "$CACHE/copyrename.sh"
      }
    },
    {
      "write_file": {
        "content": "[autoexec]\nmount C \"$GAMEDIR\" -t dir\nimgmount D \"$GAMEDIR/GAME1.GOG\" -t iso\nver set 6 22\nD:\nCD GAME\nC:\\xcopy.exe /E *.CC C:\\\nexit",
        "file": "$CACHE/MM45.conf"
      }
    },
    {
      "task": {
        "config_file": "$CACHE/MM45.conf",
        "name": "dosbox.dosexec",
        "working_dir": "$GAMEDIR"
      }
    },
    {
      "execute": {
        "args": "-r $GAMEDIR/GAME1.GOG",
        "file": "/bin/rm"
      }
    },
    {
      "execute": {
        "args": "-r $GAMEDIR/XCOPY.EXE",
        "file": "/bin/rm"
      }
    }
  ],
  "scummvm": {
    "fullscreen": true
  }
}
Back to game