Installer conflict-desert-storm-gog

files:
- goginstaller: 'N/A:Please select the GOG installer for this game:'
- dgvoodoo2: https://web.archive.org/web/20230906195705/http://dege.fw.hu/dgVoodoo2/bin/dgVoodoo2_81_3.zip
- dsoal: https://github.com/ThreeDeeJay/dsoal/releases/latest/download/DSOAL.zip
- openal_soft: https://openal-soft.org/openal-binaries/openal-soft-$ALSOFT_VER_LATEST-bin.zip
game:
  exe: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/DesertStorm.exe
  launch_configs:
  - exe: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dgVoodooCpl.exe
    name: dgVoodoo Control Panel
  - exe: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/manual.pdf
    name: Manual
  prefix: $GAMEDIR
installer:
- task:
    install_gecko: false
    install_mono: false
    name: create_prefix
- task:
    args: /SP- /NOCANCEL /VERYSILENT /SUPPRESSMSGBOXES /NOGUI
    executable: $goginstaller
    name: wineexec
- task:
    key: AdapterIndex
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000000'
- task:
    key: Decals
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000001'
- task:
    key: DetailTextures
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000001'
- task:
    key: DrawDistance
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000001'
- task:
    key: EnvironmentMaps
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000001'
- task:
    key: PShaders
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000001'
- task:
    key: ResolutionIndex
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000000'
- task:
    key: Shadows
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000001'
- task:
    key: ShrubLevel
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000000'
- task:
    key: TextureResolution
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000000'
- task:
    key: VShaders
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert Storm\Device
      Settings
    type: REG_DWORD
    value: '00000001'
- extract:
    description: "Installing \u201CdgVoodoo2\u201D (by Dege)."
    dst: $CACHE/dgvoodoo2
    file: $dgvoodoo2
- move:
    dst: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm
    src: $CACHE/dgvoodoo2/dgVoodooCpl.exe
- move:
    dst: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm
    src: $CACHE/dgvoodoo2/MS/x86/D3D8.dll
- write_config:
    data:
      DirectX:
        Antialiasing: 8x
        Filtering: trilinear
        Resolution: max
        VRAM: '4096'
        VideoCard: geforce_ti_4800
        dgVoodooWatermark: 'false'
      DirectXExt:
        Default3DRenderFormat: argb16161616
        DefaultEnumeratedResolutions: none
        EnumeratedResolutionBitdepths: '32'
        ExtraEnumeratedResolutions: 800x600
      General:
        ScalingMode: stretched_ar
    file: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dgVoodoo.conf
    merge: false
- extract:
    description: "Installing \u201CDSOAL\u201D (by kcat)."
    dst: $CACHE/dsoal
    file: $dsoal
- move:
    dst: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm
    src: $CACHE/dsoal/Win32/dsound.dll
- extract:
    description: "Installing \u201COpenAL Soft\u201D (by kcat)."
    dst: $CACHE/openal-soft
    file: $openal_soft
- move:
    dst: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dsoal-aldrv.dll
    src: $CACHE/openal-soft/bin/Win32/soft_oal.dll
- write_config:
    data:
      general:
        channels: stereo
        drivers: -dsound,
        stereo-mode: headphones
    file: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/alsoft.ini
