mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
[FL-3400] External menu apps (#2849)
* FBT, applications: add MENUEXTERNAL app type * FBT, uFBT: build MENUEXTERNAL as EXTERNAL app * Loader menu: show external menu apps * LFRFID: move to sd card * FBT: always build External Applications list * Archive: look for external apps path * Infrared: move to sd card * Apps: add "start" apps * iButton: move to sd card * BadUSB: move to sd card * External apps: update icons * GPIO: move to sd card * Loader: look for external apps path * U2F: move to sd * SubGHz: move to sd * Apps: "on_start" metapackage * NFC: move to sd * Sync f7 and f18 Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -170,6 +170,16 @@ static const FlipperInternalApplication* loader_find_application_by_name(const c
|
||||
return application;
|
||||
}
|
||||
|
||||
static const char* loader_find_external_application_by_name(const char* app_name) {
|
||||
for(size_t i = 0; i < FLIPPER_EXTERNAL_APPS_COUNT; i++) {
|
||||
if(strcmp(FLIPPER_EXTERNAL_APPS[i].name, app_name) == 0) {
|
||||
return FLIPPER_EXTERNAL_APPS[i].path;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void loader_start_app_thread(Loader* loader, FlipperInternalApplicationFlag flags) {
|
||||
// setup heap trace
|
||||
FuriHalRtcHeapTrackMode mode = furi_hal_rtc_get_heap_track_mode();
|
||||
@@ -379,6 +389,14 @@ static LoaderStatus loader_do_start_by_name(
|
||||
break;
|
||||
}
|
||||
|
||||
// check External Applications
|
||||
{
|
||||
const char* path = loader_find_external_application_by_name(name);
|
||||
if(path) {
|
||||
name = path;
|
||||
}
|
||||
}
|
||||
|
||||
// check external apps
|
||||
{
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
|
||||
Reference in New Issue
Block a user