wangzhibo
2026-09-11 659c470eba542383987aad227b7f918100f131fa
xiaozhi-esp32-2.2.6/main/CMakeLists.txt
@@ -1201,3 +1201,21 @@
else()
    message(STATUS "Assets partition not found, using v1 partition table")
endif()
# Patch 78/esp-wifi-connect so the captive portal accepts zh_CN and reclaims
# httpd sockets stolen by WeChat /mmtls captive-DNS probes.
find_component_by_pattern("esp-wifi-connect" WIFI_CONNECT_COMPONENT WIFI_CONNECT_PATH)
if(WIFI_CONNECT_PATH)
    execute_process(
        COMMAND python "${PROJECT_DIR}/scripts/patch_wifi_connect.py" "${WIFI_CONNECT_PATH}"
        RESULT_VARIABLE WIFI_CONNECT_PATCH_RESULT
        OUTPUT_VARIABLE WIFI_CONNECT_PATCH_OUTPUT
        ERROR_VARIABLE WIFI_CONNECT_PATCH_OUTPUT
    )
    if(WIFI_CONNECT_PATCH_OUTPUT)
        message(STATUS "${WIFI_CONNECT_PATCH_OUTPUT}")
    endif()
    if(NOT WIFI_CONNECT_PATCH_RESULT EQUAL 0)
        message(WARNING "Failed to patch esp-wifi-connect at ${WIFI_CONNECT_PATH}")
    endif()
endif()