diff --git a/CHANGELOG.md b/CHANGELOG.md index a480313..11a6574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,14 @@ # Changelog -## 3.0.3 +## 3.0.5 + +- Add a library-owned PlatformIO bridge for the asynchronous web/TCP include paths required when WiFiManager is nested beneath DeviceFramework. + ## 3.0.4 - Set the package's deep PlatformIO dependency-discovery mode so WiFiManager's asynchronous web/TCP children remain available when it is consumed through DeviceFramework. +## 3.0.3 - Declare the ESP8266 and ESP32 async TCP libraries explicitly in the PlatformIO package manifest so clean consumers resolve the headers required by the asynchronous portal. diff --git a/README.md b/README.md index 5f2b266..17e64c4 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ their include paths: ```ini [common] lib_deps = - WiFiManager=https://github.com/alexhopeoconnor/WiFiManager.git#v3.0.4 + WiFiManager=https://github.com/alexhopeoconnor/WiFiManager.git#v3.0.5 ESP32Async/ESPAsyncWebServer@3.9.1 [env:esp8266] diff --git a/library.json b/library.json index 7a58893..c5b4089 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "WiFiManager", - "version": "3.0.4", + "version": "3.0.5", "keywords": [ "wifi", "wi-fi", @@ -64,7 +64,7 @@ "build": { "includeDir": "lib/WiFiManager/include", "srcDir": "lib/WiFiManager/src", - "libLDFMode": "deep+" + "extraScript": "tools/platformio/dependencies.py" }, "export": { "include": [ @@ -72,7 +72,8 @@ "lib/WiFiManager/src", "LICENSE", "README.md", - "library.json" + "library.json", + "tools" ] }, "$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json", diff --git a/tools/platformio/dependencies.py b/tools/platformio/dependencies.py new file mode 100644 index 0000000..7f7a91f --- /dev/null +++ b/tools/platformio/dependencies.py @@ -0,0 +1,24 @@ +"""Expose WiFiManager's async dependencies to PlatformIO's nested library builds.""" +from __future__ import print_function + +import glob +import os + +from SCons.Script import Import + +Import("env") + + +def append_dependency_include(package_prefix): + """Add the installed package's source directory when PlatformIO has it.""" + package_root = env.subst("$PROJECT_LIBDEPS_DIR") + candidates = glob.glob(os.path.join(package_root, package_prefix + "*", "src")) + if candidates: + env.Append(CPPPATH=[candidates[0]]) + + +append_dependency_include("ESPAsyncWebServer") +if env.subst("$PIOPLATFORM") == "espressif8266": + append_dependency_include("ESPAsyncTCP") +elif env.subst("$PIOPLATFORM") == "espressif32": + append_dependency_include("AsyncTCP")