|
4 years ago | |
---|---|---|
.. | ||
linux | 4 years ago | |
windows | 4 years ago | |
.gitignore | 4 years ago | |
AWSGameLiftServerSDK_3.4.1.patch | 4 years ago | |
README.md | 4 years ago | |
build_and_package.py | 4 years ago | |
gamelift-sdk.json | 4 years ago |
You can find the official GameLift documentation here.
Download the latest GameLift Server SDK
and unzip source GameLift-Cpp-ServerSDK-{version-number}
Copy and put package-system/AWSGameLiftServerSDK/build_and_package.py
and package-system/AWSGameLiftServerSDK/gamelift-sdk.json
into GameLift-Cpp-ServerSDK-{version-number}
directory in step 1
Run the python script build_and_package.py
under GameLift-Cpp-ServerSDK-{version-number}
directory, like
& python build_and_package.py --config gamelift-sdk.json --platform windows --version 3.4.1
Build package will be located under GameLift-Cpp-ServerSDK-{version-number}/build/{version-number}
directory
Copy and put build package into package-system/AWSGameLiftServerSDK/windows/AWSGameLiftServerSDK
, for example
- AWSGameLiftServerSDK
- bin
- include
- lib
- LICENSE_AMAZON_GAMELIFT_SDK.txt
- NOTICE_C++_AMAZON_GAMELIFT_SDK.txt
Update package-system/AWSGameLiftServerSDK/windows/PackageInfo.json
with built version PackageName
Update <3p-package-source path>/package_build_list_host_windows.json
with updated PackageName
in step 6
Download the latest GameLift Server SDK
and unzip source GameLift-Cpp-ServerSDK-{version-number}
Copy and put package-system/AWSGameLiftServerSDK/build_and_package.py
, package-system/AWSGameLiftServerSDK/gamelift-sdk.json
and package-system/AWSGameLiftServerSDK/AWSGameLiftServerSDK_3.4.1.patch
into GameLift-Cpp-ServerSDK-{version-number}
directory in step 1
Link Clang compiler for cmake build (if /usr/bin/clang
and /usr/bin/clang++
symlink exist already,
please remove them first sudo rm /usr/bin/clang /usr/bin/clang++
)
$ sudo ln -s /usr/bin/clang-6.0 /usr/bin/clang
$ sudo ln -s /usr/bin/clang++-6.0 /usr/bin/clang++
Patch External_boost.cmake
under GameLift-Cpp-ServerSDK-{version-number}/cmake
to make sure boost library get build with correct toolset (clang-6.0 for example) and variants
GameLift-Cpp-ServerSDK-{version-number}
directory, run command git init
to init a local git repository with current directorygit add .
to stage all existing filesgit commit -m "init commit"
to commit your existing filesgit apply --ignore-space-change --ignore-whitespace AWSGameLiftServerSDK_3.4.1.patch
to apply patchRun command git diff
to check expected changes like
BUILD_COMMAND b2 address-model=${am} ${boost_with_args}
)
else()
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(_build_variant "debug")
+ else()
+ set(_build_variant "release")
+ endif()
+
list(APPEND boost_with_args
- "cxxflags=-fPIC")
+ "cxxflags=-fPIC" "toolset=clang-6.0" "variant=${_build_variant}")
set(boost_cmds
CONFIGURE_COMMAND ./bootstrap.sh --prefix=<INSTALL_DIR>
BUILD_COMMAND ./b2 address-model=${am} ${boost_with_args}
Run the python script build_and_package.py
under GameLift-Cpp-ServerSDK-{version-number}
directory, like
& python3 build_and_package.py --config gamelift-sdk.json --platform linux --version 3.4.1
Build package will be located under GameLift-Cpp-ServerSDK-{version-number}/build/{version-number}
directory
Copy and put build package into package-system/AWSGameLiftServerSDK/linux/AWSGameLiftServerSDK
, for example
- AWSGameLiftServerSDK
- include
- lib
- LICENSE_AMAZON_GAMELIFT_SDK.txt
- NOTICE_C++_AMAZON_GAMELIFT_SDK.txt
Update package-system/AWSGameLiftServerSDK/linux/PackageInfo.json
with built version PackageName
Update <3p-package-source path>/package_build_list_host_linux.json
with updated PackageName
in step 6
For windows build, use --msbuild_path
argument to specify msbuild executable path if msbuild is unrecognized as a valid command, like
& python build_and_package.py --config gamelift-sdk.json --platform windows --version 3.4.1 --msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
For windows build, if you get error message The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters
Please move GameLift-Cpp-ServerSDK-{version-number}
directory out of nested directories and retry.
This SDK is known to work with these CMake generators:
By default, we use vs2017
for windows build and clang-6.0
for linux build.
Please update gamelift-sdk.json
platform configs: archs and toolchains if need to change cmake generator.