다음을 통해 공유


간소화된 GDKX 디렉터리 구조

참고 항목

이 항목에 설명된 헤더 및 라이브러리에 대한 새로운 Microsoft GDK(게임 개발 키트) 레이아웃은 2025년 10월 GDK에서 릴리스될 예정입니다. 이 GDK의 미리 보기 빌드에 관심이 있는 경우 Microsoft 계정 관리자에게 문의하세요.

현재 버전의 Microsoft GDK(게임 개발 키트)에서 레이아웃은 코드 공유를 중심으로 최적화되었으며 특정 플랫폼에 집중되었습니다. 이 레이아웃에 대한 빌드 통합은 MSBuild 사용자 지정 플랫폼의 복잡성을 숨기는 데 크게 의존했습니다. 새 레이아웃의 경우 통합을 간소화하고, 증가하는 대상 플랫폼 목록을 지원하고, 주식 MSBuild 플랫폼과 타사 빌드 시스템 모두에 대한 지원을 개선하는 데 중점을 두고 있습니다.

이전 헤더 및 라이브러리 레이아웃

Microsoft GDK의 기존 파일 레이아웃은 다음과 같이 요약됩니다.

251000\
    GRDK\
        ExtensionLibraries\
            Xbox.Services.API.C\
                ExtensionLibrary.props
                DesignTime\CommonConfiguration\Neutral\
                    Include\
                    Lib\
                    Redist\
            ...
        GameKit\
            Include\
            Lib\
                amd64\
    GXDK\
        gameKit\
            Include\
                XboxOne\
                Scarlett\
            Lib\
                amd64\
                    XboxOne\
                    Scarlett\
        ToolKit\
            Include\
                    XboxOne\
                    Scarlett\
            Lib\
                amd64\
                    XboxOne\
                    Scarlett\

Gaming.Desktop.x64, Gaming.Xbox.Scarlett.x64Gaming.Xbox.XboxOne.x64 사용자 지정 MSBuild 플랫폼은 이 모든 콘텐츠를 다양한 방식으로 결합하는 include/lib 경로를 빌드하기 위한 모든 논리를 구현합니다. CMake 또는 사용자 지정 메이크 솔루션을 사용한 경우 이 논리도 구현해야 했습니다. 자세한 예제는 CMakeExample의 2025년 4월 버전을 참조하세요.

이전 레이아웃은 이전 스타일과 새 스타일을 모두 지원하기 위해 2025년 10월 GDK에 계속 제공됩니다. 새 레이아웃과 이전 레이아웃은 모두 기본적으로 설치됩니다. 이제 GDK 설정에는 새 레이아웃만 설치하는 옵션이 포함되어 있습니다. 향후 GDK는 하드 드라이브 공간과 전체 다운로드 크기를 줄이기 위해 이전 레이아웃을 제거합니다. 이전 레이아웃을 제거하기 위한 현재 목표 날짜는 2025년 10월 GDK가 릴리스된 시점으로부터 1년이 됩니다.

새 헤더 및 라이브러리 레이아웃

2025년 10월 GDK 릴리스의 경우 이제 플랫폼 통합이 훨씬 쉽고 시간이 지남에 따라 추가 플랫폼을 수용할 수 있도록 하는 헤더 및 라이브러리에 대한 대체 레이아웃을 제공합니다.

251000\
    windows\
        bin\
            arm64
            x64\
        include\
        lib\
            arm64
            x64\
        redist

    xbox\
        bin\
           gen8\
           gen9\
           devpctools\
              gen8\
              gen9\
              x64\
           x64\
        build\
        include\
        lib\
        redist\
        source\

MSBuild 사용자 지정 플랫폼과 함께 새 레이아웃 사용

기존 Gaming.*.x64 MSBuild 플랫폼은 기본적으로 이전 레이아웃을 사용하지만 GDKCrossPlatform 속성을 설정하여 새 레이아웃을 옵트인할 수 있습니다.

<PropertyGroup Label="Globals">
...
  <GDKCrossPlatform>true</GDKCrossPlatform>
