2022-09-03 14:32:24 +01:00
|
|
|
Import("env")
|
2022-09-03 21:04:56 +01:00
|
|
|
env = DefaultEnvironment()
|
|
|
|
platform = env.PioPlatform()
|
2022-09-03 14:32:24 +01:00
|
|
|
import os
|
2022-09-10 14:04:00 +01:00
|
|
|
import glob
|
2022-09-03 14:32:24 +01:00
|
|
|
import subprocess
|
|
|
|
from os.path import join
|
|
|
|
|
|
|
|
# generate all precompiled Berry structures from multiple modules
|
|
|
|
CURRENT_DIR = os.getcwd()
|
2022-09-03 16:22:27 +01:00
|
|
|
BERRY_GEN_DIR = join(env.subst("$PROJECT_DIR"), "lib", "libesp32","berry")
|
2022-09-03 14:32:24 +01:00
|
|
|
os.chdir(BERRY_GEN_DIR)
|
2022-09-10 14:04:00 +01:00
|
|
|
fileList = glob.glob(join(BERRY_GEN_DIR, "generate", "*"))
|
|
|
|
for filePath in fileList:
|
|
|
|
try:
|
|
|
|
os.remove(filePath)
|
|
|
|
# print("Deleting file : ", filePath)
|
|
|
|
except:
|
|
|
|
print("Error while deleting file : ", filePath)
|
2022-09-06 11:24:39 +01:00
|
|
|
cmd = (env["PYTHONEXE"],join("tools","coc","coc"),"-o","generate","src","default",join("..","berry_tasmota","src"),join("..","berry_mapping","src"),join("..","berry_int64","src"),join("..","..","libesp32_lvgl","lv_binding_berry","src"),join("..","..","libesp32_lvgl","lv_binding_berry","generate"),"-c",join("default","berry_conf.h"))
|
2022-09-03 14:32:24 +01:00
|
|
|
returncode = subprocess.call(cmd, shell=False)
|
|
|
|
os.chdir(CURRENT_DIR)
|