Installer freespace-2-gog

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:Please select the GOG.com Windows installer.
game:
  arch: win32
  exe: $GAMEDIR/drive_c/game/FS2.exe
  prefix: $GAMEDIR
  working_dir: $GAMEDIR/drive_c/game
installer:
- task:
    description: Creating Wine prefix
    name: create_prefix
    prefix: $GAMEDIR
- task:
    key: winemenubuilder.exe
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine\DllOverrides
    prefix: $GAMEDIR
    type: REG_SZ
    value: ''
- task:
    args: /VERYSILENT /SP- /NOCANCEL /SUPPRESSMSGBOXES '/DIR=C:/game'
    description: Installing...
    executable: game
    name: wineexec
    prefix: $GAMEDIR
- execute:
    args: -c "mkdir -p $GAMEDIR/drive_c/game/data/movies"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "mv $GAMEDIR/drive_c/game/data2/*.MVE $GAMEDIR/drive_c/game/data"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "mv $GAMEDIR/drive_c/game/data3/*.MVE $GAMEDIR/drive_c/game/data"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cp -f $GAMEDIR/drive_c/game/data2/tango*.vp $GAMEDIR/drive_c/game"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cp -f $GAMEDIR/drive_c/game/data3/tango*.vp $GAMEDIR/drive_c/game"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "rm -rf $GAMEDIR/drive_c/game/data3 $GAMEDIR/drive_c/game/data2"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "ln -s $GAMEDIR/drive_c/game/data $GAMEDIR/drive_c/game/data2"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "ln -s $GAMEDIR/drive_c/game/data $GAMEDIR/drive_c/game/data3"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "mkdir $GAMEDIR/drive_c/game/data/movies"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../BASTION.MVE movies/BASTION.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../COLOSSUS.MVE movies/COLOSSUS.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../ENDPART1.MVE movies/ENDPART1.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../ENDPART2A.MVE movies/ENDPART2A.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../ENDPART2B.MVE movies/ENDPART2B.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../INTRO.MVE movies/INTRO.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../MONO1.MVE movies/MONO1.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../MONO2.MVE movies/MONO2.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../MONO3.MVE movies/MONO3.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- execute:
    args: -c "cd $GAMEDIR/drive_c/game/data && ln -s ../MONO4.MVE movies/MONO4.MVE"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- move:
    description: making the GOGVersion fs2_open compatible...
    dst: $GAMEDIR/freespace2
    src: $GAMEDIR/drive_c/game
- execute:
    args: -c "cd $GAMEDIR && ln -sf ../freespace2 $GAMEDIR/drive_c/game"
    description: making the GOGVersion fs2_open compatible...
    file: /bin/sh
- write_file:
    content: 'REGEDIT4


      [HKEY_LOCAL_MACHINE\Software\Volition\Freespace2]


      @=""


      "CmdLineOptions"=hex(2):00


      "ComputerSpeed"=dword:00000002


      "ConnectionSpeed"=hex(2):46,61,73,74,00


      "D3DFast"=dword:00000000


      "D3DTextureOrigin"=dword:00000001


      "Detect D3D"=dword:00000001


      "Detect Glide"=dword:00000000


      "DisableZbias"=dword:00000000


      "EnableHitEffect"=dword:00000001


      "EnableJoystickFF"=dword:00000000


      "EregCount"=dword:00000003


      "ForcePort"=dword:00000000


      "ForceWFOG"=dword:00000000


      "Interlaced Movies"=dword:00000000


      "LauncherSoundEnabled"=dword:00000001


      "Movie Fast Clear"=dword:00000000


      "NetworkConnection"=hex(2):4c,41,4e,00


      "PXOBanners"=dword:00000001


      "SkipVerify"=dword:00000000


      "Soundcard"=hex(2):44,69,72,65,63,74,53,6f,75,6e,64,00


      "StraightToSetup"=dword:00000000


      "Videocard"="Direct 3D - Primary Display Driver (32 bit) (1024x768)" '
    description: installer add_reg.cmd
    file: $CACHE/install.reg
- task:
    arch: win32
    filename: $CACHE/install.reg
    name: set_regedit_file
    prefix: $GAMEDIR
