mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
HAND FIXES: Fix upstream util scripts
This commit is contained in:
committed by
Peter Johnson
parent
1e7604f81c
commit
198771dde4
@@ -20,8 +20,8 @@ def copy_upstream_src(wpilib_root: Path):
|
||||
os.chdir("include/nlohmann")
|
||||
files = walk_if(Path("."), lambda dp, f: True)
|
||||
src_include_files = [f.absolute() for f in files]
|
||||
wpiutil_json_root = wpiutil / "src/main/native/thirdparty/json/include/wpi"
|
||||
dest_include_files = [wpiutil_json_root / f.with_suffix(".h") for f in files]
|
||||
wpiutil_json_root = wpiutil / "src/main/native/thirdparty/json/include/wpi/util"
|
||||
dest_include_files = [wpiutil_json_root / f for f in files]
|
||||
|
||||
# Copy json header files into allwpilib
|
||||
for i in range(len(src_include_files)):
|
||||
@@ -39,8 +39,7 @@ def copy_upstream_src(wpilib_root: Path):
|
||||
content = content.replace("nlohmann::", "wpi::")
|
||||
|
||||
# Fix internal includes
|
||||
content = content.replace(".hpp>", ".h>")
|
||||
content = content.replace("include <nlohmann/", "include <wpi/")
|
||||
content = content.replace("include <nlohmann/", "include <wpi/util/")
|
||||
|
||||
# Fix include guards and other #defines
|
||||
content = content.replace("NLOHMANN_", "WPI_")
|
||||
|
||||
Reference in New Issue
Block a user