Skip to content

Commit 7da0853

Browse files
committed
replace fixed name with var for tool-esp_install
1 parent 031f53a commit 7da0853

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

platform.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
SUBPROCESS_TIMEOUT = 300
3434
DEFAULT_DEBUG_SPEED = "5000"
3535
DEFAULT_APP_OFFSET = "0x10000"
36+
tl_install_name = "tool-esp_install"
3637
ARDUINO_ESP32_PACKAGE_URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json"
3738

3839
# MCUs that support ESP-builtin debug
@@ -161,10 +162,9 @@ def packages_dir(self) -> str:
161162

162163
def _check_tl_install_version(self) -> bool:
163164
"""
164-
Prüft ob tl-install in der korrekten Version installiert ist.
165+
Prüft ob tool-esp_install in der korrekten Version installiert ist.
165166
Installiert die korrekte Version falls erforderlich.
166167
"""
167-
tl_install_name = "tool-esp_install"
168168

169169
# Hole die erforderliche Version aus platform.json
170170
required_version = self.packages.get(tl_install_name, {}).get("version")
@@ -207,9 +207,8 @@ def _check_tl_install_version(self) -> bool:
207207

208208
def _install_tl_install(self, version: str) -> bool:
209209
"""
210-
Installiert tl-install in der angegebenen Version.
210+
Installiert tool-esp_install in der angegebenen Version.
211211
"""
212-
tl_install_name = "tool-esp_install"
213212
tl_install_path = os.path.join(self.packages_dir, tl_install_name)
214213

215214
try:
@@ -260,7 +259,7 @@ def _get_tool_paths(self, tool_name: str) -> Dict[str, str]:
260259
'tools_json_path': os.path.join(tool_path, "tools.json"),
261260
'piopm_path': os.path.join(tool_path, ".piopm"),
262261
'idf_tools_path': os.path.join(
263-
self.packages_dir, "tool-esp_install", "tools", "idf_tools.py"
262+
self.packages_dir, tl_install_name, "tools", "idf_tools.py"
264263
)
265264
}
266265
return self._tools_cache[tool_name]
@@ -504,14 +503,14 @@ def _configure_installer(self) -> None:
504503
"""Configure the ESP-IDF tools installer."""
505504

506505
if not self._check_tl_install_version():
507-
logger.error("Error during tl-install version check / installation")
506+
logger.error("Error during tool-esp_install version check / installation")
508507
return
509508

510509
installer_path = os.path.join(
511-
self.packages_dir, "tl-install", "tools", "idf_tools.py"
510+
self.packages_dir, tl_install_name, "tools", "idf_tools.py"
512511
)
513512
if os.path.exists(installer_path):
514-
self.packages["tl-install"]["optional"] = True
513+
self.packages[tl_install_name]["optional"] = True
515514

516515
def _install_esptool_package(self) -> None:
517516
"""Install esptool package required for all builds."""

0 commit comments

Comments
 (0)