Skip to content

Instantly share code, notes, and snippets.

@herodrigues
Last active November 12, 2017 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herodrigues/5dc38f6d94d3993d24393b7accacf162 to your computer and use it in GitHub Desktop.
Save herodrigues/5dc38f6d94d3993d24393b7accacf162 to your computer and use it in GitHub Desktop.
StarCraft II API installation with Eclipse
  • Build SC2 API project
$ git clone --recursive https://github.com/Blizzard/s2client-api && cd s2client-api
$ mkdir build && cd build
$ cmake ../
$ make
  • Install the SC2 API libraries and headers to your system
# Assuming that you are located in the 'build' directory
# after you finished the previous step
$ cd ../

# Install SC2 API headers
$ sudo mkdir -p /usr/local/include
$ sudo cp -R include/sc2api /usr/local/include
$ sudo cp -R include/sc2utils /usr/local/include
$ sudo cp -R include/sc2lib /usr/local/include
$ sudo cp -R include/sc2renderer /usr/local/include
$ sudo cp -R build/generated/s2clientprotocol /usr/local/include

# Copy contrib libs to your file system
$ sudo cp -R contrib/protobuf/src/google /usr/local/include

# Install SC2 API libraries
$ sudo mkdir -p /usr/local/lib/sc2api
$ sudo cp build/bin/*.a /usr/local/lib/sc2api

Include libraries flags onto Eclipse: -lsc2api -lsc2renderer -lsc2protocol -lsc2utils -ldl -lpthread -lprotobuf -lcivetweb -lSDL2 -lSDL2main

Download maps and replays to ~/StarCraftII

Run your bot executable with ./bot -e /home/<username>/StarCraftII/StarCraftII

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment