Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion applications/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Applications for main Flipper menu.

- `archive` - Archive and file manager
- `bad_usb` - Bad USB application
- `fap_loader` - External applications loader
- `gpio` - GPIO application: includes USART bridge and GPIO control
- `ibutton` - iButton application, onewire keys and more
- `infrared` - Infrared application, controls your IR devices
Expand Down
1 change: 0 additions & 1 deletion applications/main/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ App(
"subghz",
"bad_usb",
"u2f",
"fap_loader",
"archive",
],
)
4 changes: 2 additions & 2 deletions applications/main/archive/helpers/archive_browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <core/common_defines.h>
#include <core/log.h>
#include <gui/modules/file_browser_worker.h>
#include <fap_loader/fap_loader_app.h>
#include <flipper_application/flipper_application.h>
#include <math.h>

static void
Expand Down Expand Up @@ -367,7 +367,7 @@ void archive_add_app_item(ArchiveBrowserView* browser, const char* name) {
static bool archive_get_fap_meta(FuriString* file_path, FuriString* fap_name, uint8_t** icon_ptr) {
Storage* storage = furi_record_open(RECORD_STORAGE);
bool success = false;
if(fap_loader_load_name_and_icon(file_path, storage, icon_ptr, fap_name)) {
if(flipper_application_load_name_and_icon(file_path, storage, icon_ptr, fap_name)) {
success = true;
}
furi_record_close(RECORD_STORAGE);
Expand Down
57 changes: 34 additions & 23 deletions applications/main/archive/scenes/archive_scene_browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,28 @@
#define SCENE_STATE_DEFAULT (0)
#define SCENE_STATE_NEED_REFRESH (1)

static const char* flipper_app_name[] = {
[ArchiveFileTypeIButton] = "iButton",
[ArchiveFileTypeNFC] = "NFC",
[ArchiveFileTypeSubGhz] = "Sub-GHz",
[ArchiveFileTypeLFRFID] = "125 kHz RFID",
[ArchiveFileTypeInfrared] = "Infrared",
[ArchiveFileTypeBadUsb] = "Bad USB",
[ArchiveFileTypeU2f] = "U2F",
[ArchiveFileTypeUpdateManifest] = "UpdaterApp",
[ArchiveFileTypeApplication] = "Applications",
};
const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) {
switch(file_type) {
case ArchiveFileTypeIButton:
return "iButton";
case ArchiveFileTypeNFC:
return "NFC";
case ArchiveFileTypeSubGhz:
return "Sub-GHz";
case ArchiveFileTypeLFRFID:
return "125 kHz RFID";
case ArchiveFileTypeInfrared:
return "Infrared";
case ArchiveFileTypeBadUsb:
return "Bad USB";
case ArchiveFileTypeU2f:
return "U2F";
case ArchiveFileTypeUpdateManifest:
return "UpdaterApp";
default:
return NULL;
}
}

static void archive_loader_callback(const void* message, void* context) {
furi_assert(message);
Expand All @@ -39,20 +50,20 @@ static void archive_run_in_app(ArchiveBrowserView* browser, ArchiveFile_t* selec
UNUSED(browser);
Loader* loader = furi_record_open(RECORD_LOADER);

LoaderStatus status;
if(selected->is_app) {
char* param = strrchr(furi_string_get_cstr(selected->path), '/');
if(param != NULL) {
param++;
const char* app_name = archive_get_flipper_app_name(selected->type);

if(app_name) {
if(selected->is_app) {
char* param = strrchr(furi_string_get_cstr(selected->path), '/');
if(param != NULL) {
param++;
}
loader_start_with_gui_error(loader, app_name, param);
} else {
loader_start_with_gui_error(loader, app_name, furi_string_get_cstr(selected->path));
}
status = loader_start(loader, flipper_app_name[selected->type], param);
} else {
status = loader_start(
loader, flipper_app_name[selected->type], furi_string_get_cstr(selected->path));
}

if(status != LoaderStatusOk) {
FURI_LOG_E(TAG, "loader_start failed: %d", status);
loader_start_with_gui_error(loader, furi_string_get_cstr(selected->path), NULL);
}

furi_record_close(RECORD_LOADER);
Expand Down
15 changes: 0 additions & 15 deletions applications/main/fap_loader/application.fam

This file was deleted.

216 changes: 0 additions & 216 deletions applications/main/fap_loader/fap_loader_app.c

This file was deleted.

27 changes: 0 additions & 27 deletions applications/main/fap_loader/fap_loader_app.h

This file was deleted.

Loading