Installer soldier-of-fortune-ii-double-gog-fixes

files:
- installer: N/A:Select the game's setup file
- hudwsfix: https://www.wsgf.org/f/u/contrib/dr/172/hacks/Widescreen_HUD.zip
- suifix: https://github.com/SuiMachine/Soldier-of-Fortune-2-SuisFix/archive/refs/heads/master.zip
game:
  arch: win32
  exe: $GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/SoF2.exe
  gogid: 1228964594
  prefix: $GAMEDIR
installer:
- task:
    args: /VERYSILENT /LANG=en /SP- /NOCANCEL /SUPPRESSMSGBOXES /NOGUI /DIR="C:\GOG
      Games\Soldier of Fortune 2"
    description: Installing Soldier of Fortune II - Double Helix
    executable: installer
    name: wineexec
- extract:
    description: Extract Sui's fix
    dst: $CACHE
    file: suifix
- merge:
    description: Copy Sui's fix to $GAMEDIR
    dst: $GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2
    src: $CACHE/Release/
- extract:
    description: Extract HUD fix
    dst: $GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/base
    file: hudwsfix
- execute:
    command: sed -i 's/Width=1920/Width=$RESOLUTION_WIDTH/g' '$GAMEDIR/drive_c/GOG
      Games/Soldier of Fortune 2/scripts/SoF2-Fixes.ini'
    description: Set desktop resolution in game config
- execute:
    command: sed -i 's/Height=1080/Height=$RESOLUTION_HEIGHT/g' '$GAMEDIR/drive_c/GOG
      Games/Soldier of Fortune 2/scripts/SoF2-Fixes.ini'
    description: Set desktop resolution in game config
- write_file:
    content: '// Generated by SoF2, do not modify

      seta r_customwidth "$RESOLUTION_WIDTH"

      seta r_mode "-1"

      seta r_customheight "$RESOLUTION_HEIGHT"

      seta r_overBrightBits "0"

      seta com_maxfps "60"

      '
    description: Write sof2sp.cfg file for widescreen
    file: $GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/base/sof2sp.cfg
require-binaries: sed
system:
  env:
    MESA_EXTENSION_MAX_YEAR: 2003
    __GL_ExtensionStringVersion: '17700'
description: Includes Sui's Fix and HUD fix. A default config file with changes for
  widescreen, brightness, and 60 FPS cap is written.
game_slug: soldier-of-fortune-ii-double-helix
gogslug: soldier_of_fortune_ii_double_helix_gold_edition
humblestoreid: ''
installer_slug: soldier-of-fortune-ii-double-gog-fixes
name: 'Soldier of Fortune II: Double Helix'
notes: You may need to set your mouse's polling rate to 125hz or there will be jerky
  mouse movement. See PCGamingWiki entry to adjust FOV.
runner: wine
script:
  files:
  - installer: N/A:Select the game's setup file
  - hudwsfix: https://www.wsgf.org/f/u/contrib/dr/172/hacks/Widescreen_HUD.zip
  - suifix: https://github.com/SuiMachine/Soldier-of-Fortune-2-SuisFix/archive/refs/heads/master.zip
  game:
    arch: win32
    exe: $GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/SoF2.exe
    gogid: 1228964594
    prefix: $GAMEDIR
  installer:
  - task:
      args: /VERYSILENT /LANG=en /SP- /NOCANCEL /SUPPRESSMSGBOXES /NOGUI /DIR="C:\GOG
        Games\Soldier of Fortune 2"
      description: Installing Soldier of Fortune II - Double Helix
      executable: installer
      name: wineexec
  - extract:
      description: Extract Sui's fix
      dst: $CACHE
      file: suifix
  - merge:
      description: Copy Sui's fix to $GAMEDIR
      dst: $GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2
      src: $CACHE/Release/
  - extract:
      description: Extract HUD fix
      dst: $GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/base
      file: hudwsfix
  - execute:
      command: sed -i 's/Width=1920/Width=$RESOLUTION_WIDTH/g' '$GAMEDIR/drive_c/GOG
        Games/Soldier of Fortune 2/scripts/SoF2-Fixes.ini'
      description: Set desktop resolution in game config
  - execute:
      command: sed -i 's/Height=1080/Height=$RESOLUTION_HEIGHT/g' '$GAMEDIR/drive_c/GOG
        Games/Soldier of Fortune 2/scripts/SoF2-Fixes.ini'
      description: Set desktop resolution in game config
  - write_file:
      content: '// Generated by SoF2, do not modify

        seta r_customwidth "$RESOLUTION_WIDTH"

        seta r_mode "-1"

        seta r_customheight "$RESOLUTION_HEIGHT"

        seta r_overBrightBits "0"

        seta com_maxfps "60"

        '
      description: Write sof2sp.cfg file for widescreen
      file: $GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/base/sof2sp.cfg
  require-binaries: sed
  system:
    env:
      MESA_EXTENSION_MAX_YEAR: 2003
      __GL_ExtensionStringVersion: '17700'
