From d9d5cc6373fb9bbc4cd36c1f3b02565a429cb14a Mon Sep 17 00:00:00 2001 From: hedger Date: Sun, 18 Sep 2022 22:16:15 +0400 Subject: [PATCH] fbt: changed stock plugins to EXTERNAL apps; restored building app as a PLUGIN as a part of main fw as well as a .fap; readme fixes --- applications/plugins/bt_hid_app/application.fam | 2 +- applications/plugins/music_player/application.fam | 2 +- applications/plugins/picopass/application.fam | 2 +- applications/plugins/snake_game/application.fam | 2 +- documentation/AppManifests.md | 8 ++++---- fbt_options.py | 2 +- site_scons/extapps.scons | 5 ++++- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/applications/plugins/bt_hid_app/application.fam b/applications/plugins/bt_hid_app/application.fam index e6a3b1752..8751e38e1 100644 --- a/applications/plugins/bt_hid_app/application.fam +++ b/applications/plugins/bt_hid_app/application.fam @@ -1,7 +1,7 @@ App( appid="bt_hid", name="Bluetooth Remote", - apptype=FlipperAppType.PLUGIN, + apptype=FlipperAppType.EXTERNAL, entry_point="bt_hid_app", stack_size=1 * 1024, cdefines=["APP_BLE_HID"], diff --git a/applications/plugins/music_player/application.fam b/applications/plugins/music_player/application.fam index 76787e097..c2df4e51a 100644 --- a/applications/plugins/music_player/application.fam +++ b/applications/plugins/music_player/application.fam @@ -1,7 +1,7 @@ App( appid="music_player", name="Music Player", - apptype=FlipperAppType.PLUGIN, + apptype=FlipperAppType.EXTERNAL, entry_point="music_player_app", cdefines=["APP_MUSIC_PLAYER"], requires=[ diff --git a/applications/plugins/picopass/application.fam b/applications/plugins/picopass/application.fam index 887d0324c..7a81e0804 100644 --- a/applications/plugins/picopass/application.fam +++ b/applications/plugins/picopass/application.fam @@ -1,7 +1,7 @@ App( appid="picopass", name="PicoPass Reader", - apptype=FlipperAppType.PLUGIN, + apptype=FlipperAppType.EXTERNAL, entry_point="picopass_app", requires=[ "storage", diff --git a/applications/plugins/snake_game/application.fam b/applications/plugins/snake_game/application.fam index d55f53bb1..b299619a5 100644 --- a/applications/plugins/snake_game/application.fam +++ b/applications/plugins/snake_game/application.fam @@ -1,7 +1,7 @@ App( appid="snake_game", name="Snake Game", - apptype=FlipperAppType.PLUGIN, + apptype=FlipperAppType.EXTERNAL, entry_point="snake_game_app", cdefines=["APP_SNAKE_GAME"], requires=["gui"], diff --git a/documentation/AppManifests.md b/documentation/AppManifests.md index 5e7ceb939..58ac292d7 100644 --- a/documentation/AppManifests.md +++ b/documentation/AppManifests.md @@ -1,6 +1,6 @@ # Flipper Application Manifests (.fam) -All components of Flipper Zero firmware — services, user applications, system settings — are developed independently. Each component has a build system manifest file, named `application.fam`, defining basic properties of a components and its relations to other parts of the system. +All components of Flipper Zero firmware — services, user applications, system settings — are developed independently. Each component has a build system manifest file, named `application.fam`, defining basic properties of a component and its relations to other parts of the system. When building firmware, **`fbt`** collects all application manifests, processes their dependencies and builds only those components that are utilized in current build configuration. See [fbt docs](./fbt.md#firmware-application-set) for details on build configurations. @@ -21,12 +21,12 @@ Only 2 parameters are mandatoty: ***appid*** and ***apptype***, others are optio | SERVICE | System service, created at early startup | | SYSTEM | Application not being shown in any menus. Can be started by other apps or from CLI | | APP | Regular application for main menu | -| PLUGIN | Application to be built as .fap plugin | +| PLUGIN | Application to be built as a part of firmware an to be placed in Plugins menu | | DEBUG | Application only visible in Debug menu with debug mode enabled | | ARCHIVE | One and only Archive app | | SETTINGS | Application to be placed in System settings menu | -| STARTUP | Callback function to run at system startup. Does not define a separate app | -| EXTERNAL | Application to be built as .fap plugin | +| STARTUP | Callback function to run at system startup. Does not define a standalone app | +| EXTERNAL | Application to be built as a .fap executable file | | METAPACKAGE | Does not define any code to be run, used for declaring dependencies and application bundles | * **name**: Name to show in menus. diff --git a/fbt_options.py b/fbt_options.py index bdf8fc03b..820fca871 100644 --- a/fbt_options.py +++ b/fbt_options.py @@ -74,7 +74,7 @@ FIRMWARE_APPS = { # Settings "settings_apps", # Plugins - # "basic_plugins", + "basic_plugins", # Debug # "debug_apps", ], diff --git a/site_scons/extapps.scons b/site_scons/extapps.scons index cfffda04f..c4df2ceed 100644 --- a/site_scons/extapps.scons +++ b/site_scons/extapps.scons @@ -63,7 +63,10 @@ def build_app_as_external(env, appdef): extapps["dist"][appdef.appid] = (appdef.fap_category, compact_elf) -apps_to_build_as_faps = [FlipperAppType.PLUGIN, FlipperAppType.EXTERNAL] +apps_to_build_as_faps = [ + # FlipperAppType.PLUGIN, + FlipperAppType.EXTERNAL, +] if appenv["DEBUG_TOOLS"]: apps_to_build_as_faps.append(FlipperAppType.DEBUG)