</PropertyGroup>

이렇게 하면 이전 레이아웃에서 사용된 다양한 복합 경로 대신 적절한 include/lib 경로가 프로젝트에 추가됩니다.

이 새로운 간소화된 통합에서는 확장 라이브러리 메커니즘이 더 이상 사용되지 않습니다. 모든 콘텐츠는 기본적으로 include/lib 경로에서 빌드 타임에 사용할 수 있습니다.

그런 다음 프로젝트에서 사용하는 추가 라이브러리에 연결해야 합니다. 이전 GDK 프로젝트 템플릿을 기반으로 빌드된 프로젝트에는 다음과 같은 문이 포함되어야 합니다.

<AdditionalDependencies>uuid.lib;$(Console_Libs);%(XboxExtensionsDependencies);%(AdditionalDependencies)</AdditionalDependencies>

새 레이아웃의 경우 Console_Libs 속성은 핵심 필수 라이브러리를 나열합니다.

플랫폼 코어 libs
Gaming.*.x64 xgameruntime.lib d3d12.lib dxguid.lib dxgi.lib gameinput.lib
Gaming.Xbox.Scarlett.x64 xgameruntime.lib xgameplatform.lib d3d12_xs.lib xg_xs.lib pixevt.lib xmem.lib
Gaming.Xbox.XboxOne.x64 xgameruntime.lib xgameplatform.lib d3d12_x.lib xg_x.lib pixevt.lib xmem.lib

프로젝트는 각각 '옵트인'이므로 사용하는 확장 라이브러리를 AdditionalDependencies 에 추가해야 합니다.

플랫폼 코어 libs
Xbox.LibHttpClient libHttpClient.lib
Xbox.XCurl.API XCurl.lib
Xbox.Game.Chat.2.Cpp.API GameChat2.lib
Xbox.Services.API.C(디버그) Appnotify.lib winhttp.lib crypt32.lib Microsoft.Xbox.Services.142.C.Debug.lib
Xbox.Services.API.C(릴리스) Appnotify.lib winhttp.lib crypt32.lib Microsoft.Xbox.Services.142.C.lib
PlayFab.Party.Cpp Party.lib
PlayFab.PartyXboxLive.Cpp PartyXboxLive.lib
PlayFab.Services.C PlayFabCore.lib PlayFabGameSave.lib PlayFabServices.lib
PlayFab.Multiplayer.Cpp PlayFabMultiplayer.lib

또한 프로젝트에서 사용하는 추가 DLL을 레이아웃에 복사해야 합니다. 이 작업은 많은 DLL 라이브러리 통합의 일반적인 사용자 지정 빌드 단계를 통해 수행하거나 vcxproj를 편집하거나 ReferenceCopyLocalPaths 항목 그룹 목록을 사용할 props 파일을 추가하여 수행할 수 있습니다. 아래 MSBuild에는 가능한 모든 DLL이 나열되지만 개별 프로젝트에는 이러한 DLL 중 일부만 필요합니다.

  <PropertyGroup>
    <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKCoreLatest)</GDKCrossPlatformPath>
    <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKXboxLatest)</GDKCrossPlatformPath>
  </PropertyGroup>

  <ItemGroup Condition="'$(Platform)'=='Gaming.Desktop.x64'">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\libHttpClient.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\XCurl.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\GameChat2.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\Party.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PartyXboxLive.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PlayFabCore.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PlayFabGameSave.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PlayFabMultiplayer.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PlayFabServices.dll" />
  </ItemGroup>

  <ItemGroup Condition="'$(Platform)'=='Gaming.Xbox.Scarlett.x64'">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\libHttpClient.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\XCurl.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\GameChat2.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\Party.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PartyXboxLive.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabCore.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabGameSave.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabMultiplayer.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabServices.dll" />
  </ItemGroup>

  <ItemGroup Condition="'$(Platform)'=='Gaming.Xbox.XboxOne.x64'">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\libHttpClient.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\XCurl.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\GameChat2.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\Party.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PartyXboxLive.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabCore.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabGameSave.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabMultiplayer.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabServices.dll" />
  </ItemGroup>

