Skip to content

Commit

Permalink
SC2 Client API - Initial commit from Blizzard Entertainment
Browse files Browse the repository at this point in the history
"A ship at harbor is safe, but that's not what ships are for"

This project represents a collaboration between Google DeepMind
and the StarCraft II development team at Blizzard Entertainment.

Credit for this release goes to the amazing contributions from our
dedicated engineers, test analysts and producers:

- Anders Ekermo, Senior Software Engineer II
- Anthony Brunasso, Software Engineer
- Brian Song, Test Lead I
- David Lawrence, Principal Software Engineer I
- Greg Risselada, Test Analyst
- Jacob Repp, Principal Engineer
- Kevin Calderone, Senior Software Engineer
- Paul Keet, Senior Software Engineer II
- Rodney Tsing, Senior Game Producer
- Tom van Dijck, Senior Software Engineer II
- Tommy Tran, Associate Test Analyst
- Tyler Plass, Associate Test Analyst
- Zachary Comstock, Software Engineer - Intern
  • Loading branch information
sc2automation authored and BLIZZARD\abrunasso committed Aug 9, 2017
0 parents commit c93b084
Show file tree
Hide file tree
Showing 790 changed files with 80,920 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root = true

[*.{cc,h}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
*.slo
*.lo
*.o
*.obj

*.gch
*.pch

*.so
*.dylib
*.dll

*.lai
*.la
*.a
*.lib

*.exe
*.out
*.app

build/

*.swp

*.pyc
__pycache__

protocol/*.cc
protocol/*.h
tags
tatus

game_settings.ini

CMakeFiles
cmake.msi

x64/

make_clean.bat
make_again.bat

*.suo
*.user
*.ncb
Debug/
Release/
CodeAnalyst/
.vs/

project/include
project/lib

.DS_Store
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "contrib/protobuf"]
path = contrib/protobuf
url = https://github.com/google/protobuf
[submodule "contrib/SDL-mirror"]
path = contrib/SDL-mirror
url = https://github.com/spurious/SDL-mirror
[submodule "protocol"]
path = protocol
url = https://github.com/Blizzard/s2client-proto
[submodule "contrib/civetweb"]
path = contrib/civetweb
url = https://github.com/KevinCalderone/civetweb
90 changes: 90 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
cmake_minimum_required(VERSION 3.1)

option(BUILD_API_EXAMPLES "Build Examples" ON)
option(BUILD_API_TESTS "Build Tests" ON)
project(s2client-api)

# Use bin as the directory for all executables.
# This will make protoc easy to find.
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

# Windows builds subdirectories Debug/Release.
# These variables will overwrite that and put binaries in bin.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/bin)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)

# Build with c++14 support.
set(CMAKE_CXX_STANDARD 14)

# Allow creating filters for projects in visual studio.
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

# Don't build civetweb tests.
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(CIVETWEB_ENABLE_WEBSOCKETS ON CACHE BOOL "" FORCE)

# Don't build civetweb with sanitizers
set(CIVETWEB_ENABLE_ASAN OFF CACHE BOOL "" FORCE)

# Don't build protobuf tests.
set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(protobuf_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)

# Don't build SDL dynamic lib.
set(SDL_SHARED OFF CACHE BOOL "" FORCE)

# Run civetwebs cmake.
add_subdirectory("contrib/civetweb")

# TODO: This generates a cmake warning but we don't
# want to include it in the project.
#set_target_properties(c-executable PROPERTIES FOLDER contrib)
set_target_properties(c-executable PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
set_target_properties(c-library c-executable PROPERTIES FOLDER contrib)

# Run protobufs cmake.
add_subdirectory("contrib/protobuf/cmake")

set_target_properties(libprotobuf PROPERTIES FOLDER contrib)
set_target_properties(libprotobuf-lite PROPERTIES FOLDER contrib)
set_target_properties(libprotoc PROPERTIES FOLDER contrib)
set_target_properties(protoc PROPERTIES FOLDER contrib)

if (WIN32)
set_target_properties(libprotobuf libprotobuf-lite libprotoc protoc PROPERTIES COMPILE_FLAGS "/W0")
set_source_files_properties(${libprotobuf_files} PROPERTIES COMPILE_FLAGS "/W0")
set_source_files_properties(${protobuf_SHARED_OR_STATIC} PROPERTIES COMPILE_FLAGS "/W0")
set_source_files_properties(${libprotobuf_lite_files} PROPERTIES COMPILE_FLAGS "/W0")
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
endif (WIN32)

# Exclude SDL and related projects to work around linker issue.
if (NOT APPLE)
# Run SDLs cmake.
add_subdirectory("contrib/SDL-mirror")

set_target_properties(SDL2main PROPERTIES FOLDER contrib)
set_target_properties(SDL2-static PROPERTIES FOLDER contrib)
endif ()

add_subdirectory("src")

# Exclude SDL and related projects to work around linker issue.
if (NOT APPLE)
set_target_properties(sc2renderer PROPERTIES FOLDER utilities)
set_target_properties(uninstall PROPERTIES FOLDER CMakePredefinedTargets)
endif ()

if (BUILD_API_EXAMPLES)
add_subdirectory("examples")
endif ()

if (BUILD_API_EXAMPLES)
add_subdirectory("tests")
endif ()
11 changes: 11 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Third party libraries used by this project:

Civetweb
https://github.com/civetweb/civetweb
Protobuf
https://github.com/google/protobuf
SDL 2.0
https://www.libsdl.org/index.php
https://github.com/spurious/SDL-mirror
Dirent
https://github.com/tronkko/dirent/
Loading

0 comments on commit c93b084

Please sign in to comment.