# Copyright (c) 2021-2023 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("//build/ohos.gni") import("//foundation/arkui/ace_engine/ace_config.gni") ohos_source_set("preview_entrance_source") { subsystem_name = ace_engine_subsystem part_name = ace_engine_part if (defined(current_platform.name)) { platform = current_platform.name defines = [] cflags_cc = [] config = { } if (defined(current_platform.config)) { config = current_platform.config } if (defined(config.defines)) { defines += config.defines } if (defined(config.cflags_cc)) { cflags_cc += config.cflags_cc } configs = [ "$ace_root:ace_config" ] # set icu_data_path for ark preview defines += [ "INIT_ICU_DATA_PATH" ] sources = [ "$ace_root/adapter/ohos/entrance/ace_new_pipe_judgement.cpp", "ace_ability.cpp", "ace_application_info.cpp", "ace_container.cpp", "ace_preview_helper.cpp", "ace_resource_register.cpp", "ace_view_preview.cpp", "clipboard/clipboard_impl.cpp", "clipboard/clipboard_proxy_impl.cpp", "clipboard/multiType_record_impl.cpp", "editing/text_input_client_mgr.cpp", "editing/text_input_connection_impl.cpp", "editing/text_input_impl.cpp", "event_dispatcher.cpp", "foldable_window_preview.cpp", "html/html_to_span.cpp", "html/span_to_html.cpp", "msdp/interaction_impl.cpp", "subwindow_preview.cpp", "timepicker/timepicker_haptic_factory.cpp", "touch_event_convertor.cpp", "udmf/udmf_impl.cpp", "ui_content_impl.cpp", "vibrator/vibrator_utils.cpp", "xcollie/xcollieInterface_impl.cpp", ] deps = [ "$ace_napi:ace_napi", "$ace_root/frameworks/core/components/theme:build_theme_code", "$ace_root/interfaces/inner_api/ace:ace_uicontent", ] external_deps = [] include_dirs = [ "//foundation/window/window_manager", "//foundation/ability/ability_runtime", "//arkcompiler/ets_runtime", "//arkcompiler/runtime_core", ] if (defined(config.enable_rosen_backend) && config.enable_rosen_backend) { external_deps += [ "graphic_2d:librender_service_client", "window_manager:previewer_window", ] if (ace_use_rosen_drawing) { external_deps += [ "graphic_2d:2d_graphics" ] } } if (!is_arkui_x) { if (platform == "windows") { defines -= [ "UNICODE" ] deps += [ "//base/global/resource_management/frameworks/resmgr:global_resmgr_win" ] cflags_cc += [ "-DNONLS" ] } if (platform == "mac") { deps += [ "//base/global/resource_management/frameworks/resmgr:global_resmgr_mac" ] } if (platform == "linux") { deps += [ "//base/global/resource_management/frameworks/resmgr:global_resmgr_linux" ] } } } }