참고 항목

GameDKLatest 는 Xbox 확장이 있는 Microsoft GDK에서만 설정됩니다. 그 결과 Microsoft GDK에서 설정한 두 버전의 Microsoft GDK GameDKCoreLatest : 의 병렬 설치를 완벽하게 지원하는 새로운 환경 변수를 도입했습니다. GameDKXboxLatest 은 Xbox 확장과 함께 Microsoft GDK에 의해 설정됩니다.

Directory.Build.props 사용

새 레이아웃을 사용하여 기존 GDK Gaming.*.x64 프로젝트의 유효성을 신속하게 검사하는 방법으로 다음 콘텐츠를 원본 트리의 Directory.Build.props 파일에 배치합니다. 이렇게 하면 새 레이아웃을 옵트인하고 프로젝트에서 사용하지 않더라도 대부분 또는 모든 확장 라이브러리가 포함됩니다.

참고 항목

GDKCrossPlatform을 true로 설정하여 빌드할 때는 MSBuild 규칙에서 GDKExtLibNames 속성을 사용하지 않습니다. 이전 MSBuild 규칙을 사용하여 빌드하기 위해 이미 존재하기 때문에 레이아웃에서 일부 추가 DLL을 옵트인하는 방법으로 이 props 파일에 사용됩니다.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup>
    <GDKCrossPlatform>true</GDKCrossPlatform>
    <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKCoreLatest)</GDKCrossPlatformPath>
    <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKXboxLatest)</GDKCrossPlatformPath>
    <AllExtensionLibs>Appnotify.lib;winhttp.lib;crypt32.lib;libHttpClient.lib;XCurl.lib;GameChat2.lib;PlayFabCore.lib;PlayFabServices.lib;PlayFabMultiplayer.lib;Party.lib;PartyXboxLive.lib;PlayFabGameSave.lib</AllExtensionLibs>
    <AllExtensionLibs Condition="'$(Configuration)'=='Debug'">Microsoft.Xbox.Services.142.C.Debug.lib;$(AllExtensionLibs)</AllExtensionLibs>
    <AllExtensionLibs Condition="'$(Configuration)'!='Debug'">Microsoft.Xbox.Services.142.C.lib;$(AllExtensionLibs)</AllExtensionLibs>
  </PropertyGroup>

  <ItemDefinitionGroup Condition="'$(Platform)'=='Gaming.Desktop.x64'">
    <Link>
      <AdditionalDependencies>$(AllExtensionLibs);%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>

  <!--
    We use XboxExtensionsDependencies because of a hack in our Gaming.Xbox.*.x64 platforms which forces
    AdditionalDependencies to xgameplatform.lib, but means we can't use AdditionalDependencies this early.
  -->

  <ItemDefinitionGroup Condition="'$(Platform)'=='Gaming.Xbox.Scarlett.x64' OR '$(Platform)'=='Gaming.Xbox.XboxOne.x64'">
    <Link>
      <XboxExtensionsDependencies>$(AllExtensionLibs);%(XboxExtensionsDependencies)</XboxExtensionsDependencies>
    </Link>
  </ItemDefinitionGroup>

  <!--
    Makes sure we deploy all the libs we need. We use the 'old layout' GDKExtLibNames property as a way to test
    what is requested to try to reduce the over-inclusion of unused DLLs.
  -->

  <ItemGroup Condition="'$(Platform)'=='Gaming.Desktop.x64'">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\libHttpClient.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\XCurl.dll" />
  </ItemGroup>

  <ItemGroup Condition="'$(Platform)'=='Gaming.Desktop.x64' AND $(GDKExtLibNames.Contains('Xbox.Game.Chat.2.Cpp.API'))">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\GameChat2.dll" />
  </ItemGroup>

  <ItemGroup Condition="'$(Platform)'=='Gaming.Desktop.x64' AND $(GDKExtLibNames.Contains('PlayFab'))">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\Party.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PartyXboxLive.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PlayFabCore.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PlayFabGameSave.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PlayFabMultiplayer.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)windows\bin\x64\PlayFabServices.dll" />
  </ItemGroup>

  <ItemGroup Condition="'$(Platform)'=='Gaming.Xbox.Scarlett.x64' OR '$(Platform)'=='Gaming.Xbox.XboxOne.x64'">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\libHttpClient.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\XCurl.dll" />
  </ItemGroup>

  <ItemGroup Condition="('$(Platform)'=='Gaming.Xbox.Scarlett.x64' OR '$(Platform)'=='Gaming.Xbox.XboxOne.x64') AND $(GDKExtLibNames.Contains('Xbox.Game.Chat.2.Cpp.API'))">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\GameChat2.dll" />
  </ItemGroup>

  <ItemGroup Condition="('$(Platform)'=='Gaming.Xbox.Scarlett.x64' OR '$(Platform)'=='Gaming.Xbox.XboxOne.x64') AND $(GDKExtLibNames.Contains('PlayFab'))">
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\Party.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PartyXboxLive.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabCore.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabGameSave.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabMultiplayer.dll" />
    <ReferenceCopyLocalPaths Include="$(GDKCrossPlatformPath)xbox\bin\x64\PlayFabServices.dll" />
  </ItemGroup>

