mirror of
https://github.com/wled/WLED.git
synced 2025-07-23 18:56:41 +00:00
load_usermods: Simplify load code
Remove all the unnecessary bits.
This commit is contained in:
parent
75cd411073
commit
0a7d3a9d9b
@ -48,14 +48,8 @@ else:
|
|||||||
|
|
||||||
if usermods:
|
if usermods:
|
||||||
# Inject usermods in to project lib_deps
|
# Inject usermods in to project lib_deps
|
||||||
proj = env.GetProjectConfig()
|
symlinks = [f"symlink://{find_usermod(mod).resolve()}" for mod in usermods]
|
||||||
deps = env.GetProjectOption('lib_deps')
|
env.GetProjectConfig().set("env:" + env['PIOENV'], 'lib_deps', env.GetProjectOption('lib_deps') + symlinks)
|
||||||
src_dir = proj.get("platformio", "src_dir")
|
|
||||||
src_dir = src_dir.replace('\\','/')
|
|
||||||
mod_paths = {mod: find_usermod(mod) for mod in usermods}
|
|
||||||
usermods = [f"{mod} = symlink://{path.resolve()}" for mod, path in mod_paths.items()]
|
|
||||||
proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods)
|
|
||||||
|
|
||||||
|
|
||||||
# Utility function for assembling usermod include paths
|
# Utility function for assembling usermod include paths
|
||||||
def cached_add_includes(dep, dep_cache: set, includes: deque):
|
def cached_add_includes(dep, dep_cache: set, includes: deque):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user