diff --git a/applications/main/application.fam b/applications/main/application.fam index 006670947..f3409d5c9 100644 --- a/applications/main/application.fam +++ b/applications/main/application.fam @@ -3,7 +3,6 @@ App( name="Basic applications for main menu", apptype=FlipperAppType.METAPACKAGE, provides=[ - "fap_loader", "subghz", "lfrfid", "nfc", diff --git a/applications/main/archive/scenes/archive_scene_browser.c b/applications/main/archive/scenes/archive_scene_browser.c index ac02b01aa..82aa85912 100644 --- a/applications/main/archive/scenes/archive_scene_browser.c +++ b/applications/main/archive/scenes/archive_scene_browser.c @@ -23,7 +23,7 @@ const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) { return "RFID"; case ArchiveFileTypeInfrared: return "Infrared"; - case ArchiveFileTypeBadUsb: + case ArchiveFileTypeBadKb: return "Bad KB"; case ArchiveFileTypeU2f: return "U2F"; @@ -65,6 +65,7 @@ static void } } else { loader_start_with_gui_error(loader, furi_string_get_cstr(selected->path), NULL); + UNUSED(favorites); // const char* str = furi_string_get_cstr(selected->path); // if(favorites) { // char arg[strlen(str) + 4]; @@ -75,10 +76,6 @@ static void // } } - if(status != LoaderStatusOk) { - FURI_LOG_E(TAG, "loader_start failed: %d", status); - } - furi_record_close(RECORD_LOADER); } diff --git a/applications/main/bad_kb/application.fam b/applications/main/bad_kb/application.fam index 0c923ba5b..09531da81 100644 --- a/applications/main/bad_kb/application.fam +++ b/applications/main/bad_kb/application.fam @@ -1,7 +1,7 @@ App( appid="bad_kb", name="Bad KB", - apptype=FlipperAppType.EXTMAINAPP, + apptype=FlipperAppType.APP, entry_point="bad_kb_app", cdefines=["APP_BAD_KB"], requires=[ diff --git a/applications/main/gpio/application.fam b/applications/main/gpio/application.fam index 222d1ca28..efeb8b6fe 100644 --- a/applications/main/gpio/application.fam +++ b/applications/main/gpio/application.fam @@ -1,7 +1,7 @@ App( appid="gpio", name="GPIO", - apptype=FlipperAppType.EXTMAINAPP, + apptype=FlipperAppType.APP, entry_point="gpio_app", cdefines=["APP_GPIO"], requires=["gui"], diff --git a/applications/main/ibutton/application.fam b/applications/main/ibutton/application.fam index f29fd7772..06968bba4 100644 --- a/applications/main/ibutton/application.fam +++ b/applications/main/ibutton/application.fam @@ -1,7 +1,7 @@ App( appid="ibutton", name="iButton", - apptype=FlipperAppType.EXTMAINAPP, + apptype=FlipperAppType.APP, targets=["f7"], entry_point="ibutton_app", cdefines=["APP_IBUTTON"], diff --git a/applications/main/infrared/application.fam b/applications/main/infrared/application.fam index 8fc26d3d9..e5483e9ff 100644 --- a/applications/main/infrared/application.fam +++ b/applications/main/infrared/application.fam @@ -1,7 +1,7 @@ App( appid="infrared", name="Infrared", - apptype=FlipperAppType.EXTMAINAPP, + apptype=FlipperAppType.APP, entry_point="infrared_app", targets=["f7"], cdefines=["APP_INFRARED"], diff --git a/applications/main/lfrfid/application.fam b/applications/main/lfrfid/application.fam index d75b5431f..e84ed2a31 100644 --- a/applications/main/lfrfid/application.fam +++ b/applications/main/lfrfid/application.fam @@ -1,7 +1,7 @@ App( appid="lfrfid", name="RFID", - apptype=FlipperAppType.EXTMAINAPP, + apptype=FlipperAppType.APP, targets=["f7"], entry_point="lfrfid_app", cdefines=["APP_LF_RFID"], diff --git a/applications/main/xtreme_app/application.fam b/applications/main/xtreme_app/application.fam index ca9cc62dc..7f30db104 100644 --- a/applications/main/xtreme_app/application.fam +++ b/applications/main/xtreme_app/application.fam @@ -1,7 +1,7 @@ App( appid="xtreme_app", name="Xtreme", - apptype=FlipperAppType.EXTMAINAPP, + apptype=FlipperAppType.APP, entry_point="xtreme_app", cdefines=["APP_XTREME"], requires=[ diff --git a/applications/main/xtreme_app/scenes/xtreme_app_scene_interface_mainmenu_add.c b/applications/main/xtreme_app/scenes/xtreme_app_scene_interface_mainmenu_add.c index 57fa78090..dd9336022 100644 --- a/applications/main/xtreme_app/scenes/xtreme_app_scene_interface_mainmenu_add.c +++ b/applications/main/xtreme_app/scenes/xtreme_app_scene_interface_mainmenu_add.c @@ -11,7 +11,7 @@ static bool xtreme_app_scene_interface_mainmenu_add_file_browser_callback( FuriString* item_name) { UNUSED(context); Storage* storage = furi_record_open(RECORD_STORAGE); - bool success = fap_loader_load_name_and_icon(file_path, storage, icon_ptr, item_name); + bool success = flipper_application_load_name_and_icon(file_path, storage, icon_ptr, item_name); furi_record_close(RECORD_STORAGE); return success; } @@ -32,7 +32,7 @@ void xtreme_app_scene_interface_mainmenu_add_on_enter(void* context) { if(dialog_file_browser_show(app->dialogs, string, string, &browser_options)) { CharList_push_back(app->mainmenu_app_paths, strdup(furi_string_get_cstr(string))); Storage* storage = furi_record_open(RECORD_STORAGE); - fap_loader_load_name_and_icon(string, storage, NULL, string); + flipper_application_load_name_and_icon(string, storage, NULL, string); furi_record_close(RECORD_STORAGE); CharList_push_back(app->mainmenu_app_names, strdup(furi_string_get_cstr(string))); app->save_mainmenu_apps = true; diff --git a/applications/main/xtreme_app/xtreme_app.c b/applications/main/xtreme_app/xtreme_app.c index 3d5760923..01822084f 100644 --- a/applications/main/xtreme_app/xtreme_app.c +++ b/applications/main/xtreme_app/xtreme_app.c @@ -229,7 +229,7 @@ XtremeApp* xtreme_app_alloc() { furi_string_replace_all(line, "\r", ""); furi_string_replace_all(line, "\n", ""); CharList_push_back(app->mainmenu_app_paths, strdup(furi_string_get_cstr(line))); - fap_loader_load_name_and_icon(line, storage, NULL, line); + flipper_application_load_name_and_icon(line, storage, NULL, line); CharList_push_back(app->mainmenu_app_names, strdup(furi_string_get_cstr(line))); } } diff --git a/applications/main/xtreme_app/xtreme_app.h b/applications/main/xtreme_app/xtreme_app.h index 321ad167c..da6029ed1 100644 --- a/applications/main/xtreme_app/xtreme_app.h +++ b/applications/main/xtreme_app/xtreme_app.h @@ -18,7 +18,7 @@ #include "dolphin/dolphin_i.h" #include #include -#include +#include #include #include #include diff --git a/applications/services/desktop/animations/views/bubble_animation_view.c b/applications/services/desktop/animations/views/bubble_animation_view.c index e59ca0c98..8fcfba0e3 100644 --- a/applications/services/desktop/animations/views/bubble_animation_view.c +++ b/applications/services/desktop/animations/views/bubble_animation_view.c @@ -136,7 +136,7 @@ static bool bubble_animation_input_callback(InputEvent* event, void* context) { } } else if(event->type == InputTypeLong) { Loader* loader = furi_record_open(RECORD_LOADER); - loader_start(loader, "Power", "about_battery"); + loader_start(loader, "Power", "about_battery", NULL); furi_record_close(RECORD_LOADER); } } diff --git a/applications/services/desktop/animations/views/one_shot_animation_view.c b/applications/services/desktop/animations/views/one_shot_animation_view.c index d11d35b17..52b183566 100644 --- a/applications/services/desktop/animations/views/one_shot_animation_view.c +++ b/applications/services/desktop/animations/views/one_shot_animation_view.c @@ -73,7 +73,7 @@ static bool one_shot_view_input(InputEvent* event, void* context) { } } else if(event->type == InputTypeLong) { Loader* loader = furi_record_open(RECORD_LOADER); - loader_start(loader, "Power", "about_battery"); + loader_start(loader, "Power", "about_battery", NULL); furi_record_close(RECORD_LOADER); } } diff --git a/applications/services/desktop/scenes/desktop_scene_lock_menu.c b/applications/services/desktop/scenes/desktop_scene_lock_menu.c index d1c7e48bc..2eb452192 100644 --- a/applications/services/desktop/scenes/desktop_scene_lock_menu.c +++ b/applications/services/desktop/scenes/desktop_scene_lock_menu.c @@ -80,8 +80,8 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) { switch(event.event) { case DesktopLockMenuEventSettings: desktop_scene_lock_menu_save_settings(desktop); - loader_show_settings(furi_record_open(RECORD_LOADER)); - furi_record_close(RECORD_LOADER); + // loader_show_settings(furi_record_open(RECORD_LOADER)); + // furi_record_close(RECORD_LOADER); consumed = true; break; case DesktopLockMenuEventLock: @@ -95,7 +95,7 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) { desktop_lock(desktop, true); } else { LoaderStatus status = - loader_start(desktop->loader, "Desktop", DESKTOP_SETTINGS_RUN_PIN_SETUP_ARG); + loader_start(desktop->loader, "Desktop", DESKTOP_SETTINGS_RUN_PIN_SETUP_ARG, NULL); if(status == LoaderStatusOk) { scene_manager_set_scene_state(desktop->scene_manager, DesktopSceneLockMenu, 1); } else { @@ -114,7 +114,7 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) { furi_record_close(RECORD_POWER); } else { LoaderStatus status = - loader_start(desktop->loader, "Desktop", DESKTOP_SETTINGS_RUN_PIN_SETUP_ARG); + loader_start(desktop->loader, "Desktop", DESKTOP_SETTINGS_RUN_PIN_SETUP_ARG, NULL); if(status == LoaderStatusOk) { scene_manager_set_scene_state(desktop->scene_manager, DesktopSceneLockMenu, 2); } else { @@ -125,7 +125,7 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) { break; case DesktopLockMenuEventXtreme: desktop_scene_lock_menu_save_settings(desktop); - loader_start(desktop->loader, "Xtreme", NULL); + loader_start_with_gui_error(desktop->loader, "Xtreme", NULL); consumed = true; break; case DesktopLockMenuEventStealthModeOn: diff --git a/applications/services/desktop/scenes/desktop_scene_locked.c b/applications/services/desktop/scenes/desktop_scene_locked.c index adf7a6a7c..3121d1d38 100644 --- a/applications/services/desktop/scenes/desktop_scene_locked.c +++ b/applications/services/desktop/scenes/desktop_scene_locked.c @@ -86,10 +86,7 @@ bool desktop_scene_locked_on_event(void* context, SceneManagerEvent event) { if(event.type == SceneManagerEventTypeCustom) { switch(event.event) { case DesktopLockedEventOpenPowerOff: { - LoaderStatus status = loader_start(desktop->loader, "Power", "off"); - if(status != LoaderStatusOk) { - FURI_LOG_E(TAG, "loader_start failed: %d", status); - } + loader_start(desktop->loader, "Power", "off", NULL); consumed = true; break; } diff --git a/applications/services/desktop/scenes/desktop_scene_main.c b/applications/services/desktop/scenes/desktop_scene_main.c index 5be8a9197..f4e8fd309 100644 --- a/applications/services/desktop/scenes/desktop_scene_main.c +++ b/applications/services/desktop/scenes/desktop_scene_main.c @@ -64,14 +64,6 @@ static void static void desktop_scene_main_start_favorite(Desktop* desktop, FavoriteApp* application) { if(strlen(application->name_or_path) > 0) { loader_start_with_gui_error(desktop->loader, application->name_or_path, NULL); - } else { - // No favourite app is set! So we skipping this part - return; - //status = loader_start(desktop->loader, FAP_LOADER_APP_NAME, NULL); - } - - if(status != LoaderStatusOk) { - FURI_LOG_E(TAG, "loader_start failed: %d", status); } } @@ -167,11 +159,8 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) { break; } case DesktopMainEventOpenClock: { - LoaderStatus status = loader_start( - desktop->loader, FAP_LOADER_APP_NAME, EXT_PATH("apps/Misc/Nightstand.fap")); - if(status != LoaderStatusOk) { - FURI_LOG_E(TAG, "loader_start failed: %d", status); - } + loader_start_with_gui_error( + desktop->loader, EXT_PATH("apps/Misc/Nightstand.fap"), NULL); break; } case DesktopLockedEventUpdate: diff --git a/applications/services/loader/loader.h b/applications/services/loader/loader.h index 9fc4059f2..d49bec0a4 100644 --- a/applications/services/loader/loader.h +++ b/applications/services/loader/loader.h @@ -6,7 +6,7 @@ extern "C" { #endif #define RECORD_LOADER "loader" -#define LOADER_APPLICATIONS_NAME "Applications" +#define LOADER_APPLICATIONS_NAME "Apps" typedef struct Loader Loader; @@ -81,4 +81,4 @@ FuriPubSub* loader_get_pubsub(Loader* instance); #ifdef __cplusplus } -#endif \ No newline at end of file +#endif diff --git a/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c b/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c index f18b0c0a7..0251f5710 100644 --- a/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c +++ b/applications/settings/desktop_settings/scenes/desktop_settings_scene_favorite.c @@ -3,6 +3,7 @@ #include "desktop_settings_scene.h" #include #include +#include static bool favorite_fap_selector_item_callback( FuriString* file_path, @@ -10,16 +11,9 @@ static bool favorite_fap_selector_item_callback( uint8_t** icon_ptr, FuriString* item_name) { UNUSED(context); -#ifdef APP_FAP_LOADER Storage* storage = furi_record_open(RECORD_STORAGE); - bool success = fap_loader_load_name_and_icon(file_path, storage, icon_ptr, item_name); + bool success = flipper_application_load_name_and_icon(file_path, storage, icon_ptr, item_name); furi_record_close(RECORD_STORAGE); -#else - UNUSED(file_path); - UNUSED(icon_ptr); - UNUSED(item_name); - bool success = false; -#endif return success; } @@ -54,13 +48,13 @@ void desktop_settings_scene_favorite_on_enter(void* context) { if(primary_favorite) { // Select favorite item in submenu if((app->settings.favorite_primary.is_external && - !strcmp(FLIPPER_APPS[i].name, FAP_LOADER_APP_NAME)) || + !strcmp(FLIPPER_APPS[i].name, LOADER_APPLICATIONS_NAME)) || (!strcmp(FLIPPER_APPS[i].name, app->settings.favorite_primary.name_or_path))) { pre_select_item = i; } } else { if((app->settings.favorite_secondary.is_external && - !strcmp(FLIPPER_APPS[i].name, FAP_LOADER_APP_NAME)) || + !strcmp(FLIPPER_APPS[i].name, LOADER_APPLICATIONS_NAME)) || (!strcmp(FLIPPER_APPS[i].name, app->settings.favorite_secondary.name_or_path))) { pre_select_item = i; } @@ -83,7 +77,7 @@ bool desktop_settings_scene_favorite_on_event(void* context, SceneManagerEvent e scene_manager_get_scene_state(app->scene_manager, DesktopSettingsAppSceneFavorite); if(event.type == SceneManagerEventTypeCustom) { - if(strcmp(FLIPPER_APPS[event.event].name, FAP_LOADER_APP_NAME) != 0) { + if(strcmp(FLIPPER_APPS[event.event].name, LOADER_APPLICATIONS_NAME) != 0) { if(primary_favorite) { app->settings.favorite_primary.is_external = false; strncpy( diff --git a/firmware/targets/f7/api_symbols.csv b/firmware/targets/f7/api_symbols.csv index b737146e0..7535942dc 100644 --- a/firmware/targets/f7/api_symbols.csv +++ b/firmware/targets/f7/api_symbols.csv @@ -1,7 +1,6 @@ entry,status,name,type,params Version,+,31.0,, Header,+,applications/main/archive/helpers/favorite_timeout.h,, -Header,+,applications/main/fap_loader/fap_loader_app.h,, Header,+,applications/main/subghz/helpers/subghz_txrx.h,, Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/cli/cli.h,, @@ -878,7 +877,6 @@ Function,-,expm1l,long double,long double Function,-,fabs,double,double Function,-,fabsf,float,float Function,-,fabsl,long double,long double -Function,+,fap_loader_load_name_and_icon,_Bool,"FuriString*, Storage*, uint8_t**, FuriString*" Function,+,favorite_timeout_callback,void,void* Function,+,favorite_timeout_run,void,"ViewDispatcher*, SceneManager*" Function,-,fclose,int,FILE* @@ -1920,7 +1918,6 @@ Function,+,loader_get_pubsub,FuriPubSub*,Loader* Function,+,loader_is_locked,_Bool,Loader* Function,+,loader_lock,_Bool,Loader* Function,+,loader_show_menu,void,Loader* -Function,+,loader_show_settings,void,Loader* Function,+,loader_start,LoaderStatus,"Loader*, const char*, const char*, FuriString*" Function,+,loader_start_with_gui_error,LoaderStatus,"Loader*, const char*, const char*" Function,+,loader_unlock,void,Loader* diff --git a/furi/flipper.c b/furi/flipper.c index c42ba0fdd..bdb80c851 100644 --- a/furi/flipper.c +++ b/furi/flipper.c @@ -74,7 +74,7 @@ void flipper_migrate_files() { furi_record_close(RECORD_STORAGE); } -void flipper_start_service(const FlipperApplication* service) { +void flipper_start_service(const FlipperInternalApplication* service) { FURI_LOG_D(TAG, "Starting service %s", service->name); FuriThread* thread =