Теперь при сборке сохраняем текущий профиль на контроллер для

будущего использования и понимания как была собрана прошивка
This commit is contained in:
2023-05-16 12:22:48 +03:00
parent 7b9a742264
commit b146c75389
7 changed files with 727 additions and 210 deletions

View File

@@ -26,6 +26,7 @@
import configparser
import os, json, sys, getopt
from pathlib import Path
import shutil
config = configparser.ConfigParser() # создаём объекта парсера INI
@@ -202,6 +203,10 @@ config["platformio"]["default_envs"] = deviceName
config["platformio"]["data_dir"] = profJson['projectProp']['platformio']['data_dir']
with open("platformio.ini", 'w') as configFile:
config.write(configFile)
# сохраняем применяемый профиль в папку data_svelte для загрузки на контроллер и дальнейшего переиспользования
print(f"Сохраняем профиль {profile} в {dataDir}")
shutil.copy(profile, dataDir + "/" + profile)
# import ctypes # An included library with Python install.