Lutris Script Writing - How to change winecfg?

Hello! I’m trying to write up an install script for a game (I got Call of Duty: Black Ops working almost flawlessly [or, at least, a lot better than it was]). However, in order to get the audio working properly, winecfg needs to set Call of Duty: Black Ops’ wineprefix to Windows XP.

How would I write that?

Lutris ships with a piece of software called winetricks, which is able to change wine settings via commands.

You can use it in installers like this:

- task:
    app: winxp
    name: winetricks
    prefix: $GAMEDIR

This will set the wineprefix to Windows XP.

You can also find more information on writing Lutris installers in the installer documentation.

Thank you! Alright, as a quick additional question - Steam will stop working on Windows XP in 3 months or so, and that means it’ll stop working on Windows XP wine configurations. Is there a way for the installer to set Steam to run in Windows 7 with the game executable set to run in Windows XP?

You can add the BLOPS game exe and change the Windows version that way.

- task:
    key: Version
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine\AppDefaults\blops.exe
    prefix: $GAMEDIR/prefix
    value: winxp

That way it doesn’t change it for Steam.

game:
  appid: '42700'
system: {}
task:
  app: winxp
  name: winetricks
  prefix: $GAMEDIR
winesteam:
  Audio: alsa
  version: esync-3.15-x86_64

- task: must go under the installer: section. What your installer should look like:

game:
  appid: 42700
installer:
- task:
    key: Version
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine\AppDefaults\BlackOps.exe
    prefix: $GAMEDIR
    value: winxp
winesteam:
  Audio: alsa
  version: esync-3.15-x86_64

Thank you as well, friend! I’ll fix this in a moment.

EDIT: Finished. Thanks again, I’ll come back if I have another question.