[FL-2859,2838] fbt: improvements for FAPs (#1813)
* fbt: assets builder for apps WIP * fbt: automatically building private fap assets * docs: details on how to use image assets * fbt: renamed fap_assets -> fap_icons * fbt: support for fap_extbuild field * docs: info on fap_extbuild * fbt: added --proxy-env parame ter * fbt: made firmware_cdb & updater_cdb targets always available * fbt: renamed fap_icons -> fap_icon_assets * fbt: deprecated firmware_* target names for faps; new alias is "fap_APPID" * fbt: changed intermediate file locations for external apps * fbt: support for fap_private_libs; docs: updates * restored mbedtls as global lib * scripts: lint.py: skip "lib" subfolder * fbt: Sanity checks for building advanced faps as part of fw * docs: info on fap_private_libs; fbt: optimized *.fam indexing * fbt: cleanup; samples: added sample_icons app * fbt: moved example app to applications/examples * linter fix * docs: readme fixes * added applications/examples/application.fam stub * docs: more info on private libs Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
from SCons.Errors import UserError
|
||||
|
||||
|
||||
Import("ENV")
|
||||
|
||||
|
||||
from fbt.appmanifest import FlipperAppType
|
||||
|
||||
appenv = ENV.Clone(
|
||||
tools=[("fbt_extapps", {"EXT_APPS_WORK_DIR": ENV.subst("${BUILD_DIR}/.extapps")})]
|
||||
tools=[
|
||||
(
|
||||
"fbt_extapps",
|
||||
{
|
||||
"EXT_APPS_WORK_DIR": ENV.subst(
|
||||
"${BUILD_DIR}/.extapps",
|
||||
)
|
||||
},
|
||||
),
|
||||
"fbt_assets",
|
||||
]
|
||||
)
|
||||
|
||||
appenv.Replace(
|
||||
@@ -83,7 +96,16 @@ if extra_app_list := GetOption("extra_ext_apps"):
|
||||
if appenv["FORCE"]:
|
||||
appenv.AlwaysBuild(extapps["compact"].values())
|
||||
|
||||
Alias(appenv["FIRMWARE_BUILD_CFG"] + "_extapps", extapps["compact"].values())
|
||||
|
||||
# Deprecation stub
|
||||
def legacy_app_build_stub(**kw):
|
||||
raise UserError(f"Target name 'firmware_extapps' is deprecated, use 'faps' instead")
|
||||
|
||||
|
||||
appenv.PhonyTarget("firmware_extapps", appenv.Action(legacy_app_build_stub, None))
|
||||
|
||||
|
||||
Alias("faps", extapps["compact"].values())
|
||||
|
||||
if appsrc := appenv.subst("$APPSRC"):
|
||||
app_manifest, fap_file, app_validator = appenv.GetExtAppFromPath(appsrc)
|
||||
|
||||
Reference in New Issue
Block a user