Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题 / Problem
ReaderX 目前只发布 Android、Linux 和 Windows 原生包,HarmonyOS 没有可用的稳定 Tauri target:官方
feat/open-harmony分支仍依赖未发布的cargo-mobile2/openharmony-ability等第三方依赖,本地 Tauri CLI 也没有ohos子命令。本 PR 在不新增第三方包的前提下,为 HarmonyOS 提供两条可运行路径:
改动后的行为 / Resulting behavior
harmonyos/Stage 模型工程,无oh-package依赖;ArkWeb 加载固定的https://readerx.local/,通过onInterceptRequest映射到rawfile/www/,避开resource://的跨域限制。pnpm build:hap:以base=./构建前端并复制到 HAP rawfile,同时生成 PWA / HAP 图标。scripts/pwa-icons.mjs在 dev / build 时用 Node 内置模块绘制,不提交二进制文件。HarmonyOS 版本仍受 WebView 外壳限制:书源 JS 执行、MOBI 解析、PDF 页面图回退、局域网同步、ZIP 备份和原生 TTS 不可用,入口沿用现有降级提示。
截图:当前环境没有 HarmonyOS 设备 / 模拟器,未提供真机截图;图标生成结果已在本地检查尺寸与 PNG 编码。
验证 / Validation
pnpm exec tsc --noEmit通过。pnpm run i18n:check通过。pnpm run build通过。pnpm run build:hap通过,产物位于harmonyos/entry/src/main/resources/rawfile/www/。webStore的内存降级脚本覆盖偏好、书架、书籍、章节、书签、译文与书源;数据与兼容性 / Data and compatibility
readerx(version 1),与 Tauri 的 Rust 数据目录相互独立,不迁移既有原生数据。package.json当前均为 0.7.0;发布新版本时需同步修改AppScope/app.json5的versionName/versionCode。提交前检查 / Checklist