slug: soldier-of-fortune-ii-double-gog-fixes
steamid: null
version: GOG + fixes
year: 2002
{
  "game_slug": "soldier-of-fortune-ii-double-helix",
  "version": "GOG + fixes",
  "description": "Includes Sui's Fix and HUD fix. A default config file with changes for widescreen, brightness, and 60 FPS cap is written.",
  "notes": "You may need to set your mouse's polling rate to 125hz or there will be jerky mouse movement. See PCGamingWiki entry to adjust FOV.",
  "name": "Soldier of Fortune II: Double Helix",
  "year": 2002,
  "steamid": null,
  "gogslug": "soldier_of_fortune_ii_double_helix_gold_edition",
  "humblestoreid": "",
  "runner": "wine",
  "slug": "soldier-of-fortune-ii-double-gog-fixes",
  "installer_slug": "soldier-of-fortune-ii-double-gog-fixes",
  "script": {
    "files": [
      {
        "installer": "N/A:Select the game's setup file"
      },
      {
        "hudwsfix": "https://www.wsgf.org/f/u/contrib/dr/172/hacks/Widescreen_HUD.zip"
      },
      {
        "suifix": "https://github.com/SuiMachine/Soldier-of-Fortune-2-SuisFix/archive/refs/heads/master.zip"
      }
    ],
    "game": {
      "arch": "win32",
      "exe": "$GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/SoF2.exe",
      "gogid": 1228964594,
      "prefix": "$GAMEDIR"
    },
    "installer": [
      {
        "task": {
          "args": "/VERYSILENT /LANG=en /SP- /NOCANCEL /SUPPRESSMSGBOXES /NOGUI /DIR=\"C:\\GOG Games\\Soldier of Fortune 2\"",
          "description": "Installing Soldier of Fortune II - Double Helix",
          "executable": "installer",
          "name": "wineexec"
        }
      },
      {
        "extract": {
          "description": "Extract Sui's fix",
          "dst": "$CACHE",
          "file": "suifix"
        }
      },
      {
        "merge": {
          "description": "Copy Sui's fix to $GAMEDIR",
          "dst": "$GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2",
          "src": "$CACHE/Release/"
        }
      },
      {
        "extract": {
          "description": "Extract HUD fix",
          "dst": "$GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/base",
          "file": "hudwsfix"
        }
      },
      {
        "execute": {
          "command": "sed -i 's/Width=1920/Width=$RESOLUTION_WIDTH/g' '$GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/scripts/SoF2-Fixes.ini'",
          "description": "Set desktop resolution in game config"
        }
      },
      {
        "execute": {
          "command": "sed -i 's/Height=1080/Height=$RESOLUTION_HEIGHT/g' '$GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/scripts/SoF2-Fixes.ini'",
          "description": "Set desktop resolution in game config"
        }
      },
      {
        "write_file": {
          "content": "// Generated by SoF2, do not modify\nseta r_customwidth \"$RESOLUTION_WIDTH\"\nseta r_mode \"-1\"\nseta r_customheight \"$RESOLUTION_HEIGHT\"\nseta r_overBrightBits \"0\"\nseta com_maxfps \"60\"\n",
          "description": "Write sof2sp.cfg file for widescreen",
          "file": "$GAMEDIR/drive_c/GOG Games/Soldier of Fortune 2/base/sof2sp.cfg"
        }
      }
    ],
    "require-binaries": "sed",
    "system": {
      "env": {
        "MESA_EXTENSION_MAX_YEAR": 2003,
        "__GL_ExtensionStringVersion": "17700"
      }
    }
  }
}
Back to game