Skip to content

Commit c93b084

Browse files
sc2automationBLIZZARD\abrunasso
authored and
BLIZZARD\abrunasso
committed
SC2 Client API - Initial commit from Blizzard Entertainment
"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
0 parents  commit c93b084

File tree

790 files changed

+80920
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

790 files changed

+80920
-0
lines changed

.editorconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*.{cc,h}]
4+
indent_style = space
5+
indent_size = 4
6+
trim_trailing_whitespace = true

.gitignore

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
*.slo
2+
*.lo
3+
*.o
4+
*.obj
5+
6+
*.gch
7+
*.pch
8+
9+
*.so
10+
*.dylib
11+
*.dll
12+
13+
*.lai
14+
*.la
15+
*.a
16+
*.lib
17+
18+
*.exe
19+
*.out
20+
*.app
21+
22+
build/
23+
24+
*.swp
25+
26+
*.pyc
27+
__pycache__
28+
29+
protocol/*.cc
30+
protocol/*.h
31+
tags
32+
tatus
33+
34+
game_settings.ini
35+
36+
CMakeFiles
37+
cmake.msi
38+
39+
x64/
40+
41+
make_clean.bat
42+
make_again.bat
43+
44+
*.suo
45+
*.user
46+
*.ncb
47+
Debug/
48+
Release/
49+
CodeAnalyst/
50+
.vs/
51+
52+
project/include
53+
project/lib
54+
55+
.DS_Store

.gitmodules

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[submodule "contrib/protobuf"]
2+
path = contrib/protobuf
3+
url = https://github.com/google/protobuf
4+
[submodule "contrib/SDL-mirror"]
5+
path = contrib/SDL-mirror
6+
url = https://github.com/spurious/SDL-mirror
7+
[submodule "protocol"]
8+
path = protocol
9+
url = https://github.com/Blizzard/s2client-proto
10+
[submodule "contrib/civetweb"]
11+
path = contrib/civetweb
12+
url = https://github.com/KevinCalderone/civetweb

CMakeLists.txt

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
cmake_minimum_required(VERSION 3.1)
2+
3+
option(BUILD_API_EXAMPLES "Build Examples" ON)
4+
option(BUILD_API_TESTS "Build Tests" ON)
5+
project(s2client-api)
6+
7+
# Use bin as the directory for all executables.
8+
# This will make protoc easy to find.
9+
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
10+
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
11+
12+
# Windows builds subdirectories Debug/Release.
13+
# These variables will overwrite that and put binaries in bin.
14+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/bin)
15+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/bin)
16+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/bin)
17+
18+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)
19+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)
20+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)
21+
22+
# Build with c++14 support.
23+
set(CMAKE_CXX_STANDARD 14)
24+
25+
# Allow creating filters for projects in visual studio.
26+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
27+
28+
# Don't build civetweb tests.
29+
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
30+
set(CIVETWEB_ENABLE_WEBSOCKETS ON CACHE BOOL "" FORCE)
31+
32+
# Don't build civetweb with sanitizers
33+
set(CIVETWEB_ENABLE_ASAN OFF CACHE BOOL "" FORCE)
34+
35+
# Don't build protobuf tests.
36+
set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
37+
set(protobuf_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
38+
39+
# Don't build SDL dynamic lib.
40+
set(SDL_SHARED OFF CACHE BOOL "" FORCE)
41+
42+
# Run civetwebs cmake.
43+
add_subdirectory("contrib/civetweb")
44+
45+
# TODO: This generates a cmake warning but we don't
46+
# want to include it in the project.
47+
#set_target_properties(c-executable PROPERTIES FOLDER contrib)
48+
set_target_properties(c-executable PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
49+
set_target_properties(c-library c-executable PROPERTIES FOLDER contrib)
50+
51+
# Run protobufs cmake.
52+
add_subdirectory("contrib/protobuf/cmake")
53+
54+
set_target_properties(libprotobuf PROPERTIES FOLDER contrib)
55+
set_target_properties(libprotobuf-lite PROPERTIES FOLDER contrib)
56+
set_target_properties(libprotoc PROPERTIES FOLDER contrib)
57+
set_target_properties(protoc PROPERTIES FOLDER contrib)
58+
59+
if (WIN32)
60+
set_target_properties(libprotobuf libprotobuf-lite libprotoc protoc PROPERTIES COMPILE_FLAGS "/W0")
61+
set_source_files_properties(${libprotobuf_files} PROPERTIES COMPILE_FLAGS "/W0")
62+
set_source_files_properties(${protobuf_SHARED_OR_STATIC} PROPERTIES COMPILE_FLAGS "/W0")
63+
set_source_files_properties(${libprotobuf_lite_files} PROPERTIES COMPILE_FLAGS "/W0")
64+
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
65+
endif (WIN32)
66+
67+
# Exclude SDL and related projects to work around linker issue.
68+
if (NOT APPLE)
69+
# Run SDLs cmake.
70+
add_subdirectory("contrib/SDL-mirror")
71+
72+
set_target_properties(SDL2main PROPERTIES FOLDER contrib)
73+
set_target_properties(SDL2-static PROPERTIES FOLDER contrib)
74+
endif ()
75+
76+
add_subdirectory("src")
77+
78+
# Exclude SDL and related projects to work around linker issue.
79+
if (NOT APPLE)
80+
set_target_properties(sc2renderer PROPERTIES FOLDER utilities)
81+
set_target_properties(uninstall PROPERTIES FOLDER CMakePredefinedTargets)
82+
endif ()
83+
84+
if (BUILD_API_EXAMPLES)
85+
add_subdirectory("examples")
86+
endif ()
87+
88+
if (BUILD_API_EXAMPLES)
89+
add_subdirectory("tests")
90+
endif ()

CREDITS

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Third party libraries used by this project:
2+
3+
Civetweb
4+
https://github.com/civetweb/civetweb
5+
Protobuf
6+
https://github.com/google/protobuf
7+
SDL 2.0
8+
https://www.libsdl.org/index.php
9+
https://github.com/spurious/SDL-mirror
10+
Dirent
11+
https://github.com/tronkko/dirent/

0 commit comments

Comments
 (0)