From b5d6c5fdbc9d7deaf4b53e25f6fc54d63426db92 Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Sat, 26 Aug 2023 21:37:33 -0700 Subject: [PATCH] Check directory and update README --- README.md | 2 ++ src/Flecs.NET.Bindgen/Program.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 926bbd66..b9d58d17 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ dotnet restore ``` ### Generate bindings Generate the binding code. Bindings are generated with [Bindgen.NET](https://github.com/BeanCheeseBurrito/Bindgen.NET). +> **Note** +> The binding generator needs access to system headers on MacOS. Ensure that XCode is installed. ```console dotnet run --project src/Flecs.NET.Bindgen ``` diff --git a/src/Flecs.NET.Bindgen/Program.cs b/src/Flecs.NET.Bindgen/Program.cs index cc0b1db4..f6995952 100644 --- a/src/Flecs.NET.Bindgen/Program.cs +++ b/src/Flecs.NET.Bindgen/Program.cs @@ -62,7 +62,7 @@ string GetMacOsHeaders() string path = process.StandardOutput.ReadToEnd().Trim(); - if (!Path.Exists(path)) + if (!Directory.Exists(path)) throw new DirectoryNotFoundException("Couldn't find system headers. Install XCode."); return path + "/usr/include";