- write_file:
    content: "#!/usr/bin/env python3\n\nimport configparser\nimport os\nimport subprocess\n\
      import sys\n\n\ndef get_resolution():\n    result: str = subprocess.run(\n \
      \       ['xrandr'],\n        capture_output = True,\n        check = True,\n\
      \        text = True\n    )\n    for line in result.stdout.splitlines():\n \
      \       if '*' in line:\n            resolution = line.split()[0]\n        \
      \    hor, vert = map(int, resolution.split('x'))\n            if hor > 0 and\
      \ vert > 0:\n                return hor, vert\n\n\ndef get_scaled_resolution(resolution):\n\
      \    hor: int = int(resolution[0])\n    vert: int = int(resolution[1])\n   \
      \ ar_inverse: float = vert / hor\n\n    if 0.75 < ar_inverse or hor < 800:\n\
      \        return 800, round(800 * ar_inverse)\n    elif vert > 600:\n       \
      \ return round(600 / ar_inverse), 600\n    else:\n        return hor, vert\n\
      \n\ndef write_config_dgvoodoo():\n    resolution = get_resolution()\n    resolution_scaled\
      \ = get_scaled_resolution(resolution)\n\n    if sys.version_info >= (3, 13):\n\
      \        config = configparser.ConfigParser(\n            allow_no_value=True,\n\
      \            allow_unnamed_section=True,\n        )\n    else:\n        config\
      \ = configparser.ConfigParser(\n            allow_no_value=True,\n        )\n\
      \    config.optionxform = lambda option: option\n    config.read('dgVoodoo.conf')\n\
      \    config['DirectXExt']['ExtraEnumeratedResolutions'] = (\n        str(resolution_scaled[0])\
      \ + 'x' + str(resolution_scaled[1])\n    )\n    with open('dgVoodoo.conf', 'w')\
      \ as configfile:\n        config.write(configfile)\n\n\nos.chdir(os.path.dirname(os.path.abspath(__file__)))\n\
      \nwrite_config_dgvoodoo()\n"
    file: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/$PRELAUNCH_NAME
- chmodx: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/$PRELAUNCH_NAME
require-binaries: xrandr
system:
  env:
    MANGOHUD_CONFIG: no_display,fps_limit=30
  mangohud: true
  prelaunch_command: $GAMEDIR/drive_c/GOG\ Games/Conflict\ -\ Desert\ Storm/$PRELAUNCH_NAME
  prelaunch_wait: true
variables:
  ALSOFT_VER_LATEST: 1.23.1
  PRELAUNCH_NAME: lutris.prelaunch.py
wine:
  overrides:
    d3d8: n,b
    dsound: n,b
description: ''
game_slug: conflict-desert-storm
gogslug: conflict_desert_storm
humblestoreid: ''
installer_slug: conflict-desert-storm-gog
name: 'Conflict: Desert Storm'
notes: "Fixes:\r\n\t-\tSupports native desktop resolution.\r\n\t-\tCorrectly scales\
  \ in\u2010game GUI to match intended presentation at 600 lines.\r\n\t-\tFramerate\
  \ is limited to 30 FPS (requires MangoHud), as certain gameplay elements are affected.\r\
  \n\t-\tRestores 3D audio (DSOAL and OpenAL Soft)."
