Installer wing-commander-iv-the-price-o-gog-dos

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:
- wing4dos: N/A:Please select the GOG.com Wing Commander 4 Archive wing_commander_4_dos_english.zip
- innoextract: http://constexpr.org/innoextract/files/snapshots/innoextract-1.8-dev-2019-01-13/innoextract-1.8-dev-2019-01-13-linux.tar.xz
game:
  args: -noconsole
  config_file: $GAMEDIR/dosbox_wc4.conf
  main_file: $GAMEDIR/WC4/WC4.EXE
  working_dir: $GAMEDIR
installer:
- extract:
    dst: $CACHE/inno
    file: $innoextract
- extract:
    dst: $CACHE/arcext
    file: $wing4dos
- execute:
    args: --extract $CACHE/arcext/setup_wing_commander4_bonus_2.0.0.2.exe --output-dir
      $CACHE/winggame --gog
    file: $CACHE/inno/innoextract
- merge:
    dst: $GAMEDIR/WC4
    src: $CACHE/winggame/game/WC4
- merge:
    dst: $GAMEDIR/CD1
    src: $CACHE/winggame/game/CD1
- merge:
    dst: $GAMEDIR
    src: $CACHE/winggame/support/app/dosbox_wc4.conf
- input_menu:
    description: Choose your desktop resolution
    id: RES
    options:
    - 3840x2160: 3840x2160
    - 2560x1440: 2560x1440
    - 1600x1200: 1600x1200
    - 1920x1200: 1920x1200
    - 1920x1080: 1920x1080
    - 1280x1024: 1280x1024
    - 1600x900: 1600x900
    - 1440x900: 1440x900
    - 1280x800: 1280x800
    - 1366x768: 1366x768
    - 1360x768: 1360x768
    - 1024x768: 1024x768
    - 1280x720: 1280x720
    preselect: 1920x1080
- write_config:
    file: $GAMEDIR/dosbox_wc4.conf
    key: output
    section: sdl
    value: openglnb
- write_config:
    file: $GAMEDIR/dosbox_wc4.conf
    key: scaler
    section: render
    value: none
- write_config:
    file: $GAMEDIR/dosbox_wc4.conf
    key: aspect
    section: render
    value: true
- write_config:
    file: $GAMEDIR/dosbox_wc4.conf
    key: fullresolution
    section: sdl
    value: $INPUT_RES
- write_file:
    content: "[autoexec]\n@echo off\ncls\t\nmount c \"$GAMEDIR\"\nmount d \"$GAMEDIR/CD1\"\
      \ -t cdrom\nc:\ncd WC4\ncls\nWC4.exe\nexit\n"
    file: $GAMEDIR/dosbox_wc4.conf
    mode: a
{
  "files": [
    {
      "wing4dos": "N/A:Please select the GOG.com Wing Commander 4 Archive wing_commander_4_dos_english.zip"
    },
    {
      "innoextract": "http://constexpr.org/innoextract/files/snapshots/innoextract-1.8-dev-2019-01-13/innoextract-1.8-dev-2019-01-13-linux.tar.xz"
    }
  ],
  "game": {
    "args": "-noconsole",
    "config_file": "$GAMEDIR/dosbox_wc4.conf",
    "main_file": "$GAMEDIR/WC4/WC4.EXE",
    "working_dir": "$GAMEDIR"
  },
  "installer": [
    {
      "extract": {
        "dst": "$CACHE/inno",
        "file": "$innoextract"
      }
    },
    {
      "extract": {
        "dst": "$CACHE/arcext",
        "file": "$wing4dos"
      }
    },
    {
      "execute": {
        "args": "--extract $CACHE/arcext/setup_wing_commander4_bonus_2.0.0.2.exe --output-dir $CACHE/winggame --gog",
        "file": "$CACHE/inno/innoextract"
      }
    },
    {
      "merge": {
        "dst": "$GAMEDIR/WC4",
        "src": "$CACHE/winggame/game/WC4"
      }
    },
    {
      "merge": {
        "dst": "$GAMEDIR/CD1",
        "src": "$CACHE/winggame/game/CD1"
      }
    },
    {
      "merge": {
        "dst": "$GAMEDIR",
        "src": "$CACHE/winggame/support/app/dosbox_wc4.conf"
      }
    },
    {
      "input_menu": {
        "description": "Choose your desktop resolution",
        "id": "RES",
        "options": [
          {
            "3840x2160": "3840x2160"
          },
          {
            "2560x1440": "2560x1440"
          },
          {
            "1600x1200": "1600x1200"
          },
          {
            "1920x1200": "1920x1200"
          },
          {
            "1920x1080": "1920x1080"
          },
          {
            "1280x1024": "1280x1024"
          },
          {
            "1600x900": "1600x900"
          },
          {
            "1440x900": "1440x900"
          },
          {
            "1280x800": "1280x800"
          },
          {
            "1366x768": "1366x768"
          },
          {
            "1360x768": "1360x768"
          },
          {
            "1024x768": "1024x768"
          },
          {
            "1280x720": "1280x720"
          }
        ],
        "preselect": "1920x1080"
      }
    },
    {
      "write_config": {
        "file": "$GAMEDIR/dosbox_wc4.conf",
        "key": "output",
        "section": "sdl",
        "value": "openglnb"
      }
    },
    {
      "write_config": {
        "file": "$GAMEDIR/dosbox_wc4.conf",
        "key": "scaler",
        "section": "render",
        "value": "none"
      }
    },
    {
      "write_config": {
        "file": "$GAMEDIR/dosbox_wc4.conf",
        "key": "aspect",
        "section": "render",
        "value": true
      }
    },
    {
      "write_config": {
        "file": "$GAMEDIR/dosbox_wc4.conf",
        "key": "fullresolution",
        "section": "sdl",
        "value": "$INPUT_RES"
      }
    },
    {
      "write_file": {
        "content": "[autoexec]\n@echo off\ncls\t\nmount c \"$GAMEDIR\"\nmount d \"$GAMEDIR/CD1\" -t cdrom\nc:\ncd WC4\ncls\nWC4.exe\nexit\n",
        "file": "$GAMEDIR/dosbox_wc4.conf",
        "mode": "a"
      }
    }
  ]
}
Back to game