mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
The Google C++ protobuf implementation has issues with dynamic linkage across DLL boundaries because it uses global variables. It also has a compile-time dependency because the protoc version must exactly match the libprotobuf version. Using nanopb with a customized generator fixes both of these issues. Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
79 lines
2.1 KiB
Python
Executable File
79 lines
2.1 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import argparse
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def main():
|
|
script_path = Path(__file__).resolve()
|
|
REPO_ROOT = script_path.parent.parent.parent
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument(
|
|
"--quickbuf_plugin",
|
|
help="Path to the quickbuf protoc plugin",
|
|
required=True,
|
|
)
|
|
args = parser.parse_args()
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/hal/generate_usage_reporting.py"], check=True
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/ntcore/generate_topics.py"], check=True
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/wpimath/generate_numbers.py"], check=True
|
|
)
|
|
subprocess.run(
|
|
[
|
|
sys.executable,
|
|
f"{REPO_ROOT}/wpimath/generate_quickbuf.py",
|
|
f"--quickbuf_plugin={args.quickbuf_plugin}",
|
|
],
|
|
check=True,
|
|
)
|
|
subprocess.run(
|
|
[
|
|
sys.executable,
|
|
f"{REPO_ROOT}/wpimath/generate_nanopb.py",
|
|
],
|
|
check=True,
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/wpiunits/generate_units.py"], check=True
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/wpilibc/generate_hids.py"], check=True
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/wpilibj/generate_hids.py"], check=True
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/wpilibNewCommands/generate_hids.py"], check=True
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/wpilibc/generate_pwm_motor_controllers.py"],
|
|
check=True,
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/wpilibj/generate_pwm_motor_controllers.py"],
|
|
check=True,
|
|
)
|
|
subprocess.run(
|
|
[
|
|
sys.executable,
|
|
f"{REPO_ROOT}/wpiutil/generate_nanopb.py",
|
|
],
|
|
check=True,
|
|
)
|
|
subprocess.run(
|
|
[sys.executable, f"{REPO_ROOT}/thirdparty/imgui_suite/generate_gl3w.py"],
|
|
check=True,
|
|
)
|
|
subprocess.run(f"{REPO_ROOT}/thirdparty/imgui_suite/generate_fonts.sh", check=True)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|