Installer midtown-madness-cd-open1560

files:
- open1560: https://github.com/0x1F9F1/Open1560/releases/latest/download/Open1560.zip
- dxwnd: https://sourceforge.net/projects/dxwnd/files/latest/download
- music: https://archive.org/download/midtown-madness-music/Midtown%20Madness%20Music.zip
- mnt-script: https://codeberg.org/jacob_scharmberg/lutris-scripts/raw/branch/main/midtown-madness/mount-disc.sh
game:
  args: -msaa 8
  exe: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/Open1560.exe
  prefix: $GAMEDIR
installer:
- insert-disc:
    requires: MIDTOWN.EXE
- task:
    app: winxp
    name: winetricks
    prefix: $GAMEDIR
- task:
    args: /autorun
    executable: $DISC/SETUP.EXE
    name: wineexec
    return_code: 256
- extract:
    description: Installing Open1560...
    dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
    file: open1560
- extract:
    description: Installing music files...
    dst: $CACHE/dxwnd
    file: dxwnd
- merge:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
    src: $CACHE/dxwnd/dxwplay.dll
- merge:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
    src: $CACHE/dxwnd/libogg.dll
- merge:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
    src: $CACHE/dxwnd/libvorbis.dll
- merge:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
    src: $CACHE/dxwnd/libvorbisfile.dll
- merge:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
    src: $CACHE/dxwnd/vcda/winmm.dll
- merge:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
    src: $CACHE/dxwnd/vcda/winmm.ini
- extract:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/Music
    file: music
- execute:
    command: if command -v flatpak-spawn > /dev/null 2>&1; then flatpak-spawn --host
      pkexec dd if=$(findmnt -no SOURCE "$DISC") of=$GAMEDIR/disc.iso status=progress;
      else pkexec dd if=$(findmnt -no SOURCE "$DISC") of=$GAMEDIR/disc.iso status=progress;
      fi
    description: Imaging CD to hard disk...
- merge:
    dst: $GAMEDIR
    src: mnt-script
- chmodx: $GAMEDIR/mount-disc.sh
system:
  prelaunch_command: $GAMEDIR/mount-disc.sh
  prelaunch_wait: true
wine:
  overrides:
    winmm.dll: n,b
description: Installs the game with the reimplementation project Open1560. This improves
  compatibility with modern systems. MSAA is enabled by default.
game_slug: midtown-madness
gogslug: ''
humblestoreid: ''
installer_slug: midtown-madness-cd-open1560
name: Midtown Madness
notes: "On first launch you might get an error message about DLL loading but from\
  \ the second launch onward it should work.\r\n\r\nTo get the music working, we need\
  \ to emulate CD-DA with DxWnd. Also, the game will only play the music if it detects\
  \ the CD (even with DxWnd) so we image the CD to disk at install time and mount\
  \ the image before each launch."
runner: wine
script:
  files:
  - open1560: https://github.com/0x1F9F1/Open1560/releases/latest/download/Open1560.zip
  - dxwnd: https://sourceforge.net/projects/dxwnd/files/latest/download
  - music: https://archive.org/download/midtown-madness-music/Midtown%20Madness%20Music.zip
  - mnt-script: https://codeberg.org/jacob_scharmberg/lutris-scripts/raw/branch/main/midtown-madness/mount-disc.sh
  game:
    args: -msaa 8
    exe: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/Open1560.exe
    prefix: $GAMEDIR
  installer:
  - insert-disc:
      requires: MIDTOWN.EXE
  - task:
      app: winxp
      name: winetricks
      prefix: $GAMEDIR
  - task:
      args: /autorun
      executable: $DISC/SETUP.EXE
      name: wineexec
      return_code: 256
  - extract:
      description: Installing Open1560...
      dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
      file: open1560
  - extract:
      description: Installing music files...
      dst: $CACHE/dxwnd
      file: dxwnd
  - merge:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
      src: $CACHE/dxwnd/dxwplay.dll
  - merge:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
      src: $CACHE/dxwnd/libogg.dll
  - merge:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
      src: $CACHE/dxwnd/libvorbis.dll
  - merge:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
      src: $CACHE/dxwnd/libvorbisfile.dll
  - merge:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
      src: $CACHE/dxwnd/vcda/winmm.dll
  - merge:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/
      src: $CACHE/dxwnd/vcda/winmm.ini
  - extract:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/Music
      file: music
  - execute:
      command: if command -v flatpak-spawn > /dev/null 2>&1; then flatpak-spawn --host
        pkexec dd if=$(findmnt -no SOURCE "$DISC") of=$GAMEDIR/disc.iso status=progress;
        else pkexec dd if=$(findmnt -no SOURCE "$DISC") of=$GAMEDIR/disc.iso status=progress;
        fi
      description: Imaging CD to hard disk...
  - merge:
      dst: $GAMEDIR
      src: mnt-script
  - chmodx: $GAMEDIR/mount-disc.sh
  system:
    prelaunch_command: $GAMEDIR/mount-disc.sh
    prelaunch_wait: true
  wine:
    overrides:
      winmm.dll: n,b