runner: wine
script:
  files:
  - goginstaller: 'N/A:Please select the GOG installer for this game:'
  - dgvoodoo2: https://web.archive.org/web/20230906195705/http://dege.fw.hu/dgVoodoo2/bin/dgVoodoo2_81_3.zip
  - dsoal: https://github.com/ThreeDeeJay/dsoal/releases/latest/download/DSOAL.zip
  - openal_soft: https://openal-soft.org/openal-binaries/openal-soft-$ALSOFT_VER_LATEST-bin.zip
  game:
    exe: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/DesertStorm.exe
    launch_configs:
    - exe: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dgVoodooCpl.exe
      name: dgVoodoo Control Panel
    - exe: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/manual.pdf
      name: Manual
    prefix: $GAMEDIR
  installer:
  - task:
      install_gecko: false
      install_mono: false
      name: create_prefix
  - task:
      args: /SP- /NOCANCEL /VERYSILENT /SUPPRESSMSGBOXES /NOGUI
      executable: $goginstaller
      name: wineexec
  - task:
      key: AdapterIndex
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000000'
  - task:
      key: Decals
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000001'
  - task:
      key: DetailTextures
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000001'
  - task:
      key: DrawDistance
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000001'
  - task:
      key: EnvironmentMaps
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000001'
  - task:
      key: PShaders
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000001'
  - task:
      key: ResolutionIndex
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000000'
  - task:
      key: Shadows
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000001'
  - task:
      key: ShrubLevel
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000000'
  - task:
      key: TextureResolution
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000000'
  - task:
      key: VShaders
      name: set_regedit
      path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Pivotal Games\Conflict Desert
        Storm\Device Settings
      type: REG_DWORD
      value: '00000001'
  - extract:
      description: "Installing \u201CdgVoodoo2\u201D (by Dege)."
      dst: $CACHE/dgvoodoo2
      file: $dgvoodoo2
  - move:
      dst: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm
      src: $CACHE/dgvoodoo2/dgVoodooCpl.exe
  - move:
      dst: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm
      src: $CACHE/dgvoodoo2/MS/x86/D3D8.dll
  - write_config:
      data:
        DirectX:
          Antialiasing: 8x
          Filtering: trilinear
          Resolution: max
          VRAM: '4096'
          VideoCard: geforce_ti_4800
          dgVoodooWatermark: 'false'
        DirectXExt:
          Default3DRenderFormat: argb16161616
          DefaultEnumeratedResolutions: none
          EnumeratedResolutionBitdepths: '32'
          ExtraEnumeratedResolutions: 800x600
        General:
          ScalingMode: stretched_ar
      file: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dgVoodoo.conf
      merge: false
  - extract:
      description: "Installing \u201CDSOAL\u201D (by kcat)."
      dst: $CACHE/dsoal
      file: $dsoal
  - move:
      dst: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm
      src: $CACHE/dsoal/Win32/dsound.dll
  - extract:
      description: "Installing \u201COpenAL Soft\u201D (by kcat)."
      dst: $CACHE/openal-soft
      file: $openal_soft
  - move:
      dst: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dsoal-aldrv.dll
      src: $CACHE/openal-soft/bin/Win32/soft_oal.dll
  - write_config:
      data:
        general:
          channels: stereo
          drivers: -dsound,
          stereo-mode: headphones
      file: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/alsoft.ini
  - write_file:
      content: "#!/usr/bin/env python3\n\nimport configparser\nimport os\nimport subprocess\n\
        import sys\n\n\ndef get_resolution():\n    result: str = subprocess.run(\n\
        \        ['xrandr'],\n        capture_output = True,\n        check = True,\n\
        \        text = True\n    )\n    for line in result.stdout.splitlines():\n\
        \        if '*' in line:\n            resolution = line.split()[0]\n     \
        \       hor, vert = map(int, resolution.split('x'))\n            if hor >\
        \ 0 and vert > 0:\n                return hor, vert\n\n\ndef get_scaled_resolution(resolution):\n\
        \    hor: int = int(resolution[0])\n    vert: int = int(resolution[1])\n \
        \   ar_inverse: float = vert / hor\n\n    if 0.75 < ar_inverse or hor < 800:\n\
        \        return 800, round(800 * ar_inverse)\n    elif vert > 600:\n     \
        \   return round(600 / ar_inverse), 600\n    else:\n        return hor, vert\n\
        \n\ndef write_config_dgvoodoo():\n    resolution = get_resolution()\n    resolution_scaled\
        \ = get_scaled_resolution(resolution)\n\n    if sys.version_info >= (3, 13):\n\
        \        config = configparser.ConfigParser(\n            allow_no_value=True,\n\
        \            allow_unnamed_section=True,\n        )\n    else:\n        config\
        \ = configparser.ConfigParser(\n            allow_no_value=True,\n       \
        \ )\n    config.optionxform = lambda option: option\n    config.read('dgVoodoo.conf')\n\
        \    config['DirectXExt']['ExtraEnumeratedResolutions'] = (\n        str(resolution_scaled[0])\
        \ + 'x' + str(resolution_scaled[1])\n    )\n    with open('dgVoodoo.conf',\
        \ 'w') as configfile:\n        config.write(configfile)\n\n\nos.chdir(os.path.dirname(os.path.abspath(__file__)))\n\
        \nwrite_config_dgvoodoo()\n"
      file: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/$PRELAUNCH_NAME
  - chmodx: $GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/$PRELAUNCH_NAME
  require-binaries: xrandr
  system:
    env:
      MANGOHUD_CONFIG: no_display,fps_limit=30
    mangohud: true
    prelaunch_command: $GAMEDIR/drive_c/GOG\ Games/Conflict\ -\ Desert\ Storm/$PRELAUNCH_NAME
    prelaunch_wait: true
  variables:
    ALSOFT_VER_LATEST: 1.23.1
    PRELAUNCH_NAME: lutris.prelaunch.py
  wine:
    overrides:
      d3d8: n,b
      dsound: n,b
