пути в скриптах

This commit is contained in:
Mit4el
2025-01-07 17:02:35 +03:00
parent 79c1810be8
commit 96b8311579
3 changed files with 6 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ import shutil
from sys import platform from sys import platform
pio_home = env.subst("$PROJECT_CORE_DIR") pio_home = env.subst("$PROJECT_CORE_DIR")
print(pio_home) print("PLATFORMIO_DIR" + pio_home)
if platform == "linux" or platform == "linux2": if platform == "linux" or platform == "linux2":
# linux # linux
@@ -30,5 +30,6 @@ try:
newData = newData.replace('#define WIFI_CLIENT_SELECT_TIMEOUT_US (1000000)', '#define WIFI_CLIENT_SELECT_TIMEOUT_US (500000)') newData = newData.replace('#define WIFI_CLIENT_SELECT_TIMEOUT_US (1000000)', '#define WIFI_CLIENT_SELECT_TIMEOUT_US (500000)')
with open(mainPyPath, 'w') as fw: with open(mainPyPath, 'w') as fw:
fw.write(newData) fw.write(newData)
print(f"Файл изменён, ОК! {mainPyPath}")
except FileNotFoundError: except FileNotFoundError:
print("Файл не найден или не удается открыть") print("Файл не найден или не удается открыть")

View File

@@ -5,7 +5,7 @@ import shutil
from sys import platform from sys import platform
pio_home = env.subst("$PROJECT_CORE_DIR") pio_home = env.subst("$PROJECT_CORE_DIR")
print(pio_home) print("PLATFORMIO_DIR" + pio_home)
if platform == "linux" or platform == "linux2": if platform == "linux" or platform == "linux2":
# linux # linux
@@ -29,6 +29,7 @@ def add_arduino_to_frameworks(file_name):
f.seek(0) f.seek(0)
json.dump(data, f, indent=4) json.dump(data, f, indent=4)
f.truncate() f.truncate()
print(f"Файл изменён, ОК! {file_name}")
else: else:
print(f"Arduino already exists in {file_name}") print(f"Arduino already exists in {file_name}")
except FileNotFoundError: except FileNotFoundError:

View File

@@ -7,7 +7,7 @@ import shutil
from sys import platform from sys import platform
pio_home = env.subst("$PROJECT_CORE_DIR") pio_home = env.subst("$PROJECT_CORE_DIR")
print(pio_home) print("PLATFORMIO_DIR" + pio_home)
if platform == "linux" or platform == "linux2": if platform == "linux" or platform == "linux2":
#mainPyPath = '/home/rise/.platformio/platforms/espressif8266@4.0.1/builder/main.py' #mainPyPath = '/home/rise/.platformio/platforms/espressif8266@4.0.1/builder/main.py'
@@ -26,5 +26,6 @@ try:
newData = oldData.replace('_value += 0xE00000 # correction', '_value += 0xE00000 # correction\n\n if _value == -0x6000:\n _value = env[k]-0x40200000') newData = oldData.replace('_value += 0xE00000 # correction', '_value += 0xE00000 # correction\n\n if _value == -0x6000:\n _value = env[k]-0x40200000')
with open(mainPyPath, 'w') as fw: with open(mainPyPath, 'w') as fw:
fw.write(newData) fw.write(newData)
print(f"Файл изменён, ОК! {mainPyPath}")
except FileNotFoundError: except FileNotFoundError:
print("Файл не найден или не удается открыть") print("Файл не найден или не удается открыть")