Installer heroes-of-might-and-magic-windows-gog-v1

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
game:
  main_file: $GAMEDIR/MightAndMagic.conf
installer:
- write_file:
    content: '#!/bin/bash

      src=$1

      dst=$2

      file=$3

      src_path=$(echo "$src" | sed -r "s/(.+)\/.+/\1/")

      find "$src_path" -type f \( -name $file \) -exec cp {} "$dst" \;'
    file: $CACHE/selectcopy2.sh
- chmodx: $CACHE/selectcopy2.sh
- extract:
    dst: $CACHE
    file: $inno
- execute:
    args: -d "$CACHE" "$game"
    file: $CACHE/innoextract
- execute:
    args: $GAMEDIR/HoMM $GAMEDIR/CDD
    file: mkdir
- execute:
    args: $CACHE $GAMEDIR *.pdf
    file: $CACHE/selectcopy2.sh
- execute:
    args: $CACHE $GAMEDIR/HoMM HEROES.*
    file: $CACHE/selectcopy2.sh
- execute:
    args: $CACHE $GAMEDIR/HoMM SETUP.EXE
    file: $CACHE/selectcopy2.sh
- execute:
    args: $CACHE $GAMEDIR/CDD homm1.gog
    file: $CACHE/selectcopy2.sh
- execute:
    args: $GAMEDIR/HoMM/cloud_saves
    file: mkdir
- copy:
    dst: $GAMEDIR/HoMM/HELP
    src: $CACHE/HELP
- copy:
    dst: $GAMEDIR/HoMM/DATA
    src: $CACHE/DATA
- copy:
    dst: $GAMEDIR/HoMM/GAMES
    src: $CACHE/GAMES
- copy:
    dst: $GAMEDIR/HoMM/MAPS
    src: $CACHE/MAPS
- write_file:
    content: '[sdl]

      sensitivity=20

      fullresolution=desktop

      windowresolution=original

      fullscreen=true

      output=opengl

      [render]

      aspect=true

      scaler=normal2x

      [autoexec]

      @echo off

      mount C "$GAMEDIR/" -t dir

      mount C "$GAMEDIR/HoMM/cloud_saves" -t overlay

      imgmount d "$GAMEDIR/CDD/homm1.gog" -t iso

      C:

      ECHO OFF

      goto launcher


      :launcher

      cls

      ECHO  ------------------------------------------

      ECHO   Heroes of Might and Magic Launcher

      ECHO  ------------------------------------------

      ECHO   1) Heroes of Might and Magic

      ECHO   2) Game DOS Settings

      ECHO  ------------------------------------------

      ECHO   3) exit program

      ECHO  ------------------------------------------


      choice /c123 /s Which program do you want to run? [1-3]: /n

      if errorlevel 3 goto exit

      if errorlevel 2 goto setup

      if errorlevel 1 goto game


      :game

      cls

      cd HoMM

      loadfix -4 heroes.exe

      goto exit


      :setup

      cls

      cd HoMM

      setup.exe

      goto launcher


      :exit

      exit'
    file: $GAMEDIR/MightAndMagic.conf
description: null
game_slug: heroes-of-might-and-magic
gogslug: heroes_of_might_and_magic
humblestoreid: ''
installer_slug: heroes-of-might-and-magic-windows-gog-v1
name: Heroes of Might and Magic
notes: ''
runner: dosbox
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
  game:
    main_file: $GAMEDIR/MightAndMagic.conf
  installer:
  - write_file:
      content: '#!/bin/bash

        src=$1

        dst=$2

        file=$3

        src_path=$(echo "$src" | sed -r "s/(.+)\/.+/\1/")

        find "$src_path" -type f \( -name $file \) -exec cp {} "$dst" \;'
      file: $CACHE/selectcopy2.sh
  - chmodx: $CACHE/selectcopy2.sh
  - extract:
      dst: $CACHE
      file: $inno
  - execute:
      args: -d "$CACHE" "$game"
      file: $CACHE/innoextract
  - execute:
      args: $GAMEDIR/HoMM $GAMEDIR/CDD
      file: mkdir
  - execute:
      args: $CACHE $GAMEDIR *.pdf
      file: $CACHE/selectcopy2.sh
  - execute:
      args: $CACHE $GAMEDIR/HoMM HEROES.*
      file: $CACHE/selectcopy2.sh
  - execute:
      args: $CACHE $GAMEDIR/HoMM SETUP.EXE
      file: $CACHE/selectcopy2.sh
  - execute:
      args: $CACHE $GAMEDIR/CDD homm1.gog
      file: $CACHE/selectcopy2.sh
  - execute:
      args: $GAMEDIR/HoMM/cloud_saves
      file: mkdir
  - copy:
      dst: $GAMEDIR/HoMM/HELP
      src: $CACHE/HELP
  - copy:
      dst: $GAMEDIR/HoMM/DATA
      src: $CACHE/DATA
  - copy:
      dst: $GAMEDIR/HoMM/GAMES
      src: $CACHE/GAMES
  - copy:
      dst: $GAMEDIR/HoMM/MAPS
      src: $CACHE/MAPS
  - write_file:
      content: '[sdl]

        sensitivity=20

        fullresolution=desktop

        windowresolution=original

        fullscreen=true

        output=opengl

        [render]

        aspect=true

        scaler=normal2x

        [autoexec]

        @echo off

        mount C "$GAMEDIR/" -t dir

        mount C "$GAMEDIR/HoMM/cloud_saves" -t overlay

        imgmount d "$GAMEDIR/CDD/homm1.gog" -t iso

        C:

        ECHO OFF

        goto launcher


        :launcher

        cls

        ECHO  ------------------------------------------

        ECHO   Heroes of Might and Magic Launcher

        ECHO  ------------------------------------------

        ECHO   1) Heroes of Might and Magic

        ECHO   2) Game DOS Settings

        ECHO  ------------------------------------------

        ECHO   3) exit program

        ECHO  ------------------------------------------


        choice /c123 /s Which program do you want to run? [1-3]: /n

        if errorlevel 3 goto exit

        if errorlevel 2 goto setup

        if errorlevel 1 goto game


        :game

        cls

        cd HoMM

        loadfix -4 heroes.exe

        goto exit


        :setup

        cls

        cd HoMM

        setup.exe

        goto launcher


        :exit

        exit'
      file: $GAMEDIR/MightAndMagic.conf
