BurnySc2 / python-sc2

A StarCraft II bot api client library for Python 3
MIT License
510 stars 158 forks source link

Add support for running in different wine versions #31

Closed Talv closed 5 years ago

Talv commented 5 years ago

In 33a42149569c76319b97fad1d7376789d1590562 some basic support for wine was added. However it works only if wine is installed system wide and associated with .exe mime type. This commit allows using different versions - including versions installed via Lutris.

btw. This approach doesn't require having WineLinux as a separate platform. Example:

WINE=/home/kk/.local/share/lutris/runners/wine/ge-protonified-nofshack-4.9-x86_64/bin/wine WINEDEBUG="-all" WINEPREFIX=/mnt/s1/wine/sc2-default WINEARCH=win64 SC2PF=Windows SC2PATH="/mnt/s1/wine/sc2-default/dosdevices/z:/mnt/s1/BnetGameLib/StarCraft II" python3 examples/protoss/cannon_rush.py

Selection_3887dc2e

BurnySc2 commented 5 years ago

Nice, thank you!

I have no way to test this, since I am developing from windows and can't dualboot into linux, so I'm just gonna accept this PR.