Modify Windows build and file query logging

Tighten the Vulkan ICD build script for Windows linking and Visual Studio detection, and add a syscall log when `NtQueryAttributesFile` returns `STATUS_OBJECT_NAME_NOT_FOUND` for missing non-synthetic paths. Also ignore the generated `Brovan/Properties` folder.
This commit is contained in:
AdvDebug
2026-07-06 21:14:01 +03:00
parent 0b2254d34a
commit 8d2f328ebd
3 changed files with 9 additions and 4 deletions
+1
View File
@@ -61,3 +61,4 @@ nunit-*.xml
/Brovan/.cache
/Brovan.Graphics/brovvulk-icd/generated
/VirtualFS
/Brovan/Properties
+4 -4
View File
@@ -93,7 +93,7 @@ if /i "%MODE%"=="msvc" (
) else (
"%COMPILER%" -O2 -c "vulkan_shim.c" -I. -I"..\vulkan-headers" -o "obj\build\vulkan_shim.o"
if not errorlevel 1 (
"%COMPILER%" -shared -o "bin\vulkan-1.dll" "obj\build\vulkan_shim.o" "obj\generated\exports.def" -Wl,--out-implib,"bin\vulkan-1.lib"
"%COMPILER%" -shared -static -static-libgcc -static-libstdc++ -o "bin\vulkan-1.dll" "obj\build\vulkan_shim.o" "obj\generated\exports.def" -Wl,--out-implib,"bin\vulkan-1.lib" -lkernel32
)
)
@@ -123,14 +123,14 @@ for %%P in (
"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat"
) do (
if exist "%%~P" (
if exist %%~P (
set "VSDEVCMD=%%~P"
goto :have_vsdevcmd
)
)
for /f "delims=" %%P in ('where vswhere.exe 2^>nul') do (
for /f "delims=" %%Q in ('"%%P" -latest -products * -requires Microsoft.Component.MSBuild -find Common7\Tools\VsDevCmd.bat 2^>nul') do (
for /f "usebackq delims=" %%P in (`where vswhere.exe 2^>nul`) do (
for /f "usebackq delims=" %%Q in (`"%%P" -latest -products * -requires Microsoft.Component.MSBuild -find Common7\Tools\VsDevCmd.bat 2^>nul`) do (
if exist "%%Q" (
set "VSDEVCMD=%%Q"
goto :have_vsdevcmd
@@ -41,8 +41,12 @@ namespace Brovan.Core.Emulation.OS.Windows
bool Exists = File.Exists(HostPath) || Directory.Exists(HostPath);
if (!Exists)
{
if (!Instance.WinHelper.IsSyntheticDirectory(EmulatedPath))
{
Instance.TriggerEventMessage($"[!] NtQueryAttributesFile: file not found: Name=\"{Name}\", FullName=\"{FullName}\", SyntheticDir=\"{EmulatedPath}\".", LogFlags.Syscall);
return NTSTATUS.STATUS_OBJECT_NAME_NOT_FOUND;
}
FillSyntheticDirectoryInformation(Instance, FileInformationPtr);
Instance.TriggerEventMessage($"[+] NtQueryAttributesFile: Name=\"{Name}\", FullName=\"{FullName}\", SyntheticDir=\"{EmulatedPath}\".", LogFlags.Syscall);