slug: midtown-madness-cd-open1560
steamid: null
version: CD + Open1560
year: 1999
{
  "game_slug": "midtown-madness",
  "version": "CD + Open1560",
  "description": "Installs the game with the reimplementation project Open1560. This improves compatibility with modern systems. MSAA is enabled by default.",
  "notes": "On first launch you might get an error message about DLL loading but from the second launch onward it should work.\r\n\r\nTo get the music working, we need to emulate CD-DA with DxWnd. Also, the game will only play the music if it detects the CD (even with DxWnd) so we image the CD to disk at install time and mount the image before each launch.",
  "name": "Midtown Madness",
  "year": 1999,
  "steamid": null,
  "gogslug": "",
  "humblestoreid": "",
  "runner": "wine",
  "slug": "midtown-madness-cd-open1560",
  "installer_slug": "midtown-madness-cd-open1560",
  "script": {
    "files": [
      {
        "open1560": "https://github.com/0x1F9F1/Open1560/releases/latest/download/Open1560.zip"
      },
      {
        "dxwnd": "https://sourceforge.net/projects/dxwnd/files/latest/download"
      },
      {
        "music": "https://archive.org/download/midtown-madness-music/Midtown%20Madness%20Music.zip"
      },
      {
        "mnt-script": "https://codeberg.org/jacob_scharmberg/lutris-scripts/raw/branch/main/midtown-madness/mount-disc.sh"
      }
    ],
    "game": {
      "args": "-msaa 8",
      "exe": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/Open1560.exe",
      "prefix": "$GAMEDIR"
    },
    "installer": [
      {
        "insert-disc": {
          "requires": "MIDTOWN.EXE"
        }
      },
      {
        "task": {
          "app": "winxp",
          "name": "winetricks",
          "prefix": "$GAMEDIR"
        }
      },
      {
        "task": {
          "args": "/autorun",
          "executable": "$DISC/SETUP.EXE",
          "name": "wineexec",
          "return_code": 256
        }
      },
      {
        "extract": {
          "description": "Installing Open1560...",
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/",
          "file": "open1560"
        }
      },
      {
        "extract": {
          "description": "Installing music files...",
          "dst": "$CACHE/dxwnd",
          "file": "dxwnd"
        }
      },
      {
        "merge": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/",
          "src": "$CACHE/dxwnd/dxwplay.dll"
        }
      },
      {
        "merge": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/",
          "src": "$CACHE/dxwnd/libogg.dll"
        }
      },
      {
        "merge": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/",
          "src": "$CACHE/dxwnd/libvorbis.dll"
        }
      },
      {
        "merge": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/",
          "src": "$CACHE/dxwnd/libvorbisfile.dll"
        }
      },
      {
        "merge": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/",
          "src": "$CACHE/dxwnd/vcda/winmm.dll"
        }
      },
      {
        "merge": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/",
          "src": "$CACHE/dxwnd/vcda/winmm.ini"
        }
      },
      {
        "extract": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Microsoft Games/Midtown Madness/Music",
          "file": "music"
        }
      },
      {
        "execute": {
          "command": "if command -v flatpak-spawn > /dev/null 2>&1; then flatpak-spawn --host pkexec dd if=$(findmnt -no SOURCE \"$DISC\") of=$GAMEDIR/disc.iso status=progress; else pkexec dd if=$(findmnt -no SOURCE \"$DISC\") of=$GAMEDIR/disc.iso status=progress; fi",
          "description": "Imaging CD to hard disk..."
        }
      },
      {
        "merge": {
          "dst": "$GAMEDIR",
          "src": "mnt-script"
        }
      },
      {
        "chmodx": "$GAMEDIR/mount-disc.sh"
      }
    ],
    "system": {
      "prelaunch_command": "$GAMEDIR/mount-disc.sh",
      "prelaunch_wait": true
    },
    "wine": {
      "overrides": {
        "winmm.dll": "n,b"
      }
    }
  }
}
Back to game