ocraft / ocraft-s2client

StarCraft II Client - Java library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
55 stars 15 forks source link

Mac OS issue with versions directory #2

Closed thefirebanks closed 6 years ago

thefirebanks commented 6 years ago

Hello!

We are working on Mac OS, and when trying to run the "...ExamplesIT.java", we run into this issue

"java.lang.IllegalArgumentException: version directory is required"

We think that it is because of the way paths are built on MacOS, because the executable path found in "ExecuteInfo.txt" is "/Applications/StarCraft II/Versions/Base60321/SC2.app/Contents/MacOS/SC2", but it is looking for the versions path in "/Applications/StarCraft II/Versions/Base60321/SC2.app/Versions", yet such folder does not exist there - and in fact we think it is looking for the "/Applications/StarCraft II/Versions/" instead.

Is there a fix for this?

ocraft commented 6 years ago

Hi!

I will try to solve the problem with automatic executable path resolving on Mac OS, it looks like the game structure is different there.

Right now you can start the game server manually and use only the client, i.e. S2Client client = starcraft2Client().connectTo("127.0.01", 5000).start();

ocraft commented 6 years ago

Hi again!

I prepared fix to the problem, please try again and tell me if that worked for you.

quinnbp commented 6 years ago

@thefirebanks and I are working together. It appears that the posted fix resolves the issue, at least for the test files. Thanks!