Manually installing Windows SDK
IMPORTANT: installing the latest Windows SDK at the moment will not work.
We have updated our information about which SDK to install as well as the Microsoft download location for archive SDK.
https://docwiki.embarcadero.com/RADStudio/Florence/en/Windows_SDK_Installation
1) All the files used for patching the header can be found in :
$(BDS)\Bin\windows\patchsdk
2) The IDE will check the SDKs in the sdk.versions list it also uses this to find the locations. (This is the list that shows in the dialog in the IDE)
3) The .lst contains the files will be processed.
4) The .patch files contains the code uses to patch the headers.
To manually execute the patch process you do this... (OR as a batch file) from an administrator command prompt
1) Copy this to a text file:
set BDS=c:\embarcadero\studio\37.0
set WINSDKPATCHED=C:\Temp\WinSDKHeaders
cd "%BDS%\bin\windows\patchsdk\"
"patchsdk.exe" -q "C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0" "%WINSDKPATCHED%"
robocopy %WINSDKPATCHED% "%BDS%\include\windows\sdk" /MIR
2) Change the BDS environment variable to point to the IDE's root installed directory.
3) Change the WINSDKPATCHED environment variable to point to a *writable* location with enough disk space (136+Mbytes)
4) save it as a .bat file (or .cmd ) and run it in an Administrator command prompt.
Possible errors and solutions:
1) If you see an error as follows:
libc++abi: terminating due to uncaught exception of type std::runtime_error: collate_byname<char>::collate_byname failed to construct for en_US.UTF-8
it means that the OS does not support UTF-8 Unicode in the console. You need to run the patchsdk tool with an option --no-utf8
like this
Solution:
patchsdk.exe --no-utf8 -q "C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0" "%WINSDKPATCHED%"
2) You might get this error:
'excpt.h' file not found
Solution:
copy the file excpt.h from
%BDS%\include\windows\crtl to %BDS%\include\windows\sdk