Custom Install Script

Someone propose a trick on WineHQ Bug Tracker how to made 7k2 works. I test this workaround and it seems work. I have in mind the 1.10 version (not HD, which has install script). Maybe some links about how to write install script for Windows games?

Workaround was to not install DX, when game asks and to install cnc_ddraw.

On other hand, someones could write install script and place somewhere I can download it and test.

I wrote simple install script. Could somebody look if everything is correct?

{
  "game_slug": "Sk2",
  "version": "Cool Games (CD) version",
  "description": "Installation of 'Seven Kingdoms II: The Frythan Wars' Cool Games Edition",
  "notes": "Do not install DX. Do not change installation path (when windows installer launch). WineTricks cnc_ddraw will be performed to allow screen updates.",
  "name": "Seven Kingdoms II",
  "runner": "wine",
  "slug": "Sk2-cool-games-cd",
  "installer_slug": "seven-kingdoms-2-from-cool-games-edition",
  "script": {
    "game": {
      "arch": "win32",
      "exe": "drive_c/Seven Kingdoms II/7k2.exe",
      "prefix": "$GAMEDIR"
    },
    "installer": [
      {
        "task": {
          "name": "create_prefix",
          "prefix": "$GAMEDIR"
        }
      },
      {
        "insert-disc": {
          "description": "Insert disc",
          "requires": "7k2.exe"
        }
      },
      {
        "task": {
          "executable": "$DISC/Setup.exe",
          "name": "wineexec",
          "prefix": "$GAMEDIR"
        }
      },
      {
        "task": {
          "app": "cnc_ddraw",
          "arch": "win32",
          "name": "winetricks",
          "prefix": "$GAMEDIR"
        }
      }
    ]
  }
}

Can I upload it?

Hello,
Maybe, instead of building a json script, you should write a yaml script and testing by using the lutris webpage.
Try here: to add a new game: lutris add game (it does not works for me) or add a new script “write a new installer” on 7kIIHD. Just write cd non HD in version.
By clicking save draft, the script will be scanned for errors, then you can try the script on your system with the test script button.

This page do not work for me too. I do not wrote script for 7k2HD, but normal (not HD) version.

It’s not important: write the script for non HD version on the HD page, you can still try the script here!
At the end you can publish it anyways if you want to share it, just specify “CD non HD” en the version field I guess.

Thanks. I add installer of 7K2: The Frythan’s Wars to 7k2: HD game. I hope somebody with access rights will add correct game to database.