xray-16 icon indicating copy to clipboard operation
xray-16 copied to clipboard

[POC] Restore 3rd party dependencies using NuGet for MSVC generator

Open pavel-rodionov opened this issue 11 months ago • 2 comments

Attempt to bring project closer to migration from hardcoded MSVS solutions to Cmake based generator.

Verification:

  • Install nuget cli winget install -e --id Microsoft.NuGet
  • Run Cmake generator cmake ..\xray-16 -G "Visual Studio 17 2022" -A x64 -DXRAY_USE_LUAJIT=OFF
  • Verify that packages listed as nuget dependencies are downloaded into ./packages
  • Open MSVC solution. Verify that target xrLC_Light does include d3dx9 headers and they are included from expected location ..\..\..\packages\Microsoft.DXSDK.D3DX.9.29.952.8\build\native\include\d3dx9.h

pavel-rodionov avatar Mar 03 '24 08:03 pavel-rodionov

Is nuget from dotnet sdk also usable with this pr? What about offline builds? (nuget restore requires an internet connection, otherwise build fails).

MerijnHendriks avatar Mar 03 '24 15:03 MerijnHendriks

@MerijnHendriks If nuget cli is available in your system PATH it should work. With that said I haven't tested it.

Regarding offline builds - when files are already downloaded and available in local file system it works offline just fine. To initially restore files you obviously need an active network connection (that is on pair with current solution when VS restore them using dependencies defined in solutions)

pavel-rodionov avatar Mar 04 '24 03:03 pavel-rodionov