From 1f924f06703f9209d8e0a97e17ad8b2ed71ddf88 Mon Sep 17 00:00:00 2001 From: Adrian Del Grosso <10929341+ad3154@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:39:18 -0700 Subject: [PATCH] [Meta]: Update Arduino library generation script to remove systec Updated the the arduino library script to remove the systec driver. Moved this script into the script directory. --- .../generateArduinoLibrary.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) rename generateArduinoLibrary.py => scripts/generateArduinoLibrary.py (93%) diff --git a/generateArduinoLibrary.py b/scripts/generateArduinoLibrary.py similarity index 93% rename from generateArduinoLibrary.py rename to scripts/generateArduinoLibrary.py index 1e36548da..39a9a93ff 100644 --- a/generateArduinoLibrary.py +++ b/scripts/generateArduinoLibrary.py @@ -62,7 +62,7 @@ def fixup_header_paths(fileName): f.write(newdata) f.close() -arduinoLibPath = "arduino_library/" +arduinoLibPath = "../arduino_library/" sourceDir = "src" sourcePath = arduinoLibPath + sourceDir @@ -78,9 +78,9 @@ def fixup_header_paths(fileName): print("Copying source files to library") -copyfiles(".", sourcePath, "*.cpp") -copyfiles(".", sourcePath, "*.hpp") -copyfiles(".", sourcePath, "*.tpp") +copyfiles("../", sourcePath, "*.cpp") +copyfiles("../", sourcePath, "*.hpp") +copyfiles("../", sourcePath, "*.tpp") print("Pruning unneeded files for Arduino platform") @@ -119,6 +119,8 @@ def fixup_header_paths(fileName): "can_hardware_interface.cpp", "socketcand_windows_network_client.hpp", "socketcand_windows_network_client.cpp", +"sys_tec_windows_plugin.hpp", +"sys_tec_windows_plugin.cpp", "CMakeCXXCompilerId.cpp"] for punableFile in filePruneList: @@ -128,7 +130,7 @@ def fixup_header_paths(fileName): print("Generating isobus.hpp from files in " + "./" + sourcePath + "/*.hpp") headers = [os.path.normpath(i) for i in glob.glob("./" + sourcePath + "/*.hpp")] -strippedHeaders = list(map(lambda x: x.replace('arduino_library\\src\\','').replace('arduino_library/src/',''),headers)) +strippedHeaders = list(map(lambda x: x.replace('..\\arduino_library\\src\\','').replace('../arduino_library/src/',''),headers)) print("Headers ", strippedHeaders) f = open(os.path.join(sourcePath, "AgIsoStack.hpp"), "w") write_isobus_hpp(strippedHeaders, f)