feat: add minimal HarmonyOS standard project shell

This commit is contained in:
OpenClaw committed 2026-03-09 17:13:12 +08:00
1 parent 8b6e24fa61
commit 6c99ae75f6
11 files changed
+154

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
{
"modelVersion": "5.0.0",
"name": "entry",
"version": "1.0.0",
"description": "Entry module for MRP simulator HarmonyOS app",
"dependencies": {}
}
@@ -0,0 +1,18 @@
import UIAbility from '@ohos.app.ability.UIAbility';
import window from '@ohos.window';
import hilog from '@ohos.hilog';
const DOMAIN = 0xFF00;
const TAG = 'EntryAbility';
export default class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage: window.WindowStage): void {
windowStage.loadContent('pages/ShellRootPage', (err) => {
if (err.code) {
hilog.error(DOMAIN, TAG, 'Failed to load ShellRootPage: %{public}s', JSON.stringify(err));
return;
}
hilog.info(DOMAIN, TAG, 'ShellRootPage loaded');
});
}
}
+27
View File
@@ -0,0 +1,27 @@
{
"module": {
"name": "entry",
"type": "entry",
"description": "$string:module_desc",
"mainElement": "EntryAbility",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"abilities": [
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ets",
"description": "$string:entry_ability_desc",
"icon": "$media:app_icon",
"label": "$string:app_name",
"startWindowIcon": "$media:app_icon",
"startWindowBackground": "$color:start_window_background",
"exported": true
}
]
}
}
@@ -0,0 +1,8 @@
{
"color": [
{
"name": "start_window_background",
"value": "#FFFFFF"
}
]
}
@@ -0,0 +1,16 @@
{
"string": [
{
"name": "app_name",
"value": "MRP Simulator"
},
{
"name": "module_desc",
"value": "MRP simulator HarmonyOS entry module"
},
{
"name": "entry_ability_desc",
"value": "MRP simulator entry ability"
}
]
}
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
<rect width="256" height="256" rx="48" fill="#0A59F7"/>
<text x="128" y="148" text-anchor="middle" font-size="84" fill="#FFFFFF" font-family="sans-serif">M</text>
</svg>

After

Width:  |  Height:  |  Size: 262 B

@@ -0,0 +1,5 @@
{
"src": [
"pages/ShellRootPage"
]
}