mirror of
https://github.com/wled/WLED.git
synced 2025-04-24 14:57:18 +00:00
Fix usermod library builds
Manage include folders via a second platformio script, fixing builds and removing all the extra boilerplate from usermod library.json files.
This commit is contained in:
parent
8527d231e1
commit
cc9e9b109c
17
pio-scripts/fixup_usermods.py
Normal file
17
pio-scripts/fixup_usermods.py
Normal file
@ -0,0 +1,17 @@
|
||||
Import('env')
|
||||
|
||||
# Patch up each usermod's include folders to include anything referenced by wled
|
||||
# This is because usermods need to include wled.h
|
||||
lib_builders = env.GetLibBuilders()
|
||||
um_deps = [dep for dep in lib_builders if "/usermods" in dep.src_dir]
|
||||
other_deps = [dep for dep in lib_builders if "/usermods" not in dep.src_dir]
|
||||
|
||||
for um in um_deps:
|
||||
# Add include paths for all non-usermod dependencies
|
||||
for dep in other_deps:
|
||||
for dir in dep.get_include_dirs():
|
||||
um.env.PrependUnique(CPPPATH=dir)
|
||||
# Add the wled folder to the include path
|
||||
um.env.PrependUnique(CPPPATH=env["PROJECT_SRC_DIR"])
|
||||
|
||||
#raise RuntimeError("debug")
|
@ -115,6 +115,7 @@ extra_scripts =
|
||||
post:pio-scripts/strip-floats.py
|
||||
pre:pio-scripts/user_config_copy.py
|
||||
pre:pio-scripts/load_usermods.py
|
||||
post:pio-scripts/fixup_usermods.py
|
||||
pre:pio-scripts/build_ui.py
|
||||
; post:pio-scripts/obj-dump.py ;; convenience script to create a disassembly dump of the firmware (hardcore debugging)
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"name": "audioreactive",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"extraScript": "override_sqrt.py"
|
||||
},
|
||||
"dependencies": [
|
||||
|
@ -1,11 +1,5 @@
|
||||
{
|
||||
"name": "animartrix",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+",
|
||||
"libArchive": false
|
||||
},
|
||||
"dependencies": {
|
||||
"Animartrix": "https://github.com/netmindz/animartrix.git#b172586"
|
||||
}
|
||||
|
@ -1,8 +1,3 @@
|
||||
{
|
||||
"name": "auto_save",
|
||||
"build": {
|
||||
"srcDir": ".",
|
||||
"includeDir": "../../wled00",
|
||||
"libLDFMode": "chain+"
|
||||
}
|
||||
"name": "auto_save"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user