mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-22 22:51:05 +00:00
Fixed arkui-x build due to missed adapters
Signed-off-by: Ilya Tihobaev <tihobaev.ilya@huawei-partners.com> Change-Id: Ic83d408ec93ce2a393686c1294fd1ab2e51227a2
This commit is contained in:
parent
eb4e94facb
commit
2bbfd51b92
@ -11,17 +11,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("graphic_config.gni")
|
||||
|
||||
enable_glfw_window = false
|
||||
use_mingw_win = "${current_os}_${current_cpu}" == "mingw_x86_64"
|
||||
ace_root = "//foundation/arkui/ace_engine"
|
||||
graphic_2d_root = "//foundation/graphic/graphic_2d"
|
||||
ace_platforms = []
|
||||
|
||||
_adapters = [
|
||||
"preview",
|
||||
"ohos",
|
||||
]
|
||||
foreach(item, _adapters) {
|
||||
foreach(item, adapters) {
|
||||
import_var = {
|
||||
}
|
||||
import_var = {
|
||||
|
55
copy_arkui_adapters.py
Executable file
55
copy_arkui_adapters.py
Executable file
@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import errno
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
if (len(sys.argv) != 3):
|
||||
sys.stderr.write("MUST have 1 parameter for the source path and 1 parameter for the destination")
|
||||
sys.stderr.write(os.linesep)
|
||||
exit(errno.EINVAL)
|
||||
|
||||
source_dir = os.path.realpath(sys.argv[1])
|
||||
if (not os.path.isdir(source_dir)):
|
||||
print(source_dir)
|
||||
sys.stderr.write("Source path MUST be a directory")
|
||||
sys.stderr.write(os.linesep)
|
||||
exit(errno.EINVAL)
|
||||
|
||||
dest_dir = os.path.realpath(sys.argv[2])
|
||||
if (not os.path.isdir(dest_dir)):
|
||||
sys.stderr.write("Destination path MUST be a directory")
|
||||
sys.stderr.write(os.linesep)
|
||||
exit(errno.EINVAL)
|
||||
|
||||
for item in os.listdir(source_dir):
|
||||
if not os.path.isdir(os.path.join(source_dir, item)):
|
||||
continue
|
||||
|
||||
file_path = os.path.join(source_dir, item, "build", "platform.gni")
|
||||
if not os.path.isfile(file_path):
|
||||
continue
|
||||
|
||||
if not os.path.exists(os.path.join(dest_dir, item, "build")):
|
||||
shutil.copytree(os.path.join(source_dir, item, "build"), os.path.join(dest_dir, item, "build"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -309,6 +309,7 @@ memmgr_plugin_root = "//foundation/resourceschedule/memmgr_override"
|
||||
fuzz_test_output_path = "graphic_2d/graphic_2d"
|
||||
video_processing_engine_root = "//foundation/multimedia/video_processing_engine"
|
||||
arkui_root = "//foundation/arkui"
|
||||
ace_root = "//foundation/arkui/ace_engine"
|
||||
|
||||
accessibility_enable = false
|
||||
if (defined(global_parts_info) &&
|
||||
@ -340,3 +341,12 @@ use_memmgr = false
|
||||
if (defined(global_parts_info.resourceschedule_memmgr)) {
|
||||
use_memmgr = true
|
||||
}
|
||||
|
||||
_ace_adapter_dir = rebase_path("$ace_root/adapter", root_build_dir)
|
||||
_graphic_2d_adapter_dir = rebase_path("$graphic_2d_root/adapter", root_build_dir)
|
||||
|
||||
if (defined(is_arkui_x) && is_arkui_x) {
|
||||
# In case of arkui-x compilation, copy android and ios adapters from ace_engine
|
||||
exec_script("$graphic_2d_root/copy_arkui_adapters.py", [_ace_adapter_dir, _graphic_2d_adapter_dir])
|
||||
}
|
||||
adapters = exec_script("$ace_root/build/search.py", [ _graphic_2d_adapter_dir ], "list lines")
|
||||
|
Loading…
Reference in New Issue
Block a user