1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

[FL-3330] fbt: added hooks for build & dist environments; added FW_ORIGIN_* macro for apps & SDK (#2705)

* fbt: added hooks for build & dist environments
* Moved env hooks to an optional file
* Fixed var name
* Added fw origin to device info
* Bumped device info version
* fbt: added FIRMWARE_ORIGIN option. Different implementation for FW_ORIGIN_* C macro.
* api: bumped versions
* fbt: added fbt_options_local.py
* gitignore: cleanup

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
hedger
2023-05-29 20:40:56 +04:00
committed by GitHub
parent 3de856f8d5
commit 8d2ea14f06
16 changed files with 206 additions and 17 deletions

View File

@@ -18,6 +18,7 @@ env = ENV.Clone(
"fbt_apps",
"pvsstudio",
"fbt_hwtarget",
"fbt_envhooks",
],
COMPILATIONDB_USE_ABSPATH=False,
BUILD_DIR=fw_build_meta["build_dir"],
@@ -72,6 +73,8 @@ env = ENV.Clone(
_APP_ICONS=None,
)
env.PreConfigureFwEnvionment()
if env["IS_BASE_FIRMWARE"]:
env.Append(
FIRMWARE_BUILD_CFG="firmware",
@@ -100,6 +103,13 @@ lib_targets = env.BuildModules(
],
)
# Configure firmware origin definitions
env.Append(
CPPDEFINES=[
env.subst("FW_ORIGIN_${FIRMWARE_ORIGIN}"),
]
)
# Now, env is fully set up with everything to build apps
fwenv = env.Clone(FW_ARTIFACTS=[])
@@ -271,5 +281,6 @@ if should_gen_cdb_and_link_dir(fwenv, BUILD_TARGETS):
Alias(fwenv["FIRMWARE_BUILD_CFG"] + "_all", fw_artifacts)
env.PostConfigureFwEnvionment()
Return("fwenv")