Skip to content

Commit

Permalink
Generate FlatBuffers on pre-build for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
TangilJ committed Jun 21, 2024
1 parent 50934c4 commit 40db78b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions RLBotCS/RLBotCS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,13 @@
</ContentWithTargetPath>
</ItemGroup>

<Target Name="GenerateFlatBuffersWindows" BeforeTargets="PreBuildEvent" Condition=" '$(OS)' == 'Windows_NT' ">
<Exec Command="call ../generate-flatbuffers.bat" />
</Target>

<Target Name="GenerateFlatBuffersLinux" BeforeTargets="PreBuildEvent"
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">
<!-- TODO -->
</Target>

</Project>
2 changes: 2 additions & 0 deletions generate-flatbuffers.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@echo off

cd /D "%~dp0"

echo Generating flatbuffers header file...

.\RLBotCS\flatbuffers-schema\flatc.exe --csharp --gen-all --gen-object-api --gen-onefile -o .\RLBotCS\FlatBuffer .\RLBotCS\flatbuffers-schema\rlbot.fbs
Expand Down

0 comments on commit 40db78b

Please sign in to comment.