Commit Graph
11 Commits
Author SHA1 Message Date
springmin 6a3bee9252 pdfium: add compatibility symbols required by pdfium-render
pdfium-render 0.9.4 dynamically binds several optional struct-tree, text, font-map and page-move APIs that the pinned OHOS source no longer exports. Add a compatibility translation unit for the missing symbols so the library can load; the preview path only uses the core render APIs.
2026-10-28 22:43:28 +08:00
springmin 6914dc2040 pdfium: add the user-permissions compatibility symbol
The source port exposes FPDF_GetDocPermissions with user semantics but no separate FPDF_GetDocUserPermissions symbol required by pdfium-render 0.9.4. Apply a pinned source patch that adds the compatibility entry point, and rebuild the CI artifact.
2026-10-28 22:43:28 +08:00
springmin d1437f211d pdfium: surface load errors and bundle the C++ runtime
Report the underlying pdfium-render load error instead of discarding it. Component PDFium builds require libc++_shared.so; stage the matching SDK runtime beside libpdfium.so because the OHOS app namespace does not search /system/lib64 for it.
2026-10-28 22:43:28 +08:00
springmin dfcc2d780f ci: package PDFium component-build libraries
The OHOS port's default GN configuration is a component build and emits libpdfium.cr.so plus sibling .cr.so dependencies. Stage all component libraries beside a stable libpdfium.so and upload/checksum the complete set.
2026-10-28 22:43:28 +08:00
springmin 180f61084c ohos: add a pinned PDFium source-build path
Add build-pdfium-source.sh for the OHOS PDFium port at a pinned source revision, using the local SDK through the port's ohos_sdk/18 path and staging a stripped libpdfium.so plus its license. Keep the checksum-pinned prebuilt as an offline fallback and package the source license when present.
2026-10-28 22:43:28 +08:00
springmin 178b37a176 ohos: honour the build profile and keep demo off the mail bundle
Pass the selected PROFILE to hvigor instead of always building debug. Default APP=demo to com.flectar.demo so it can coexist with the signed mail app; BUNDLE still overrides both.
2026-10-27 09:16:48 +08:00
Tomás Romero 2818b7d4e0 ohos: use the Android version code sequence 2026-10-24 23:14:29 +02:00
springmin 0784cf06d3 ohos: request the pasteboard ACL permission for paste
Reading the system pasteboard requires ohos.permission.READ_PASTEBOARD
(system_basic, user_grant). Declare it with a localized reason, resolve the
reasonId while packing the hap (the packing tool normally does this), and let
the page ask for the permission when a paste is denied; a toast explains the
denial.

The hap now only installs with an ACL-enabled signing profile that lists the
permission; the README documents the requirement.
2026-10-23 08:42:43 +08:00
springmin 81d76c3427 ohos: derive the hap version from the workspace crate
versionName is the root Cargo.toml version and versionCode is derived from
it (major*10^7 + minor*10^5 + patch*10^3, plus the prerelease number or 999
for a release) so application-market uploads stay monotonic. The values in
AppScope/app.json5 remain only as the fallback for an IDE build that skips
the script.
2026-10-23 08:42:43 +08:00
springmin f163107e29 ohos: default to com.flectar.mail
Use the project's bundle name on OpenHarmony too: the Flatpak app id, the
macOS/iOS bundle identifier and the Android applicationId are all
com.flectar.mail. Document the AGC release-signing environment
(hap-sign-tool with the release certificate and profile) and keep BUNDLE=
for signing material that was issued for another name.
2026-10-23 08:42:43 +08:00
springmin 8861d4b7f2 ohos: add the OpenHarmony platform host
Tier-3 community port (maintainer: springmin), rebased onto the merged
document-provider abstraction (#84) and the opener seam (#80).

- platform/ohos: Slint backend (XComponent window adapter, software renderer
  with the experimental femtovg/wgpu path, input/IME, clipboard, system
  fonts), the NAPI cdylib that builds a PlatformContext (app-private paths,
  DocumentProvider over the ArkTS pickers, Asset Store credential store,
  loopback OAuth broker, external URL opener, notification publisher) and
  calls flectar_mail::run, the demo crate, the ArkTS shell and the build and
  packaging scripts (bundle name configurable, defaults to
  com.flectar.mail_ohos).
- src/platform/ohos.rs: PDFium directory, renderer name, thread priority,
  preview lifecycle, email font directory; OpenHarmony stays under the
  mobile capability alias.
- patches/fontique + crates/fontique: the Fontconfig opt-out as a patch queue
  applied by the platform/ohos workspace, verified from quality.yml.
- .github/workflows/ohos.yml: manually dispatched tier-3 workflow, unsigned by
  default, signing material only from the FLECTAR_OHOS_* secrets.
- src/documents.rs: run_request blocks the calling thread on mobile hosts;
  the picker covers the window, and keeping the presentation thread idle is
  what OpenHarmony needs (verified on device; desktop keeps the runtime
  request for the native dialog).
- The email renderer and the compose editor load platform::email_font_dir()
  and the Han fallback, so CJK mail bodies and composed text render with the
  platform fonts.
- New-mail notifications: a publisher seam fed by CoreEvent::MailNew; the host
  publishes through @kit.NotificationKit.
2026-10-23 08:42:42 +08:00