slug: heroes-of-might-and-magic-windows-gog-v1
steamid: null
version: Windows GOG V1
year: 1995
{
  "game_slug": "heroes-of-might-and-magic",
  "version": "Windows GOG V1",
  "description": null,
  "notes": "",
  "name": "Heroes of Might and Magic",
  "year": 1995,
  "steamid": null,
  "gogslug": "heroes_of_might_and_magic",
  "humblestoreid": "",
  "runner": "dosbox",
  "slug": "heroes-of-might-and-magic-windows-gog-v1",
  "installer_slug": "heroes-of-might-and-magic-windows-gog-v1",
  "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"
      }
    ],
    "game": {
      "main_file": "$GAMEDIR/MightAndMagic.conf"
    },
    "installer": [
      {
        "write_file": {
          "content": "#!/bin/bash\nsrc=$1\ndst=$2\nfile=$3\nsrc_path=$(echo \"$src\" | sed -r \"s/(.+)\\/.+/\\1/\")\nfind \"$src_path\" -type f \\( -name $file \\) -exec cp {} \"$dst\" \\;",
          "file": "$CACHE/selectcopy2.sh"
        }
      },
      {
        "chmodx": "$CACHE/selectcopy2.sh"
      },
      {
        "extract": {
          "dst": "$CACHE",
          "file": "$inno"
        }
      },
      {
        "execute": {
          "args": "-d \"$CACHE\" \"$game\"",
          "file": "$CACHE/innoextract"
        }
      },
      {
        "execute": {
          "args": "$GAMEDIR/HoMM $GAMEDIR/CDD",
          "file": "mkdir"
        }
      },
      {
        "execute": {
          "args": "$CACHE $GAMEDIR *.pdf",
          "file": "$CACHE/selectcopy2.sh"
        }
      },
      {
        "execute": {
          "args": "$CACHE $GAMEDIR/HoMM HEROES.*",
          "file": "$CACHE/selectcopy2.sh"
        }
      },
      {
        "execute": {
          "args": "$CACHE $GAMEDIR/HoMM SETUP.EXE",
          "file": "$CACHE/selectcopy2.sh"
        }
      },
      {
        "execute": {
          "args": "$CACHE $GAMEDIR/CDD homm1.gog",
          "file": "$CACHE/selectcopy2.sh"
        }
      },
      {
        "execute": {
          "args": "$GAMEDIR/HoMM/cloud_saves",
          "file": "mkdir"
        }
      },
      {
        "copy": {
          "dst": "$GAMEDIR/HoMM/HELP",
          "src": "$CACHE/HELP"
        }
      },
      {
        "copy": {
          "dst": "$GAMEDIR/HoMM/DATA",
          "src": "$CACHE/DATA"
        }
      },
      {
        "copy": {
          "dst": "$GAMEDIR/HoMM/GAMES",
          "src": "$CACHE/GAMES"
        }
      },
      {
        "copy": {
          "dst": "$GAMEDIR/HoMM/MAPS",
          "src": "$CACHE/MAPS"
        }
      },
      {
        "write_file": {
          "content": "[sdl]\nsensitivity=20\nfullresolution=desktop\nwindowresolution=original\nfullscreen=true\noutput=opengl\n[render]\naspect=true\nscaler=normal2x\n[autoexec]\n@echo off\nmount C \"$GAMEDIR/\" -t dir\nmount C \"$GAMEDIR/HoMM/cloud_saves\" -t overlay\nimgmount d \"$GAMEDIR/CDD/homm1.gog\" -t iso\nC:\nECHO OFF\ngoto launcher\n\n:launcher\ncls\nECHO  ------------------------------------------\nECHO   Heroes of Might and Magic Launcher\nECHO  ------------------------------------------\nECHO   1) Heroes of Might and Magic\nECHO   2) Game DOS Settings\nECHO  ------------------------------------------\nECHO   3) exit program\nECHO  ------------------------------------------\n\nchoice /c123 /s Which program do you want to run? [1-3]: /n\nif errorlevel 3 goto exit\nif errorlevel 2 goto setup\nif errorlevel 1 goto game\n\n:game\ncls\ncd HoMM\nloadfix -4 heroes.exe\ngoto exit\n\n:setup\ncls\ncd HoMM\nsetup.exe\ngoto launcher\n\n:exit\nexit",
          "file": "$GAMEDIR/MightAndMagic.conf"
        }
      }
    ]
  }
}
Back to game