</Project>

MSBuild x64 플랫폼에서 새 레이아웃 사용

Gaming.Desktop.x64 플랫폼을 사용하는 대신 스톡 x64 플랫폼을 사용하여 PC용으로 빌드할 수 있습니다. 이전 레이아웃에서는 Microsoft GDK(게임 개발 키트)와 함께 x64 플랫폼 사용에 설명된 대로 확장 라이브러리에 대한 문을 추가 <Import Project="...\ExtensionLibrary.props"> 해야 했습니다.

새 레이아웃에서 통합 지침이 간소화됩니다.

  <PropertyGroup>
    <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKCoreLatest)</GDKCrossPlatformPath>
    <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKXboxLatest)</GDKCrossPlatformPath>
  </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
  <ExecutablePath>$(GameDK)bin;$(GDKCrossPlatformPath)windows\bin\x64;$(ExecutablePath)</ExecutablePath>
  <IncludePath>$(GDKCrossPlatformPath)windows\Include;$(IncludePath);</IncludePath>
  <LibraryPath>$(GDKCrossPlatformPath)windows\lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
  <ExecutablePath>$(GameDK)bin;$(GDKCrossPlatformPath)windows\bin\x64;$(ExecutablePath)</ExecutablePath>
  <IncludePath>$(GDKCrossPlatformPath)windows\Include;$(IncludePath);</IncludePath>
  <LibraryPath>$(GDKCrossPlatformPath)windows\lib\x64;$(LibraryPath)</LibraryPath>
</PropertyGroup>

원래 목록과 함께 AdditionalDependencies 에 필요한 모든 확장 라이브러리를 추가합니다.

<AdditionalDependencies>xgameruntime.lib;gameinput.lib;d3d12.lib;dxgi.lib;dxguid.lib;uuid.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>

사용자 지정 빌드 작업을 사용하거나 최종 레이아웃에 ReferenceCopyLocalPaths 항목 그룹을 사용하여 옵트인 확장 라이브러리 DLL을 위와 같이 이진 디렉터리에 복사해야 합니다.

이미지 자산을 사용하여 .mgc 파일을 처리하는 전처리기Definitions 에 대한 나머지 지침은 변경되지 않은 상태로 유지됩니다.

CMake에서 새 레이아웃 사용

CMake에서 Microsoft Visual Studio 생성기를 사용하고 Gaming.*.x64 사용자 지정 MSBuild 플랫폼을 사용하는 경우 새 레이아웃은 다음과 같이 사용하도록 설정됩니다.

set_property(TARGET ${PROJECT_NAME} PROPERTY VS_GLOBAL_GDKCrossPlatform "true")

CMakeGDKExample에서 사용을 VS_GLOBAL_GDKExtLibNames 제거하고 다음(CMake 3.21 이상이라고 가정)으로 바꿔서 사용된 확장 DLL을 레이아웃에 복사합니다.

