diff options
author | Jonathan Schwender <55576758+jschwe@users.noreply.github.com> | 2024-11-15 16:04:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 15:04:48 +0000 |
commit | 538ac61a82ebd4f6bd02062c23c654cf83fb18ec (patch) | |
tree | 9a564a95711114324fb1650e60aac622a1d85383 /python/servo/platform/build_target.py | |
parent | c64d5e9d30c48f59e61439947c63a2b97a45512f (diff) | |
download | servo-538ac61a82ebd4f6bd02062c23c654cf83fb18ec.tar.gz servo-538ac61a82ebd4f6bd02062c23c654cf83fb18ec.zip |
ohos: Add basic IME and keyboard support (#34188)
* ohos: Add basic IME and keyboard support
- Add extremely basic support for keyboard events
- Add basic IME support
- Showing and hiding the IME
- inserting text
- deleting characters
- very basic configuration of the IME
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Apply suggestions from code review
Improve the log message
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
* Update ports/servoshell/egl/ohos.rs
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
* ohos: Bump the minimum required SDK version to 5.0
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Remove pub from callbacks
The callbacks don't need to be public, as we will be registering them.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Rename composition event
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: clippy in log
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: address some clippy warnings
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Raise Error in mach if unsupported SDK version is used.
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Add keyboard-types dependency for android
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
---------
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
Diffstat (limited to 'python/servo/platform/build_target.py')
-rw-r--r-- | python/servo/platform/build_target.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/python/servo/platform/build_target.py b/python/servo/platform/build_target.py index 701ed5f7ce4..cdf7755df27 100644 --- a/python/servo/platform/build_target.py +++ b/python/servo/platform/build_target.py @@ -275,16 +275,10 @@ class OpenHarmonyTarget(CrossBuildTarget): meta = json.load(meta_file) ohos_api_version = int(meta['apiVersion']) ohos_sdk_version = parse_version(meta['version']) - if ohos_sdk_version < parse_version('4.0'): - print("Warning: mach build currently assumes at least the OpenHarmony 4.0 SDK is used.") + if ohos_sdk_version < parse_version('5.0') or ohos_api_version < 12: + raise RuntimeError("Building servo for OpenHarmony requires SDK version 5.0 (API-12) or newer.") print(f"Info: The OpenHarmony SDK {ohos_sdk_version} is targeting API-level {ohos_api_version}") - os_type = platform.system().lower() - if os_type == "windows" and ohos_sdk_version < parse_version('5.0'): - # The OpenHarmony SDK for Windows hosts currently before OH 5.0 did not contain a - # libclang shared library, which is required by `bindgen`. - raise Exception("Building servo for OpenHarmony on windows requires SDK version 5.0 or newer.") - - except Exception as e: + except (OSError, json.JSONDecodeError) as e: print(f"Failed to read metadata information from {package_info}") print(f"Exception: {e}") |