add base-apps with manifests, layout system, and testing documentation

- Rename test-apps to base-apps with proper manifest.json for each app
- Add is_system_app flag to app discovery and Lua API
- Fix icon path resolution for /system/icons/ paths
- Add layout.lua and layout.rcss for reusable UI components
- Update home screen to dynamically load all apps from manifests
- Update all app RML files to use layout components
- Comprehensive testing framework documentation with JSON action format
- Add tests/ directory structure for automated UI testing
This commit is contained in:
2026-01-20 09:14:05 +01:00
parent 5de087e8e0
commit 1f91d7508e
101 changed files with 13103 additions and 966 deletions

View File

@@ -68,6 +68,7 @@ bool AppDiscovery::LoadAppManifest(const std::string& app_directory, AppInfo& in
info.version = j.value("version", "1.0.0");
info.icon = j.value("icon", "icon.tga");
info.description = j.value("description", "");
info.is_system_app = j.value("is_system_app", false);
// Normalize path separators
info.app_path = app_directory;

View File

@@ -11,13 +11,20 @@ struct AppInfo {
std::string name; // Display name
std::string version; // Version string
std::string entry; // Entry point (e.g., "main.rml")
std::string icon; // Icon filename (e.g., "icon.tga")
std::string icon; // Icon filename (e.g., "icon.tga") or path (e.g., "/system/icons/phone.tga")
std::string description; // App description
std::string app_path; // Full path to app directory
bool is_system_app = false; // True for system apps (com.mosis.*)
// Computed paths
std::string GetEntryPath() const { return app_path + "/" + entry; }
std::string GetIconPath() const { return app_path + "/" + icon; }
std::string GetIconPath() const {
// If icon starts with /, it's an absolute/system path - don't prepend app_path
if (!icon.empty() && icon[0] == '/') {
return icon;
}
return app_path + "/" + icon;
}
};
class AppDiscovery {