﻿Building Brontide-NS2 1.5.0 on Windows (MSVC)
=============================================

Needs: Visual Studio 2022 (MSVC v143, x64), Windows 10/11 SDK 10.0.26100, CMake 3.31+, Ninja or MSBuild, Qt 6 (static, as in the CMake cache) and git.

1. C++/WinRT headers. The prebuilt Qt was built against a newer C++/WinRT than the SDK ships, which fails at link time
   (LNK2038 version mismatch). Copy the SDK headers and bump the version string:
     robocopy "%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.26100.0\cppwinrt" cppwinrt-shim /E
     then replace "2.0.250303.1" with "2.0.250303.5" in every .h under cppwinrt-shim
   (no cppwinrt.exe run is needed; the SDK already contains the generated headers).

2. STL shim. The Qt prebuilts reference MSVC vector algorithm symbols (__std_rotate, __std_unique_*, ...) that older
   toolsets do not export. Compile the file next to this one from a "x64 Native Tools" prompt:
     cl /nologo /c /O2 /EHsc /std:c++20 msvc_compat.cpp /Fo:msvc_compat.obj

3. Configure and build (PowerShell, from the source folder):
     $env:INCLUDE = "<full path>\cppwinrt-shim;$env:INCLUDE"
     $env:LINK = "<full path>\msvc_compat.obj"
     cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
     cmake --build build --config Release --target lichii

Output: build\bin\Release\brontide-ns2.exe. Copy renhdrum.dll (from https://github.com/trzz1214/RenHDrum, v0.6.0) next to it.