Run executables directly (#645)

- Apps can be launched directly from file paths (including Files app support)
- Added executable detection to identify unsupported or invalid binaries before launch.
- App startup is now streamlined through separate registered-app and direct-execution interfaces.
- Existing app launch points were migrated to the updated startup APIs.
This commit is contained in:
Ken Van Hoeylandt
2026-09-04 21:23:08 +02:00
committed by GitHub
parent 643cbc3806
commit a0b2ee7ebc
63 changed files with 1276 additions and 347 deletions
+11 -1
View File
@@ -2,6 +2,9 @@
#include "./State.h"
#include <app/stream.h>
#include <tactility/concurrent/task_event_group.h>
#include <cstdint>
#include <lvgl.h>
#include <memory>
@@ -10,8 +13,12 @@ namespace tt::app::files {
class View final {
std::shared_ptr<State> state;
TaskEventGroup* eventGroup = nullptr;
uint32_t appInstanceId = 0;
AppStream inputDialogStream {};
uint8_t inputDialogBuffer[256] {};
size_t current_start_index = 0;
size_t last_loaded_index = 0;
const size_t MAX_BATCH = 50;
@@ -30,14 +37,16 @@ class View final {
void showActionsForDirectory();
void showActionsForFile();
void showActionsForMountPoint();
void addCommonFileActions();
void viewFile(const std::string&path, const std::string&filename);
void runFile(const std::string& file_path);
void createDirEntryWidget(lv_obj_t* parent, dirent& dir_entry);
void onNavigate();
public:
explicit View(const std::shared_ptr<State>& state) : state(state) {}
View(const std::shared_ptr<State>& state, TaskEventGroup* eventGroup) : state(state), eventGroup(eventGroup) {}
void init(uint32_t appInstanceId, lv_obj_t* parent);
void update(size_t start_index = 0);
@@ -54,6 +63,7 @@ public:
void onCutPressed();
void onPastePressed();
void onEjectPressed();
void onRunPressed();
void onDirEntryListScrollBegin();
void onResult(uint32_t launchId, int32_t result);
void deinit();