Skip to content

Commit

Permalink
No fixed path for platforms dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Nov 13, 2024
1 parent 18b30d9 commit 7fc55c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from platformio.compat import IS_WINDOWS
from platformio.proc import exec_command
from platformio.builder.tools.piolib import ProjectAsLibBuilder
from platformio.project.config import ProjectConfig
from platformio.package.version import get_original_version, pepver_to_semver

# Added to avoid conflicts between installed Python packages from
Expand Down Expand Up @@ -332,7 +333,7 @@ def HandleCOMPONENTsettings(env):

if flag_custom_sdkonfig == True and "arduino" in env.subst("$PIOFRAMEWORK"):
HandleArduinoIDFsettings(env)
LIB_SOURCE = os.path.join(env.subst("$PROJECT_CORE_DIR"), "platforms", "espressif32", "builder", "build_lib")
LIB_SOURCE = os.path.join(ProjectConfig.get_instance().get("platformio", "platforms_dir"), "espressif32", "builder", "build_lib")
if not bool(os.path.exists(os.path.join(PROJECT_DIR, ".dummy"))):
shutil.copytree(LIB_SOURCE, os.path.join(PROJECT_DIR, ".dummy"))
PROJECT_SRC_DIR = os.path.join(PROJECT_DIR, ".dummy")
Expand Down

0 comments on commit 7fc55c3

Please sign in to comment.