mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
OHOS: Use native API to get most of the information needed for starting servoshell. (#37392)
Uses the native ohos-api crates to get the required information for starting servoshell. This increases the minimum API version requirement to API-14. Testing: Tested on device. --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
This commit is contained in:
parent
7a801f0ef5
commit
099fd10317
6 changed files with 95 additions and 47 deletions
|
@ -293,8 +293,8 @@ 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("5.0") or ohos_api_version < 12:
|
||||
raise RuntimeError("Building servo for OpenHarmony requires SDK version 5.0 (API-12) or newer.")
|
||||
if ohos_sdk_version < parse_version("5.0") or ohos_api_version < 14:
|
||||
raise RuntimeError("Building servo for OpenHarmony requires SDK version 5.0.2 (API-14) or newer.")
|
||||
print(f"Info: The OpenHarmony SDK {ohos_sdk_version} is targeting API-level {ohos_api_version}")
|
||||
except (OSError, json.JSONDecodeError) as e:
|
||||
print(f"Failed to read metadata information from {package_info}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue