feat: add minimal HarmonyOS standard project shell
This commit is contained in:
1 parent
8b6e24fa61
commit
6c99ae75f6
11 files changed
+154
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"app": {
|
||||||
|
"bundleName": "com.xiaobai.mrpsimulator",
|
||||||
|
"vendor": "xiaobai",
|
||||||
|
"versionCode": 1000000,
|
||||||
|
"versionName": "1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"app": {
|
||||||
|
"products": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"signingConfig": "default",
|
||||||
|
"compatibleSdkVersion": "5.0.0(12)",
|
||||||
|
"runtimeOS": "HarmonyOS"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildModeSet": [
|
||||||
|
{
|
||||||
|
"name": "debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"signingConfigs": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"type": "HarmonyOS",
|
||||||
|
"material": {
|
||||||
|
"storeFile": "./AppScope/debug.p12",
|
||||||
|
"storePassword": "123456",
|
||||||
|
"keyAlias": "debugKey",
|
||||||
|
"keyPassword": "123456",
|
||||||
|
"signAlg": "SHA256withECDSA",
|
||||||
|
"profile": "./AppScope/debug.mobileprovision"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"name": "entry",
|
||||||
|
"srcPath": "./entry",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"applyToProducts": [
|
||||||
|
"default"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { appTasks } from '@ohos/hvigor-ohos-plugin';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
system: appTasks,
|
||||||
|
plugins: []
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"modelVersion": "5.0.0",
|
||||||
|
"name": "mrp-simulator-harmonyos",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "HarmonyOS shell for MRP simulator",
|
||||||
|
"dependencies": {}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user