1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-13 05:19:50 +04:00

fbt: improvements (#3217)

* fbt: changed cdefines & lib handling for external apps; added extra checks for app manifest fields; moved around AppsC generator
* fbt: commandline fixes for spaces in paths
* fbt: fixed stringification for FAP_VERSION
* fbt: Removed excessive quoting for gdb
* docs: update for cdefines; fbt: typo fix
* fbt: enforcing at least 2 components in app version=

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
hedger
2023-11-15 20:27:35 +04:00
committed by GitHub
parent 457aa5331f
commit 98d5718ec9
31 changed files with 271 additions and 166 deletions

View File

@@ -58,7 +58,8 @@ class AppBuilder:
)
self.app_env.Append(
CPPDEFINES=[
("FAP_VERSION", f'"{".".join(map(str, self.app.fap_version))}"')
("FAP_VERSION", f'\\"{".".join(map(str, self.app.fap_version))}\\"'),
*self.app.cdefines,
],
)
self.app_env.VariantDir(self.app_work_dir, self.app._appdir, duplicate=False)
@@ -143,8 +144,8 @@ class AppBuilder:
self.app._assets_dirs = [self.app._appdir.Dir(self.app.fap_file_assets)]
self.app_env.Append(
LIBS=[*self.app.fap_libs, *self.private_libs],
CPPPATH=[self.app_work_dir, self.app._appdir],
LIBS=[*self.app.fap_libs, *self.private_libs, *self.app.fap_libs],
CPPPATH=[self.app_env.Dir(self.app_work_dir), self.app._appdir],
)
app_sources = self.app_env.GatherSources(
@@ -472,7 +473,19 @@ def AddAppLaunchTarget(env, appname, launch_target_name):
components = _gather_app_components(env, appname)
target = env.PhonyTarget(
launch_target_name,
'${PYTHON3} "${APP_RUN_SCRIPT}" -p ${FLIP_PORT} ${EXTRA_ARGS} -s ${SOURCES} -t ${FLIPPER_FILE_TARGETS}',
[
[
"${PYTHON3}",
"${APP_RUN_SCRIPT}",
"-p",
"${FLIP_PORT}",
"${EXTRA_ARGS}",
"-s",
"${SOURCES}",
"-t",
"${FLIPPER_FILE_TARGETS}",
]
],
source=components.deploy_sources.values(),
FLIPPER_FILE_TARGETS=components.deploy_sources.keys(),
EXTRA_ARGS=components.extra_launch_args,