Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 2.96 KB

buildGDK.md

File metadata and controls

33 lines (25 loc) · 2.96 KB

XPlatCppSdk GDK build

Cross-Platform C++ PlayFab SDK, compatible with GDK

It currently supports the following platforms:

  • Windows (Win32) x64
  • Xbox Series X|S & Xbox One

This SDK lets you make REST API calls to the PlayFab service. It depends on some external third-party open source libraries referenced as git submodules in directory /external. Please make sure to use --recurse-submodules command line parameter when cloning SDK's git repo:

git clone --recurse-submodules <git-repo-url>

or run the following commands to sync the content of submodules if the repo was cloned earlier without the --recurse-submodules parameter:

git submodule update --init --recursive

This source code of SDK itself is generated from our SdkGenerator and XPlatCoreTemplate.


Before Building the SDK from downloading from GitHub as a .zip

Please run set-gitmodules.bat before attempting to build the SDK. We rely on a particular commit of jsoncpp that this file will direct you to.

Setup:

  1. IDE or a build tool specific to platform (Visual Studio 2022 for Windows, Xbox)
  2. Users should be very familiar with the topics covered in our getting started guide.
  3. When we built this for windows we used platform toolset v141 in the project files. If you have a different toolset installed on your dev box it is safe to update this to later versions of the platform toolsets, feel free to re-target the projects as you see fit your projects needs.
  4. GDK should be installed on the system. PlayFab relies on XCurl which must exist. Double click PGDK.exe from this repo to get the correct install setup. The lib and dll dependencies should exist under C:\Program Files (x86)\Microsoft GDK\220600\GRDK\ExtensionLibraries\Xbox.XCurl.API\
  5. When adding PlayFab to your .vcxproj file, add Xbox.XCurl.API to the top Property Group Globals. You may still need to add the XCurl lib in Additional Dependencies per project in the same vcxproj file. See Our Test Project for an example of how we added the XCurl lib
  6. If the above is completed, try running our example unit test build (NOTE: configure the TestApp.cpp file first with your PlayFab title Id and email and comment out the return 1 before you hit F5
  7. This should result in the output XPlatCppGdk lib under the expected output path: {Root XPlatCppSdk directory}/XPlatCppSdk/build/GDK/{Gaming.Desktop.x64 | Gaming.Xbox.XboxOne.x64 | Gaming.Xbox.Scarlett.x64}/{Debug | Release}/XPlatCppGdk/