Fix safeboot compilation on windows

This commit is contained in:
Theo Arends 2022-05-20 17:00:56 +02:00
parent f795b4cf83
commit 76df8580a1
1 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
variants_dir = join(FRAMEWORK_DIR, "variants", "tasmota") variants_dir = join(FRAMEWORK_DIR, "variants", "tasmota")
def esp32_create_chip_string(chip): def esp32_create_chip_string(chip):
tasmota_platform = env.subst("$BUILD_DIR").split('/')[-1] tasmota_platform = env.subst("$BUILD_DIR").split(os.path.sep)[-1]
tasmota_platform = tasmota_platform.split('-')[0] tasmota_platform = tasmota_platform.split('-')[0]
if 'tasmota' and chip[3:] not in tasmota_platform: # quick check for a valid name like 'tasmota' + '32c3' if 'tasmota' and chip[3:] not in tasmota_platform: # quick check for a valid name like 'tasmota' + '32c3'
print('Unexpected naming conventions in this build environment -> Undefined behavior for further build process!!') print('Unexpected naming conventions in this build environment -> Undefined behavior for further build process!!')
@ -106,7 +106,7 @@ def esp32_create_combined_bin(source, target, env):
app_offset = int(row[3],base=16) app_offset = int(row[3],base=16)
# elif(row[0] == 'factory'): # elif(row[0] == 'factory'):
# factory_offset = int(row[3],base=16) # factory_offset = int(row[3],base=16)
elif(row[0] == 'spiffs'): elif(row[0] == 'spiffs'):
if esp32_build_filesystem(row[4]): if esp32_build_filesystem(row[4]):
fs_offset = int(row[3],base=16) fs_offset = int(row[3],base=16)
@ -152,7 +152,7 @@ def esp32_create_combined_bin(source, target, env):
if exists(fs_bin): if exists(fs_bin):
print(f" - {hex(fs_offset)}| {fs_bin}") print(f" - {hex(fs_offset)}| {fs_bin}")
cmd += [hex(fs_offset), fs_bin] cmd += [hex(fs_offset), fs_bin]
env.Replace( env.Replace(
UPLOADERFLAGS=[ UPLOADERFLAGS=[
"--chip", chip, "--chip", chip,
"--port", '"$UPLOAD_PORT"', "--port", '"$UPLOAD_PORT"',