1- set (GDK_EDITION_NUMBER 250404 )
1+ set (GDK_EDITION_NUMBER 251000 )
22
33# The GDK contains a combination of static C++ libraries and DLL-based extension libraries.
44vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
55
6+ vcpkg_download_distfile(ARCHIVE_CORE
7+ URLS "https://www.nuget.org/api/v2/package/Microsoft.GDK.Core/${VERSION} "
8+ FILENAME "ms-gdk-core.${VERSION} .zip"
9+ SHA512 447a9807a746a7922230d185ee60cbeac21caa923662f1994f07df6f08286470aea3ca2ce72c10ef3487e680b7c98651f3612f06481c9606dc0369d5e14bc736
10+ )
11+
612vcpkg_download_distfile(ARCHIVE
7- URLS "https://www.nuget.org/api/v2/package/Microsoft.GDK.PC/${VERSION} "
8- FILENAME "ms-gdk.${VERSION} .zip"
9- SHA512 143541167d34a6c685bef234ccc03b02e916f286e0d83f1b7dbdd269951b441e5709371270436128aad329a0ff3f4814afaf5d1ed3080989b8e2e0779da51123
13+ URLS "https://www.nuget.org/api/v2/package/Microsoft.GDK.Windows/${VERSION} "
14+ FILENAME "ms-gdk-windows.${VERSION} .zip"
15+ SHA512 4520e870070b7b219a9bca80d2a9d8eab2c833efa4be075aca4da5aefef1cba58e59bf3aef107ae5126e0ad680253cf25d39d4700df86afcdc82f9502f43fd77
16+ )
17+
18+ vcpkg_extract_source_archive(
19+ PACKAGE_PATH_CORE
20+ ARCHIVE "${ARCHIVE_CORE} "
21+ NO_REMOVE_ONE_LEVEL
1022)
1123
1224vcpkg_extract_source_archive(
@@ -21,64 +33,125 @@ vcpkg_check_features(
2133 playfab BUILD_PLAYFAB_SERVICES
2234)
2335
24- set (GRDK_PATH "${PACKAGE_PATH} /native/${GDK_EDITION_NUMBER} /GRDK" )
36+ # Install core tools
37+ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" )
38+ file (INSTALL "${PACKAGE_PATH_CORE} /native/bin/" DESTINATION "${CURRENT_PACKAGES_DIR} /tools" )
39+ file (INSTALL "${PACKAGE_PATH_CORE} /native/bin/GameConfigEditorDependencies" DESTINATION "${CURRENT_PACKAGES_DIR} /tools" )
40+ endif ()
41+
42+ set (WINDOWS_PATH "${PACKAGE_PATH} /native/${GDK_EDITION_NUMBER} /windows" )
2543
2644# We use the gameinput port instead
27- file (REMOVE "${GRDK_PATH} /GameKit/Include/GameInput.h" )
28- file (REMOVE "${GRDK_PATH} /GameKit/Lib/amd64/GameInput.lib" )
45+ file (REMOVE "${WINDOWS_PATH} /include/GameInput.h" )
46+ file (REMOVE "${WINDOWS_PATH} /lib/arm64/GameInput.lib" )
47+ file (REMOVE "${WINDOWS_PATH} /lib/x64/GameInput.lib" )
48+
49+ # We use the cpprestsdk port instead
50+ file (REMOVE_RECURSE "${WINDOWS_PATH} /include/cpprest" )
51+ file (REMOVE_RECURSE "${WINDOWS_PATH} /include/pplx" )
52+
53+ # Install core content
54+ set (CORE_BINS xgameruntime.dll xgameruntime.pdb)
55+ set (CORE_INCLUDES grdk.h)
56+ set (CORE_LIBS xgameruntime.lib)
57+
58+ file (GLOB HEADERS "${WINDOWS_PATH} /include/X*.*" )
59+ foreach (t IN LISTS HEADERS)
60+ get_filename_component (h ${t} NAME )
61+ list (APPEND CORE_INCLUDES ${h} )
62+ endforeach ()
63+
64+ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" )
65+ list (APPEND CORE_BINS xgameruntime.thunks.dll GameChat2.dll GameChat2.pdb libHttpClient.dll libHttpClient.pdb XCurl.dll XCurl.pdb)
66+ list (APPEND CORE_LIBS GameChat2.lib libHttpClient.lib XCurl.lib xgameruntime.thunks.lib)
67+
68+ file (INSTALL "${WINDOWS_PATH} /bin/x64/Microsoft.Xbox.Services.C.Thunks.dll" DESTINATION "${CURRENT_PACKAGES_DIR} /bin" )
69+ file (INSTALL "${WINDOWS_PATH} /bin/x64/Microsoft.Xbox.Services.C.Thunks.pdb" DESTINATION "${CURRENT_PACKAGES_DIR} /bin" )
70+ file (INSTALL "${WINDOWS_PATH} /lib/x64/Microsoft.Xbox.Services.C.Thunks.lib" DESTINATION "${CURRENT_PACKAGES_DIR} /lib" )
71+ file (INSTALL "${WINDOWS_PATH} /lib/x64/Microsoft.Xbox.Services.142.C.lib" DESTINATION "${CURRENT_PACKAGES_DIR} /lib" )
72+ file (INSTALL "${WINDOWS_PATH} /lib/x64/Microsoft.Xbox.Services.142.C.pdb" DESTINATION "${CURRENT_PACKAGES_DIR} /lib" )
73+
74+ file (INSTALL "${WINDOWS_PATH} /bin/x64/Microsoft.Xbox.Services.C.Thunks.Debug.dll" DESTINATION "${CURRENT_PACKAGES_DIR} /debug/bin" )
75+ file (INSTALL "${WINDOWS_PATH} /bin/x64/Microsoft.Xbox.Services.C.Thunks.Debug.pdb" DESTINATION "${CURRENT_PACKAGES_DIR} /debug/bin" )
76+ file (INSTALL "${WINDOWS_PATH} /lib/x64/Microsoft.Xbox.Services.C.Thunks.Debug.lib" DESTINATION "${CURRENT_PACKAGES_DIR} /debug/lib" )
77+ file (INSTALL "${WINDOWS_PATH} /lib/x64/Microsoft.Xbox.Services.142.C.Debug.lib" DESTINATION "${CURRENT_PACKAGES_DIR} /debug/lib" )
78+ file (INSTALL "${WINDOWS_PATH} /lib/x64/Microsoft.Xbox.Services.142.C.Debug.pdb" DESTINATION "${CURRENT_PACKAGES_DIR} /debug/lib" )
79+
80+ list (APPEND CORE_INCLUDES cpprestsdk_impl.h XCurl.h GameChat2.h GameChat2Impl.h GameChat2_c.h)
81+
82+ set (INCLUDE_DIRS httpClient Xal xsapi-c xsapi-cpp)
83+ endif ()
2984
30- vcpkg_cmake_configure(
31- SOURCE_PATH "${GRDK_PATH} "
32- OPTIONS ${FEATURE_OPTIONS}
33- )
85+ foreach (t IN LISTS CORE_BINS)
86+ file (INSTALL "${WINDOWS_PATH} /bin/${VCPKG_TARGET_ARCHITECTURE} /${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /bin" )
87+ file (INSTALL "${WINDOWS_PATH} /bin/${VCPKG_TARGET_ARCHITECTURE} /${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /debug/bin" )
88+ endforeach ()
89+
90+ foreach (t IN LISTS CORE_INCLUDES)
91+ file (INSTALL "${WINDOWS_PATH} /include/${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /include" )
92+ endforeach ()
3493
35- vcpkg_cmake_install()
94+ foreach (t IN LISTS INCLUDE_DIRS)
95+ file (INSTALL "${WINDOWS_PATH} /include/${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /include" )
96+ endforeach ()
3697
37- vcpkg_cmake_config_fixup(PACKAGE_NAME xbox.gameruntime)
38- vcpkg_cmake_config_fixup(PACKAGE_NAME xbox.game.chat.2.cpp.api)
39- vcpkg_cmake_config_fixup(PACKAGE_NAME xbox.libhttpclient)
40- vcpkg_cmake_config_fixup(PACKAGE_NAME xbox.services.api.c)
41- vcpkg_cmake_config_fixup(PACKAGE_NAME xbox.xcurl.api)
98+ foreach (t IN LISTS CORE_LIBS)
99+ file (INSTALL "${WINDOWS_PATH} /lib/${VCPKG_TARGET_ARCHITECTURE} /${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /lib" )
100+ file (INSTALL "${WINDOWS_PATH} /lib/${VCPKG_TARGET_ARCHITECTURE} /${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /debug/lib" )
101+ endforeach ()
42102
103+ # Build license file.
43104set (LICENSE_FILES "${PACKAGE_PATH} /LICENSE.md" )
44105
45106list (APPEND LICENSE_FILES
46- "${GRDK_PATH} /ExtensionLibraries/Xbox.LibHttpClient/Include/httpClient/ThirdPartyNotices.txt"
47- "${GRDK_PATH} /ExtensionLibraries/Xbox.XCurl.API/Include/ThirdPartyNotices.txt"
48- "${GRDK_PATH} /ExtensionLibraries/Xbox.Services.API.C/Include/cpprest/ThirdPartyNotices.txt"
49- "${GRDK_PATH} /ExtensionLibraries/Xbox.Services.API.C/Include/pplx/ThirdPartyNotices.txt"
50- "${GRDK_PATH} /ExtensionLibraries/Xbox.Services.API.C/Include/xsapi-c/ThirdPartyNotices.txt"
51- "${GRDK_PATH} /ExtensionLibraries/Xbox.Services.API.C/Include/xsapi-cpp/ThirdPartyNotices.txt"
107+ "${WINDOWS_PATH} /include/httpClient/ThirdPartyNotices.txt"
108+ "${WINDOWS_PATH} /include/ThirdPartyNotices.txt"
109+ "${WINDOWS_PATH} /include/xsapi-c/ThirdPartyNotices.txt"
110+ "${WINDOWS_PATH} /include/xsapi-cpp/ThirdPartyNotices.txt"
52111)
53112
54113file (INSTALL "${CMAKE_CURRENT_LIST_DIR} /usage" DESTINATION "${CURRENT_PACKAGES_DIR} /share/${PORT} " )
55114
115+ # Optional PlayFab components
56116if ("playfab" IN_LIST FEATURES)
57- vcpkg_cmake_config_fixup(PACKAGE_NAME playfab.multiplayer.cpp)
58- vcpkg_cmake_config_fixup(PACKAGE_NAME playfab.party.cpp)
59- vcpkg_cmake_config_fixup(PACKAGE_NAME playfab.partyxboxlive.cpp)
60- vcpkg_cmake_config_fixup(PACKAGE_NAME playfab.services.c)
61117
62- list (APPEND LICENSE_FILES
63- "${GRDK_PATH} /ExtensionLibraries/PlayFab.Multiplayer.Cpp/Include/NOTICE.txt"
64- "${GRDK_PATH} /ExtensionLibraries/PlayFab.Party.Cpp/Include/NOTICE.txt"
65- "${GRDK_PATH} /ExtensionLibraries/PlayFab.PartyXboxLive.Cpp/Include/NOTICE.txt"
66- )
118+ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" )
119+ set (PF_BINS
120+ PlayFabCore.dll PlayFabCore.pdb PlayFabServices.dll PlayFabServices.pdb PlayFabMultiplayer.dll PlayFabMultiplayer.pdb
121+ Party.dll Party.pdb PartyXboxLive.dll PartyXboxLive.pdb PlayFabGameSave.dll PlayFabGameSave.pdb)
122+
123+ set (PF_LIBS
124+ PlayFabCore.lib PlayFabServices.lib PlayFabMultiplayer.lib
125+ Party.lib PartyXboxLive.lib PlayFabGameSave.lib)
126+
127+ file (INSTALL "${WINDOWS_PATH} /include/playfab" DESTINATION "${CURRENT_PACKAGES_DIR} /include" )
128+ file (INSTALL "${WINDOWS_PATH} /include/PFXGameSave.h" DESTINATION "${CURRENT_PACKAGES_DIR} /include" )
129+ endif ()
130+
131+ foreach (t IN LISTS PF_BINS)
132+ file (INSTALL "${WINDOWS_PATH} /bin/${VCPKG_TARGET_ARCHITECTURE} /${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /bin" )
133+ file (INSTALL "${WINDOWS_PATH} /bin/${VCPKG_TARGET_ARCHITECTURE} /${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /debug/bin" )
134+ endforeach ()
135+
136+ foreach (t IN LISTS PF_LIBS)
137+ file (INSTALL "${WINDOWS_PATH} /lib/${VCPKG_TARGET_ARCHITECTURE} /${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /lib" )
138+ file (INSTALL "${WINDOWS_PATH} /lib/${VCPKG_TARGET_ARCHITECTURE} /${t} " DESTINATION "${CURRENT_PACKAGES_DIR} /debug/lib" )
139+ endforeach ()
140+
141+ list (APPEND LICENSE_FILES "${WINDOWS_PATH} /include/playfab/multiplayer/NOTICE.txt" )
67142
68143 file (READ "${CMAKE_CURRENT_LIST_DIR} /pfusage" USAGE_CONTENT)
69144 file (APPEND "${CURRENT_PACKAGES_DIR} /share/${PORT} /usage" ${USAGE_CONTENT} )
70- else ()
71- endif ()
72145
73- file (INSTALL "${PACKAGE_PATH} /native/bin/" DESTINATION "${CURRENT_PACKAGES_DIR} /tools" )
74- file (INSTALL "${PACKAGE_PATH} /native/bin/GameConfigEditorDependencies" DESTINATION "${CURRENT_PACKAGES_DIR} /tools" )
146+ endif ()
75147
76- file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /debug/include" )
148+ set (EXT_TOOLSET 142)
149+ configure_file ("${CMAKE_CURRENT_LIST_DIR} /gdk-config.cmake.in"
150+ "${CURRENT_PACKAGES_DIR} /share/${PORT} /${PORT} -config.cmake"
151+ @ONLY)
77152
78- # Uses the cpprestsdk port instead
79- file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /include/cpprest" )
80- file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /include/pplx" )
153+ #file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
81154
82155vcpkg_install_copyright(FILE_LIST ${LICENSE_FILES} )
83156
84- message (STATUS "BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS: https://www.nuget.org/packages/Microsoft.GDK.PC /${VERSION} /License" )
157+ message (STATUS "BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS: https://www.nuget.org/packages/Microsoft.GDK.Windows /${VERSION} /License" )
0 commit comments