mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
890c9e87ce
* examples: plugins: utilize fal_embedded * libs: removed fnv1a_hash * furi: added FURI_PACKED; apps, libs: changed to use FURI_PACKED * lib: mbedtls: using custom config * lib: toolbox: removed md5, switched to mbedtls * targets: f18: link fix * lib: added mbedtls_cfg.h * apps: nfc: explicit dependency on libmbedtls * u2f: reworking to mbedtls * u2f: replaced sha256 & hmac with mbedtls * u2f: functional rework using mbedtls * libs: dropped micro-ecc * u2f: dropped old implementation * toolbox: removed sha256 impl * mcheck() for mbedtls * libs: removed libmisc; split into smaller libs * apps: debug: fixed display_test * apps: include cleanups * fbt: fixed VERSIONCOMSTR * furi: added FURI_CHECK_RETURN * lib: removed qrcode * cleanup * fbt: lint_py+format_py: fixed excessive command length * api: Removed bzero from f7 * api: Removed bzero from f18 * Bump API Symbols Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
from SCons.Action import Action
|
|
from SCons.Builder import Builder
|
|
|
|
|
|
def _version_emitter(target, source, env):
|
|
target_dir = target[0]
|
|
target = [
|
|
target_dir.File("version.inc.h"),
|
|
target_dir.File("version.json"),
|
|
]
|
|
return target, source
|
|
|
|
|
|
def generate(env):
|
|
env.SetDefault(
|
|
VERSION_SCRIPT="${FBT_SCRIPT_DIR}/version.py",
|
|
)
|
|
env.Append(
|
|
BUILDERS={
|
|
"VersionBuilder": Builder(
|
|
action=Action(
|
|
[
|
|
[
|
|
"${PYTHON3}",
|
|
"${VERSION_SCRIPT}",
|
|
"generate",
|
|
"-t",
|
|
"${TARGET_HW}",
|
|
"--fw-origin",
|
|
"${FIRMWARE_ORIGIN}",
|
|
"-o",
|
|
"${TARGET.dir.posix}",
|
|
"--dir",
|
|
"${ROOT_DIR}",
|
|
]
|
|
],
|
|
"${VERSIONCOMSTR}",
|
|
),
|
|
emitter=_version_emitter,
|
|
),
|
|
}
|
|
)
|
|
|
|
|
|
def exists(env):
|
|
return True
|