1# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//foundation/arkui/ace_engine/ace_config.gni") 16 17# build static 18template("ace_ohos_standard_source_set") { 19 forward_variables_from(invoker, "*") 20 21 ohos_source_set(target_name) { 22 subsystem_name = ace_engine_subsystem 23 part_name = ace_engine_part 24 defines += invoker.defines 25 cflags_cc += invoker.cflags_cc 26 27 sources = [ 28 "$ace_root/adapter/ohos/entrance/ace_ability.cpp", 29 "$ace_root/adapter/ohos/entrance/ace_application_info.cpp", 30 "$ace_root/adapter/ohos/entrance/ace_container.cpp", 31 "$ace_root/adapter/ohos/entrance/ace_container_hybrid_impl.cpp", 32 "$ace_root/adapter/ohos/entrance/ace_data_ability.cpp", 33 "$ace_root/adapter/ohos/entrance/ace_extra_input_data.cpp", 34 "$ace_root/adapter/ohos/entrance/ace_form_ability.cpp", 35 "$ace_root/adapter/ohos/entrance/ace_new_pipe_judgement.cpp", 36 "$ace_root/adapter/ohos/entrance/ace_service_ability.cpp", 37 "$ace_root/adapter/ohos/entrance/ace_translate_manager.cpp", 38 "$ace_root/adapter/ohos/entrance/ace_view_ohos.cpp", 39 "$ace_root/adapter/ohos/entrance/aps_monitor_impl.cpp", 40 "$ace_root/adapter/ohos/entrance/capability_registry.cpp", 41 "$ace_root/adapter/ohos/entrance/data_ability_helper_standard.cpp", 42 "$ace_root/adapter/ohos/entrance/dialog_container.cpp", 43 "$ace_root/adapter/ohos/entrance/event_pass_through_subscriber.cpp", 44 "$ace_root/adapter/ohos/entrance/file_asset_provider_impl.cpp", 45 "$ace_root/adapter/ohos/entrance/form_utils_impl.cpp", 46 "$ace_root/adapter/ohos/entrance/global_pipeline_context_manager.cpp", 47 "$ace_root/adapter/ohos/entrance/hap_asset_provider_impl.cpp", 48 "$ace_root/adapter/ohos/entrance/high_contrast_observer.cpp", 49 "$ace_root/adapter/ohos/entrance/mmi_event_convertor.cpp", 50 "$ace_root/adapter/ohos/entrance/navigation_controller_helper.cpp", 51 "$ace_root/adapter/ohos/entrance/pa_container.cpp", 52 "$ace_root/adapter/ohos/entrance/plugin_utils_impl.cpp", 53 "$ace_root/adapter/ohos/entrance/reporter_impl.cpp", 54 "$ace_root/adapter/ohos/entrance/rs_adapter.cpp", 55 "$ace_root/adapter/ohos/entrance/subwindow/subwindow_ohos.cpp", 56 "$ace_root/adapter/ohos/entrance/touch_event_convertor.cpp", 57 "$ace_root/adapter/ohos/entrance/window/foldable_window_ohos.cpp", 58 "$ace_root/adapter/ohos/entrance/window_free_container.cpp", 59 60 # innerkits impl 61 "$ace_root/adapter/ohos/entrance/ui_content_impl.cpp", 62 "$ace_root/adapter/ohos/entrance/ui_event_impl.cpp", 63 "$ace_root/adapter/ohos/entrance/utils.cpp", 64 65 # drag window 66 "$ace_root/adapter/ohos/entrance/window/drag_window_ohos.cpp", 67 68 # ArkTs Card 69 "$ace_root/adapter/ohos/entrance/form_module_preloader.cpp", 70 71 # Dynamic Component 72 "$ace_root/adapter/ohos/entrance/dynamic_component/dynamic_component_renderer_impl.cpp", 73 "$ace_root/adapter/ohos/entrance/dynamic_component/uv_task_wrapper_impl.cpp", 74 75 #Miscdevice Vibrator 76 "$ace_root/adapter/ohos/entrance/vibrator/vibrator_utils.cpp", 77 78 # CJUtils 79 "$ace_root/adapter/ohos/entrance/cj_utils/cj_utils.cpp", 80 81 # AudioHaptic 82 "$ace_root/adapter/ohos/entrance/picker/picker_haptic_factory.cpp", 83 ] 84 85 if (enable_audio_framework && enable_player_framework) { 86 sources += [ 87 "$ace_root/adapter/ohos/entrance/picker/picker_haptic_controller.cpp", 88 "$ace_root/adapter/ohos/entrance/picker/picker_haptic_impl.cpp", 89 ] 90 } 91 92 if (target_cpu == "arm64") { 93 defines += [ "_ARM64_" ] 94 } 95 if (current_os == "ohos" && current_cpu == "x86_64") { 96 defines += [ "SIMULATOR_64" ] 97 } 98 99 configs = [ "$ace_root:ace_config" ] 100 101 include_dirs = [ 102 "$ace_root/interfaces/inner_api/ui_session", 103 "$ace_root", 104 ] 105 106 deps = [ 107 "$ace_root/adapter/ohos/capability:ace_capability_ohos", 108 "$ace_root/interfaces/inner_api/ace:ace_uicontent", 109 "$ace_root/interfaces/inner_api/ui_session:ui_session", 110 ] 111 112 external_deps = [ 113 "ability_base:base", 114 "ability_base:configuration", 115 "ability_base:extractortool", 116 "ability_base:view_data", 117 "ability_base:string_utils", 118 "ability_base:want", 119 "ability_runtime:ability_connect_callback_stub", 120 "ability_runtime:ability_context_native", 121 "ability_runtime:ability_manager", 122 "ability_runtime:abilitykit_native", 123 "ability_runtime:app_context", 124 "ability_runtime:auto_fill_manager", 125 "ability_runtime:data_ability_helper", 126 "ability_runtime:napi_common", 127 "ability_runtime:ui_extension", 128 "bundle_framework:appexecfwk_core", 129 "common_event_service:cesfwk_innerkits", 130 "data_share:datashare_consumer", 131 "ets_runtime:libark_jsruntime", 132 "eventhandler:libeventhandler", 133 "graphic_2d:2d_graphics", 134 "graphic_2d:librender_service_client", 135 "graphic_2d:rosen_text", 136 "i18n:intl_util", 137 "input:libmmi-client", 138 "ipc:ipc_core", 139 "ipc:ipc_napi", 140 "miscdevice:vibrator_interface_native", 141 "napi:ace_napi", 142 "preferences:native_preferences", 143 "relational_store:native_dataability", 144 "relational_store:native_rdb", 145 "resource_management:global_resmgr", 146 "runtime_core:ani", 147 "safwk:system_ability_fwk", 148 "samgr:samgr_proxy", 149 "window_manager:libdm", 150 "window_manager:libwm", 151 "window_manager:libwsutils", 152 "window_manager:scene_session", 153 "window_manager:screen_session_manager_client", 154 "zlib:shared_libz", 155 ] 156 defines += [ "INDEXER_SUPPORT_VIBRATOR" ] 157 if (defined(config.enable_rosen_backend) && config.enable_rosen_backend) { 158 external_deps += [ "graphic_2d:librender_service_base" ] 159 } 160 161 if (defined(global_parts_info) && 162 defined(global_parts_info.resourceschedule_resource_schedule_service)) { 163 external_deps += [ "resource_schedule_service:ressched_client" ] 164 defines += [ "RESOURCE_SCHEDULE_SERVICE_ENABLE" ] 165 } 166 167 if (form_fwk_enable) { 168 external_deps += [ 169 "form_fwk:fmskit_native", 170 "form_fwk:fmskit_provider_client", 171 "form_fwk:form_manager", 172 ] 173 } 174 175 if (defined(config.media_library_exists) && config.media_library_exists) { 176 external_deps += [ "media_library:media_library_manager" ] 177 } 178 179 if (enable_audio_framework) { 180 external_deps += [ "audio_framework:audio_client" ] 181 } 182 183 if (enable_player_framework) { 184 external_deps += [ "player_framework:audio_haptic" ] 185 } 186 187 if (os_account_exists) { 188 external_deps += [ "os_account:os_account_innerkits" ] 189 } 190 191 if (defined(config.accessibility_support) && config.accessibility_support) { 192 external_deps += [ "accessibility:accessibilityconfig" ] 193 } 194 195 deps += 196 [ "$ace_root/interfaces/inner_api/ui_service_manager:ui_service_mgr" ] 197 } 198} 199 200foreach(item, ace_platforms) { 201 platform = item.name 202 if (platform == "ohos" || platform == "ohos_ng") { 203 ace_ohos_standard_source_set("ace_ohos_standard_entrance_${platform}") { 204 defines = [] 205 cflags_cc = [] 206 config = { 207 } 208 209 if (defined(item.config)) { 210 config = item.config 211 } 212 213 if (defined(config.defines)) { 214 defines = config.defines 215 } 216 217 if (defined(config.cflags_cc)) { 218 cflags_cc = config.cflags_cc 219 } 220 } 221 } 222} 223