|
@ -96,12 +96,10 @@ def install_features_dependencies(): |
|
|
del deps_to_add[name] |
|
|
del deps_to_add[name] |
|
|
|
|
|
|
|
|
# any left? |
|
|
# any left? |
|
|
if len(deps_to_add) <= 0: |
|
|
if len(deps_to_add) > 0: |
|
|
continue |
|
|
# add only the missing deps |
|
|
|
|
|
proj = env.GetProjectConfig() |
|
|
# add only the missing deps |
|
|
proj.set("env:" + env["PIOENV"], "lib_deps", deps + list(deps_to_add.values())) |
|
|
proj = env.GetProjectConfig() |
|
|
|
|
|
proj.set("env:" + env["PIOENV"], "lib_deps", deps + list(deps_to_add.values())) |
|
|
|
|
|
|
|
|
|
|
|
if 'extra_scripts' in FEATURE_DEPENDENCIES[feature]: |
|
|
if 'extra_scripts' in FEATURE_DEPENDENCIES[feature]: |
|
|
print("Executing extra_scripts for %s... " % feature) |
|
|
print("Executing extra_scripts for %s... " % feature) |
|
@ -110,17 +108,16 @@ def install_features_dependencies(): |
|
|
if 'src_filter' in FEATURE_DEPENDENCIES[feature]: |
|
|
if 'src_filter' in FEATURE_DEPENDENCIES[feature]: |
|
|
print("Adding src_filter for %s... " % feature) |
|
|
print("Adding src_filter for %s... " % feature) |
|
|
proj = env.GetProjectConfig() |
|
|
proj = env.GetProjectConfig() |
|
|
src_filter = env.GetProjectOption("src_filter") |
|
|
src_filter = ' '.join(env.GetProjectOption("src_filter")) |
|
|
|
|
|
|
|
|
# first we need to remove the references to the same folder |
|
|
# first we need to remove the references to the same folder |
|
|
my_srcs = re.findall( r'[+-](<.*?>)', FEATURE_DEPENDENCIES[feature]['src_filter']) |
|
|
my_srcs = re.findall( r'[+-](<.*?>)', FEATURE_DEPENDENCIES[feature]['src_filter']) |
|
|
cur_srcs = re.findall( r'[+-](<.*?>)', src_filter[0]) |
|
|
cur_srcs = re.findall( r'[+-](<.*?>)', src_filter) |
|
|
for d in my_srcs: |
|
|
for d in my_srcs: |
|
|
if d in cur_srcs: |
|
|
if d in cur_srcs: |
|
|
src_filter[0] = re.sub(r'[+-]' + d, '', src_filter[0]) |
|
|
src_filter = re.sub(r'[+-]' + d, '', src_filter) |
|
|
|
|
|
|
|
|
src_filter[0] = FEATURE_DEPENDENCIES[feature]['src_filter'] + ' ' + src_filter[0] |
|
|
src_filter = FEATURE_DEPENDENCIES[feature]['src_filter'] + ' ' + src_filter |
|
|
proj.set("env:" + env["PIOENV"], "src_filter", src_filter) |
|
|
proj.set("env:" + env["PIOENV"], "src_filter", [src_filter]) |
|
|
env.Replace(SRC_FILTER=src_filter) |
|
|
env.Replace(SRC_FILTER=src_filter) |
|
|
|
|
|
|
|
|
# search the current compiler, considering the OS |
|
|
# search the current compiler, considering the OS |
|
|