forked from platformio/platformio-core
Handle both extra IDE data: IDE_EXTRA_DATA & INTEGRATION_EXTRA_DATA
This commit is contained in:
@ -82,7 +82,6 @@ DEFAULT_ENV_OPTIONS = dict(
|
|||||||
PROGPATH=os.path.join("$BUILD_DIR", "$PROGNAME$PROGSUFFIX"),
|
PROGPATH=os.path.join("$BUILD_DIR", "$PROGNAME$PROGSUFFIX"),
|
||||||
PROG_PATH="$PROGPATH", # deprecated
|
PROG_PATH="$PROGPATH", # deprecated
|
||||||
PYTHONEXE=get_pythonexe_path(),
|
PYTHONEXE=get_pythonexe_path(),
|
||||||
IDE_EXTRA_DATA={},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Declare command verbose messages
|
# Declare command verbose messages
|
||||||
|
@ -175,9 +175,8 @@ def DumpIntegrationData(*args):
|
|||||||
]
|
]
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
data["extra"].update(
|
for key in ("IDE_EXTRA_DATA", "INTEGRATION_EXTRA_DATA"):
|
||||||
globalenv.get("INTEGRATION_EXTRA_DATA", globalenv.get("IDE_EXTRA_DATA", {}))
|
data["extra"].update(globalenv.get(key, {}))
|
||||||
)
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
@ -186,6 +185,7 @@ def exists(_):
|
|||||||
|
|
||||||
|
|
||||||
def generate(env):
|
def generate(env):
|
||||||
|
env["INTEGRATION_EXTRA_DATA"] = {}
|
||||||
env.AddMethod(IsIntegrationDump)
|
env.AddMethod(IsIntegrationDump)
|
||||||
env.AddMethod(DumpIntegrationIncludes)
|
env.AddMethod(DumpIntegrationIncludes)
|
||||||
env.AddMethod(DumpIntegrationData)
|
env.AddMethod(DumpIntegrationData)
|
||||||
|
Reference in New Issue
Block a user