Compare commits

...
7 Commits
6 changed files with 134 additions and 1 deletions

No files matched your search

+25
View File
@@ -13,6 +13,31 @@ MRP 模拟器鸿蒙化
## HarmonyOS Senior Engineer Backlog
### HOS-PRIO-001 Native/NAPI/C++ 最小工程骨架(最高优先级)
交付:
- 实际目录进入主仓库:
- `entry/src/main/cpp/`
- `entry/src/main/cpp/napi/`
- `entry/src/main/cpp/runtime/`
- `entry/src/main/cpp/platform/`
- `entry/src/main/cpp/render/`
- `entry/src/main/cpp/input/`
- 最小文件骨架进入主仓库:
- `CMakeLists.txt`
- `module_init.cpp`
- `facade_binding.cpp`
- `MrpFacade.h/.cpp`
- `MrpRuntime.h/.cpp`
- `FrameBuffer.h/.cpp`
- `InputEvent.h`
- `InputDispatcher.cpp`
- 必须 **直接 commit + push 到 main**
规则:
- 这项优先级高于文档补充
- 先把 native 骨架推进仓库,再补解释文档
- 不允许继续只产出文档、不产出 native 目录和文件
### HOS-001 POC 文件级骨架清单
交付:
- ArkTS 侧骨架文件清单
+7 -1
View File
@@ -6,5 +6,11 @@
"arguments": "",
"cppFlags": "-std=c++17"
}
}
},
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS"
}
]
}
+6
View File
@@ -0,0 +1,6 @@
import { hapTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hapTasks,
plugins: []
};
+5
View File
@@ -0,0 +1,5 @@
{
"modelVersion": "5.0.0",
"dependencies": {},
"execution": {}
}
+3
View File
@@ -4,3 +4,6 @@
- 样例整理脚本
- 调研辅助脚本
- 构建/验证辅助脚本
当前可用:
- `check-init-env.sh`:检查仓库是否具备最小初始化前置(工程壳、wrapper、local.properties、hwsdk.dir、hvigor/node)
+88
View File
@@ -0,0 +1,88 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT_DIR"
status() {
printf '%-32s %s\n' "$1" "$2"
}
check_file() {
local path="$1"
if [ -e "$path" ]; then
status "$path" "OK"
else
status "$path" "MISSING"
return 1
fi
}
FAILED=0
echo "[MRP HarmonyOS Init Check]"
echo "root=$ROOT_DIR"
echo "\n# Project shell files"
check_file "AppScope/app.json5" || FAILED=1
check_file "build-profile.json5" || FAILED=1
check_file "hvigorfile.ts" || FAILED=1
check_file "oh-package.json5" || FAILED=1
check_file "entry/hvigorfile.ts" || FAILED=1
check_file "entry/oh-package.json5" || FAILED=1
check_file "entry/build-profile.json5" || FAILED=1
check_file "entry/src/main/module.json5" || FAILED=1
check_file "entry/src/main/resources" || FAILED=1
check_file "entry/src/main/ets" || FAILED=1
check_file "entry/src/main/cpp" || FAILED=1
echo "\n# Wrapper / runtime tools"
if [ -x "./hvigorw" ]; then
status "./hvigorw" "OK"
else
status "./hvigorw" "NOT_EXECUTABLE"
FAILED=1
fi
if command -v hvigor >/dev/null 2>&1; then
status "hvigor" "FOUND"
else
status "hvigor" "MISSING"
FAILED=1
fi
if command -v node >/dev/null 2>&1; then
status "node" "FOUND: $(node -v)"
else
status "node" "MISSING"
FAILED=1
fi
echo "\n# Local machine files"
if [ -f "local.properties" ]; then
status "local.properties" "FOUND"
HWSDK_DIR="$(sed -n 's/^hwsdk\.dir=//p' local.properties | tail -1)"
if [ -z "$HWSDK_DIR" ]; then
status "hwsdk.dir" "EMPTY"
FAILED=1
elif [[ "$HWSDK_DIR" == "/absolute/path/to/HarmonyOS/Sdk" ]]; then
status "hwsdk.dir" "PLACEHOLDER"
FAILED=1
elif [ -d "$HWSDK_DIR" ]; then
status "hwsdk.dir" "CONFIGURED"
else
status "hwsdk.dir" "PATH_NOT_FOUND"
FAILED=1
fi
else
status "local.properties" "MISSING"
FAILED=1
fi
echo "\n# Conclusion"
if [ "$FAILED" -eq 0 ]; then
echo "INIT_PREREQUISITES_OK"
else
echo "INIT_PREREQUISITES_BLOCKED"
exit 2
fi