add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E $<IF:$<BOOL:$<TARGET_RUNTIME_DLLS:${PROJECT_NAME}>>,copy,true>
    $<TARGET_RUNTIME_DLLS:${PROJECT_NAME}> $<TARGET_FILE_DIR:${PROJECT_NAME}>
    COMMAND_EXPAND_LISTS
    )

사용자 지정 빌드 시스템에서 새 레이아웃 사용

GDK를 사용하여 Windows x64용으로 빌드하려면 다음이 필요합니다.

set INCLUDE=%GameDKXboxLatest%windows\include;%INCLUDE%
set LIB=%GameDKXboxLatest%windows\lib\x64;%LIB%
set PATH=%GameDK%bin;%GameDKXboxLatest%windows\bin\x64;%PATH%

Xbox Series X|S(즉, Gaming.Xbox.Scarlett.x64라고도 합니다)을 위해 빌드하려면 다음이 필요합니다.

set INCLUDE=%GameDKXboxLatest%xbox\include\gen9;%GameDKXboxLatest%xbox\include;%INCLUDE%
set LIB=%GameDKXboxLatest%xbox\lib\gen9;%GameDKXboxLatest%xbox\lib\x64;%LIB%
set PATH=%GameDK%bin;%GameDKXboxLatest%xbox\bin\gen9;%GameDKXboxLatest%xbox\bin\x64;%PATH%

Xbox One(즉 , Gaming.Xbox.XboxOne.x64)을 위해 빌드하려면 다음이 필요합니다.

set INCLUDE=%GameDKXboxLatest%xbox\include\gen8;%GameDKXboxLatest%xbox\include;%INCLUDE%
set LIB=%GameDKXboxLatest%xbox\lib\gen8;%GameDKXboxLatest%xbox\lib\x64;%LIB%
set PATH=%GameDK%bin;%GameDKXboxLatest%xbox\bin\gen8;%GameDKXboxLatest%xbox\bin\x64;%PATH%

PC 콘텐츠 도구에 새 레이아웃 사용

콘솔 개발을 위해 XTF API, XMA2 인코딩 라이브러리 및/또는 사용자 지정 Direct3D 12.X 도구를 사용하여 개발 PC에서 일종의 콘텐츠 '요리'가 수행됩니다. 이 콘텐츠에 액세스하려면 특정 빌드 설정이 필요합니다.

Xbox One과 Xbox Series X|S 모두 대상으로 하는 PC 도구를 빌드하려면 다음이 필요합니다.

set INCLUDE=%GameDKXboxLatest%xbox\include\devpctools;%GameDK%\toolKit\include;%INCLUDE%
set LIB=%GameDKXboxLatest%xbox\lib\devpctools\x64;%GameDK%\toolKit\lib\amd64;%LIB%
set PATH=%GameDK%bin;%PATH%

Xbox Series X|S 그래픽을 대상으로 하는 PC 도구를 빌드하려면 다음이 필요합니다.

set INCLUDE=%GameDKXboxLatest%xbox\include\devpctools\gen9;%GameDKXboxLatest%xbox\include\devpctools;%GameDK%\toolKit\include;%INCLUDE%
set LIB=%GameDKXboxLatest%xbox\lib\devpctools\gen9;%GameDKXboxLatest%xbox\lib\devpctools\x64;%GameDK%\toolKit\lib\amd64;%LIB%
set PATH=%GameDKXboxLatest%xbox\devpctools\bin\gen9;%GameDK%bin;%PATH%

Xbox One 그래픽을 대상으로 하는 PC 도구를 빌드하려면 다음이 필요합니다.

set INCLUDE=%GameDKXboxLatest%xbox\include\devpctools\gen8;%GameDKXboxLatest%xbox\include\devpctools;%GameDK%\toolKit\include;%INCLUDE%
set LIB=%GameDKXboxLatest%xbox\lib\devpctools\gen8;%GameDKXboxLatest%xbox\lib\devpctools\x64;%GameDK%\toolKit\lib\amd64;%LIB%
set PATH=%GameDKXboxLatest%xbox\devpctools\bin\gen8;%GameDK%bin;%PATH%