slug: conflict-desert-storm-gog
steamid: 211780
version: GOG
year: 2002
{
  "game_slug": "conflict-desert-storm",
  "version": "GOG",
  "description": "",
  "notes": "Fixes:\r\n\t-\tSupports native desktop resolution.\r\n\t-\tCorrectly scales in\u2010game GUI to match intended presentation at 600 lines.\r\n\t-\tFramerate is limited to 30 FPS (requires MangoHud), as certain gameplay elements are affected.\r\n\t-\tRestores 3D audio (DSOAL and OpenAL Soft).",
  "name": "Conflict: Desert Storm",
  "year": 2002,
  "steamid": 211780,
  "gogslug": "conflict_desert_storm",
  "humblestoreid": "",
  "runner": "wine",
  "slug": "conflict-desert-storm-gog",
  "installer_slug": "conflict-desert-storm-gog",
  "script": {
    "files": [
      {
        "goginstaller": "N/A:Please select the GOG installer for this game:"
      },
      {
        "dgvoodoo2": "https://web.archive.org/web/20230906195705/http://dege.fw.hu/dgVoodoo2/bin/dgVoodoo2_81_3.zip"
      },
      {
        "dsoal": "https://github.com/ThreeDeeJay/dsoal/releases/latest/download/DSOAL.zip"
      },
      {
        "openal_soft": "https://openal-soft.org/openal-binaries/openal-soft-$ALSOFT_VER_LATEST-bin.zip"
      }
    ],
    "game": {
      "exe": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/DesertStorm.exe",
      "launch_configs": [
        {
          "exe": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dgVoodooCpl.exe",
          "name": "dgVoodoo Control Panel"
        },
        {
          "exe": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/manual.pdf",
          "name": "Manual"
        }
      ],
      "prefix": "$GAMEDIR"
    },
    "installer": [
      {
        "task": {
          "install_gecko": false,
          "install_mono": false,
          "name": "create_prefix"
        }
      },
      {
        "task": {
          "args": "/SP- /NOCANCEL /VERYSILENT /SUPPRESSMSGBOXES /NOGUI",
          "executable": "$goginstaller",
          "name": "wineexec"
        }
      },
      {
        "task": {
          "key": "AdapterIndex",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000000"
        }
      },
      {
        "task": {
          "key": "Decals",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000001"
        }
      },
      {
        "task": {
          "key": "DetailTextures",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000001"
        }
      },
      {
        "task": {
          "key": "DrawDistance",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000001"
        }
      },
      {
        "task": {
          "key": "EnvironmentMaps",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000001"
        }
      },
      {
        "task": {
          "key": "PShaders",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000001"
        }
      },
      {
        "task": {
          "key": "ResolutionIndex",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000000"
        }
      },
      {
        "task": {
          "key": "Shadows",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000001"
        }
      },
      {
        "task": {
          "key": "ShrubLevel",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000000"
        }
      },
      {
        "task": {
          "key": "TextureResolution",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000000"
        }
      },
      {
        "task": {
          "key": "VShaders",
          "name": "set_regedit",
          "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Pivotal Games\\Conflict Desert Storm\\Device Settings",
          "type": "REG_DWORD",
          "value": "00000001"
        }
      },
      {
        "extract": {
          "description": "Installing \u201cdgVoodoo2\u201d (by Dege).",
          "dst": "$CACHE/dgvoodoo2",
          "file": "$dgvoodoo2"
        }
      },
      {
        "move": {
          "dst": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm",
          "src": "$CACHE/dgvoodoo2/dgVoodooCpl.exe"
        }
      },
      {
        "move": {
          "dst": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm",
          "src": "$CACHE/dgvoodoo2/MS/x86/D3D8.dll"
        }
      },
      {
        "write_config": {
          "data": {
            "DirectX": {
              "Antialiasing": "8x",
              "Filtering": "trilinear",
              "Resolution": "max",
              "VRAM": "4096",
              "VideoCard": "geforce_ti_4800",
              "dgVoodooWatermark": "false"
            },
            "DirectXExt": {
              "Default3DRenderFormat": "argb16161616",
              "DefaultEnumeratedResolutions": "none",
              "EnumeratedResolutionBitdepths": "32",
              "ExtraEnumeratedResolutions": "800x600"
            },
            "General": {
              "ScalingMode": "stretched_ar"
            }
          },
          "file": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dgVoodoo.conf",
          "merge": false
        }
      },
      {
        "extract": {
          "description": "Installing \u201cDSOAL\u201d (by kcat).",
          "dst": "$CACHE/dsoal",
          "file": "$dsoal"
        }
      },
      {
        "move": {
          "dst": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm",
          "src": "$CACHE/dsoal/Win32/dsound.dll"
        }
      },
      {
        "extract": {
          "description": "Installing \u201cOpenAL Soft\u201d (by kcat).",
          "dst": "$CACHE/openal-soft",
          "file": "$openal_soft"
        }
      },
      {
        "move": {
          "dst": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/dsoal-aldrv.dll",
          "src": "$CACHE/openal-soft/bin/Win32/soft_oal.dll"
        }
      },
      {
        "write_config": {
          "data": {
            "general": {
              "channels": "stereo",
              "drivers": "-dsound,",
              "stereo-mode": "headphones"
            }
          },
          "file": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/alsoft.ini"
        }
      },
      {
        "write_file": {
          "content": "#!/usr/bin/env python3\n\nimport configparser\nimport os\nimport subprocess\nimport sys\n\n\ndef get_resolution():\n    result: str = subprocess.run(\n        ['xrandr'],\n        capture_output = True,\n        check = True,\n        text = True\n    )\n    for line in result.stdout.splitlines():\n        if '*' in line:\n            resolution = line.split()[0]\n            hor, vert = map(int, resolution.split('x'))\n            if hor > 0 and vert > 0:\n                return hor, vert\n\n\ndef get_scaled_resolution(resolution):\n    hor: int = int(resolution[0])\n    vert: int = int(resolution[1])\n    ar_inverse: float = vert / hor\n\n    if 0.75 < ar_inverse or hor < 800:\n        return 800, round(800 * ar_inverse)\n    elif vert > 600:\n        return round(600 / ar_inverse), 600\n    else:\n        return hor, vert\n\n\ndef write_config_dgvoodoo():\n    resolution = get_resolution()\n    resolution_scaled = get_scaled_resolution(resolution)\n\n    if sys.version_info >= (3, 13):\n        config = configparser.ConfigParser(\n            allow_no_value=True,\n            allow_unnamed_section=True,\n        )\n    else:\n        config = configparser.ConfigParser(\n            allow_no_value=True,\n        )\n    config.optionxform = lambda option: option\n    config.read('dgVoodoo.conf')\n    config['DirectXExt']['ExtraEnumeratedResolutions'] = (\n        str(resolution_scaled[0]) + 'x' + str(resolution_scaled[1])\n    )\n    with open('dgVoodoo.conf', 'w') as configfile:\n        config.write(configfile)\n\n\nos.chdir(os.path.dirname(os.path.abspath(__file__)))\n\nwrite_config_dgvoodoo()\n",
          "file": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/$PRELAUNCH_NAME"
        }
      },
      {
        "chmodx": "$GAMEDIR/drive_c/GOG Games/Conflict - Desert Storm/$PRELAUNCH_NAME"
      }
    ],
    "require-binaries": "xrandr",
    "system": {
      "env": {
        "MANGOHUD_CONFIG": "no_display,fps_limit=30"
      },
      "mangohud": true,
      "prelaunch_command": "$GAMEDIR/drive_c/GOG\\ Games/Conflict\\ -\\ Desert\\ Storm/$PRELAUNCH_NAME",
      "prelaunch_wait": true
    },
    "variables": {
      "ALSOFT_VER_LATEST": "1.23.1",
      "PRELAUNCH_NAME": "lutris.prelaunch.py"
    },
    "wine": {
      "overrides": {
        "d3d8": "n,b",
        "dsound": "n,b"
      }
    }
  }
}
Back to game