mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 12:16:33 +00:00
build gz only for ESP8266
This commit is contained in:
parent
d99ba6992c
commit
1b1b1ed83c
@ -3,9 +3,15 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import gzip
|
import gzip
|
||||||
|
|
||||||
OUTPUT_DIR = "build_output{}".format(os.path.sep)
|
platform = env.PioPlatform()
|
||||||
|
board = env.BoardConfig()
|
||||||
|
mcu = board.get("build.mcu", "esp32")
|
||||||
|
# gzip only for ESP8266
|
||||||
|
if env["PIOPLATFORM"] != "espressif32":
|
||||||
|
|
||||||
def bin_gzip(source, target, env):
|
OUTPUT_DIR = "build_output{}".format(os.path.sep)
|
||||||
|
|
||||||
|
def bin_gzip(source, target, env):
|
||||||
variant = str(target[0]).split(os.path.sep)[2]
|
variant = str(target[0]).split(os.path.sep)[2]
|
||||||
|
|
||||||
# create string with location and file names based on variant
|
# create string with location and file names based on variant
|
||||||
@ -25,4 +31,4 @@ def bin_gzip(source, target, env):
|
|||||||
|
|
||||||
print("Compression reduced firmware size by {:.0f}% (was {} bytes, now {} bytes)".format((GZ_FIRMWARE_SIZE / ORG_FIRMWARE_SIZE) * 100, ORG_FIRMWARE_SIZE, GZ_FIRMWARE_SIZE))
|
print("Compression reduced firmware size by {:.0f}% (was {} bytes, now {} bytes)".format((GZ_FIRMWARE_SIZE / ORG_FIRMWARE_SIZE) * 100, ORG_FIRMWARE_SIZE, GZ_FIRMWARE_SIZE))
|
||||||
|
|
||||||
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_gzip])
|
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_gzip])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user