설치된 파일에서 빌드 버전 읽기

새 레이아웃에는 또는 gxdk.ini 파일이 포함되어 grdk.ini 있지 않습니다. 파일을 구문 분석하여 버전 정보를 찾으려면 또는 gxdk.h를 사용합니다grdk.h.

다음은 이전 GDK 릴리스에서도 작동하는 PowerShell의 예입니다.

$result = Get-ChildItem -Path $env:GameDKXboxLatest -Filter "gxdk.h" -Recurse
if ($result.Count -eq 0)
{
    $result = Get-ChildItem -Path $env:GXDKLatest -Filter "gxdk.h" -Recurse
}
if ($result.Count -eq 0)
{
    Write-Error "##[error]Failed to find gxdk.h in either GameDKXboxLatest or GXDKLatest" -ErrorAction Stop
}

$content = Get-Content -Path $result[0].FullName

if (-not ([string]$content -match '#define\s+_GXDK_EDITION\s+([0-9][0-9][0-9][0-9][0-9][0-9])')) {
    Write-Error "##[error]Failed to find edition define" -ErrorAction Stop
}

$xbld_edition = $Matches[1]

if (-not ([string]$content -match '#define\s+_GXDKVER_PRODUCTBUILDVER_FULL\s+([0-9]+\.[0-9]+\.([0-9]+)\.[0-9]+)')) {
    Write-Error "##[error]Failed to find full version define" -ErrorAction Stop
}

$xbld_full_productbuild = $Matches[1]
$xbld_build = $Matches[2]

if (-not ([string]$content -match '#define\s+_GXDK_MM_NUM\s+([0-9]{1,2})')) {
    Write-Error "##[error]Failed to find month define" -ErrorAction Stop
}

$month = $Matches[1]

if (-not ([string]$content -match '#define\s+_GXDK_FULLYY\s+([0-9]{4})')) {
    Write-Error "##[error]Failed to find full year define" -ErrorAction Stop
}

$year = $Matches[1]

Write-Output ("_xbld_name={0} {1} GXDK" -f (Get-Culture).DateTimeFormat.GetMonthName([int]$month), $year)
Write-Output ("_xbld_edition={0}" -f $xbld_edition)
Write-Output ("_xbld_full_productbuild={0}" -f $xbld_full_productbuild)
Write-Output ("_xbld_build={0}" -f $xbld_build)

설치하지 않고 빌드(BWOI)

원래 이전 레이아웃의 아래에 <edition>\flatDeployment 있던 MSBuild 사용자 지정 빌드 플랫폼 파일은 이제 단축된 경로로 아래에 <edition>\xbox\build 있습니다.

예를 들어 VS 2022용 BWOI MSBuild 규칙 폴더를 설정하려면 다음 명령을 사용합니다.

rd /q /s c:\temp\msbuildgdk
md c:\temp\msbuildgdk
xcopy "%VSInstallDir%\MSBuild\Microsoft\VC" /s c:\temp\msbuildgdk
xcopy "%GameDKXboxLatest%\xbox\build\VS2022\gen8" c:\temp\msbuildgdk /s
xcopy "%GameDKXboxLatest%\xbox\build\VS2022\gen9" c:\temp\msbuildgdk /s
xcopy "%GameDKXboxLatest%\xbox\build\VS2022\pc" c:\temp\msbuildgdk /s

그런 다음 BWOI에 사용되는 Directory.Build.props에서 속성을 이 결합된 폴더를 가리키도록 설정합니다.

<PropertyGroup Condition="'$([System.Text.RegularExpressions.Regex]::IsMatch('$(Platform)', 'Gaming\..+\.x64'))">
   <VCTargetsPath17>c:\temp\msbuildgdk\v170\</VCTargetsPath17>
   <VCTargetsPath16>c:\temp\msbuildgdk\v160\</VCTargetsPath16>
</PropertyGroup>