- task:
    app: sandbox
    description: Disabling unused WINE features
    name: winetricks
    prefix: $GAMEDIR
    silent: true
{
  "files": [
    {
      "game": "N/A:Please select the GOG.com Windows installer."
    }
  ],
  "game": {
    "arch": "win32",
    "exe": "$GAMEDIR/drive_c/game/FS2.exe",
    "prefix": "$GAMEDIR",
    "working_dir": "$GAMEDIR/drive_c/game"
  },
  "installer": [
    {
      "task": {
        "description": "Creating Wine prefix",
        "name": "create_prefix",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "key": "winemenubuilder.exe",
        "name": "set_regedit",
        "path": "HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": ""
      }
    },
    {
      "task": {
        "args": "/VERYSILENT /SP- /NOCANCEL /SUPPRESSMSGBOXES '/DIR=C:/game'",
        "description": "Installing...",
        "executable": "game",
        "name": "wineexec",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "execute": {
        "args": "-c \"mkdir -p $GAMEDIR/drive_c/game/data/movies\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"mv $GAMEDIR/drive_c/game/data2/*.MVE $GAMEDIR/drive_c/game/data\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"mv $GAMEDIR/drive_c/game/data3/*.MVE $GAMEDIR/drive_c/game/data\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cp -f $GAMEDIR/drive_c/game/data2/tango*.vp $GAMEDIR/drive_c/game\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cp -f $GAMEDIR/drive_c/game/data3/tango*.vp $GAMEDIR/drive_c/game\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"rm -rf $GAMEDIR/drive_c/game/data3 $GAMEDIR/drive_c/game/data2\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"ln -s $GAMEDIR/drive_c/game/data $GAMEDIR/drive_c/game/data2\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"ln -s $GAMEDIR/drive_c/game/data $GAMEDIR/drive_c/game/data3\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"mkdir $GAMEDIR/drive_c/game/data/movies\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../BASTION.MVE movies/BASTION.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../COLOSSUS.MVE movies/COLOSSUS.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../ENDPART1.MVE movies/ENDPART1.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../ENDPART2A.MVE movies/ENDPART2A.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../ENDPART2B.MVE movies/ENDPART2B.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../INTRO.MVE movies/INTRO.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../MONO1.MVE movies/MONO1.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../MONO2.MVE movies/MONO2.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../MONO3.MVE movies/MONO3.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR/drive_c/game/data && ln -s ../MONO4.MVE movies/MONO4.MVE\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "move": {
        "description": "making the GOGVersion fs2_open compatible...",
        "dst": "$GAMEDIR/freespace2",
        "src": "$GAMEDIR/drive_c/game"
      }
    },
    {
      "execute": {
        "args": "-c \"cd $GAMEDIR && ln -sf ../freespace2 $GAMEDIR/drive_c/game\"",
        "description": "making the GOGVersion fs2_open compatible...",
        "file": "/bin/sh"
      }
    },
    {
      "write_file": {
        "content": "REGEDIT4\n\n[HKEY_LOCAL_MACHINE\\Software\\Volition\\Freespace2]\n\n@=\"\"\n\n\"CmdLineOptions\"=hex(2):00\n\n\"ComputerSpeed\"=dword:00000002\n\n\"ConnectionSpeed\"=hex(2):46,61,73,74,00\n\n\"D3DFast\"=dword:00000000\n\n\"D3DTextureOrigin\"=dword:00000001\n\n\"Detect D3D\"=dword:00000001\n\n\"Detect Glide\"=dword:00000000\n\n\"DisableZbias\"=dword:00000000\n\n\"EnableHitEffect\"=dword:00000001\n\n\"EnableJoystickFF\"=dword:00000000\n\n\"EregCount\"=dword:00000003\n\n\"ForcePort\"=dword:00000000\n\n\"ForceWFOG\"=dword:00000000\n\n\"Interlaced Movies\"=dword:00000000\n\n\"LauncherSoundEnabled\"=dword:00000001\n\n\"Movie Fast Clear\"=dword:00000000\n\n\"NetworkConnection\"=hex(2):4c,41,4e,00\n\n\"PXOBanners\"=dword:00000001\n\n\"SkipVerify\"=dword:00000000\n\n\"Soundcard\"=hex(2):44,69,72,65,63,74,53,6f,75,6e,64,00\n\n\"StraightToSetup\"=dword:00000000\n\n\"Videocard\"=\"Direct 3D - Primary Display Driver (32 bit) (1024x768)\" ",
        "description": "installer add_reg.cmd",
        "file": "$CACHE/install.reg"
      }
    },
    {
      "task": {
        "arch": "win32",
        "filename": "$CACHE/install.reg",
        "name": "set_regedit_file",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "app": "sandbox",
        "description": "Disabling unused WINE features",
        "name": "winetricks",
        "prefix": "$GAMEDIR",
        "silent": true
      }
    }
  ]
}
Back to game