add simulator mode to desktop designer for testing apps
- Add --simulator flag to launch home screen showing discovered apps - Create app discovery system to scan test-apps/ directory - Build simulator home screen with dark phone-like UI - Add Lua API: simulator.launchApp, simulator.goHome, simulator.getApps - ESC key returns to home when inside an app - Apps displayed with icons in grid layout Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
32
designer/src/app_discovery.h
Normal file
32
designer/src/app_discovery.h
Normal file
@@ -0,0 +1,32 @@
|
||||
// D:\Dev\Mosis\MosisService\designer\src\app_discovery.h
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace mosis {
|
||||
|
||||
struct AppInfo {
|
||||
std::string id; // e.g., "com.mosis.sandbox-test"
|
||||
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 description; // App description
|
||||
std::string app_path; // Full path to app directory
|
||||
|
||||
// Computed paths
|
||||
std::string GetEntryPath() const { return app_path + "/" + entry; }
|
||||
std::string GetIconPath() const { return app_path + "/" + icon; }
|
||||
};
|
||||
|
||||
class AppDiscovery {
|
||||
public:
|
||||
// Scan a directory for apps (folders with manifest.json)
|
||||
static std::vector<AppInfo> DiscoverApps(const std::string& apps_directory);
|
||||
|
||||
// Load a single app's manifest
|
||||
static bool LoadAppManifest(const std::string& app_directory, AppInfo& info);
|
||||
};
|
||||
|
||||
} // namespace mosis
|
||||
Reference in New Issue
Block a user