Merge develop into main (#343)
- Refactor `AppManifest`: add new fields and rename existing ones - Parse and validate the manifest from an app that is being installed. - Remove deprecated `scoped()` from `Lock` - Create `Tactility/Paths.h` - App loading at boot now properly parses the manifest files of external apps - Properly lock both source and destination locations during app install - Remove LVGL path variants from `AppPaths` and `ServicePaths` - Removed `xPath` base classes for apps and services. There's now `AppPaths` and `ServicePaths`. - Renamed app and service paths: "data" and "system" paths are now "user data" and "assets"
This commit is contained in:
committed by
GitHub
parent
a4d15b2a1e
commit
bab3eb19bc
@@ -1,5 +1,6 @@
|
||||
#include "tt_app.h"
|
||||
#include <Tactility/app/App.h>
|
||||
#include <Tactility/app/AppPaths.h>
|
||||
#include <Tactility/app/AppContext.h>
|
||||
|
||||
extern "C" {
|
||||
@@ -38,25 +39,7 @@ void tt_app_get_data_directory(AppPathsHandle handle, char* buffer, size_t* size
|
||||
assert(size != nullptr);
|
||||
assert(*size > 0);
|
||||
auto paths = HANDLE_AS_APP_CONTEXT(handle)->getPaths();
|
||||
auto data_path = paths->getDataDirectory();
|
||||
auto expected_length = data_path.length() + 1;
|
||||
if (*size < expected_length) {
|
||||
TT_LOG_E(TAG, "Path buffer not large enough (%d < %d)", *size, expected_length);
|
||||
*size = 0;
|
||||
buffer[0] = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
strcpy(buffer, data_path.c_str());
|
||||
*size = data_path.length();
|
||||
}
|
||||
|
||||
void tt_app_get_data_directory_lvgl(AppPathsHandle handle, char* buffer, size_t* size) {
|
||||
assert(buffer != nullptr);
|
||||
assert(size != nullptr);
|
||||
assert(*size > 0);
|
||||
auto paths = HANDLE_AS_APP_CONTEXT(handle)->getPaths();
|
||||
auto data_path = paths->getDataDirectoryLvgl();
|
||||
auto data_path = paths->getUserDataPath();
|
||||
auto expected_length = data_path.length() + 1;
|
||||
if (*size < expected_length) {
|
||||
TT_LOG_E(TAG, "Path buffer not large enough (%d < %d)", *size, expected_length);
|
||||
|
||||
@@ -185,7 +185,6 @@ const esp_elfsym elf_symbols[] {
|
||||
ESP_ELFSYM_EXPORT(tt_app_alertdialog_start),
|
||||
ESP_ELFSYM_EXPORT(tt_app_alertdialog_get_result_index),
|
||||
ESP_ELFSYM_EXPORT(tt_app_get_data_directory),
|
||||
ESP_ELFSYM_EXPORT(tt_app_get_data_directory_lvgl),
|
||||
ESP_ELFSYM_EXPORT(tt_bundle_alloc),
|
||||
ESP_ELFSYM_EXPORT(tt_bundle_free),
|
||||
ESP_ELFSYM_EXPORT(tt_bundle_opt_bool),
|
||||
|
||||
Reference in New Issue
Block a user