mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-23 03:29:57 -07:00
FBT: Allow apps to specify custom cflags --nobuild
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
- UL: Somfy Keytis button switch and Add Manually support (by @xMasterX)
|
||||
- UL: Genius Echo/Bravo add 2 buttons hold simulation (0xB btn code) (by @xMasterX)
|
||||
- UL: JS: Add IR capabilities to the JS engine (by @LuisMayo)
|
||||
- FBT: Allow apps to specify custom cflags (by @WillyJL)
|
||||
- UL: Docs: Add [full list of supported SubGHz protocols](https://github.com/Next-Flip/Momentum-Firmware/blob/dev/documentation/SubGHzSupportedSystems.md) and their frequencies/modulations that can be used for reading remotes (by @xMasterX)
|
||||
|
||||
### Updated:
|
||||
|
||||
@@ -68,6 +68,7 @@ class FlipperApplication:
|
||||
|
||||
# .fap-specific
|
||||
sources: List[str] = field(default_factory=lambda: ["*.c*"])
|
||||
cflags: List[str] = field(default_factory=list)
|
||||
fap_version: Union[str, Tuple[int]] = "0.1"
|
||||
fap_icon: Optional[str] = None
|
||||
fap_libs: List[str] = field(default_factory=list)
|
||||
|
||||
@@ -57,6 +57,7 @@ class AppBuilder:
|
||||
FAP_WORK_DIR=self.app_work_dir,
|
||||
)
|
||||
self.app_env.Append(
|
||||
CCFLAGS=self.app.cflags,
|
||||
CPPDEFINES=[
|
||||
("FAP_VERSION", f'\\"{".".join(map(str, self.app.fap_version))}\\"'),
|
||||
*self.app.cdefines,
|
||||
@@ -89,7 +90,7 @@ class AppBuilder:
|
||||
fap_icons = self.app_env.CompileIcons(
|
||||
self.app_work_dir,
|
||||
self.app._appdir.Dir(self.app.fap_icon_assets),
|
||||
icon_bundle_name=f"{self.app.fap_icon_assets_symbol or self.app.appid }_icons",
|
||||
icon_bundle_name=f"{self.app.fap_icon_assets_symbol or self.app.appid}_icons",
|
||||
add_include=True,
|
||||
)
|
||||
self.app_env.Alias("_fap_icons", fap_icons)
|
||||
@@ -420,7 +421,7 @@ def _validate_app_imports(target, source, env):
|
||||
if env.get("_CHECK_APP"):
|
||||
raise UserError(warning_msg)
|
||||
else:
|
||||
SCons.Warnings.warn(SCons.Warnings.LinkWarning, warning_msg),
|
||||
SCons.Warnings.warn(SCons.Warnings.LinkWarning, warning_msg)
|
||||
|
||||
|
||||
def GetExtAppByIdOrPath(env, app_dir):
|
||||
|
||||
Reference in New Issue
Block a user