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_data_ability.cpp", 32 "$ace_root/adapter/ohos/entrance/ace_extra_input_data.cpp", 33 "$ace_root/adapter/ohos/entrance/ace_form_ability.cpp", 34 "$ace_root/adapter/ohos/entrance/ace_new_pipe_judgement.cpp", 35 "$ace_root/adapter/ohos/entrance/ace_service_ability.cpp", 36 "$ace_root/adapter/ohos/entrance/ace_view_ohos.cpp", 37 "$ace_root/adapter/ohos/entrance/aps_monitor_impl.cpp", 38 "$ace_root/adapter/ohos/entrance/capability_registry.cpp", 39 "$ace_root/adapter/ohos/entrance/data_ability_helper_standard.cpp", 40 "$ace_root/adapter/ohos/entrance/dialog_container.cpp", 41 "$ace_root/adapter/ohos/entrance/event_pass_through_subscriber.cpp", 42 "$ace_root/adapter/ohos/entrance/file_asset_provider_impl.cpp", 43 "$ace_root/adapter/ohos/entrance/form_utils_impl.cpp", 44 "$ace_root/adapter/ohos/entrance/hap_asset_provider_impl.cpp", 45 "$ace_root/adapter/ohos/entrance/mmi_event_convertor.cpp", 46 "$ace_root/adapter/ohos/entrance/navigation_controller_helper.cpp", 47 "$ace_root/adapter/ohos/entrance/pa_container.cpp", 48 "$ace_root/adapter/ohos/entrance/plugin_utils_impl.cpp", 49 "$ace_root/adapter/ohos/entrance/subwindow/subwindow_ohos.cpp", 50 "$ace_root/adapter/ohos/entrance/touch_event_convertor.cpp", 51 "$ace_root/adapter/ohos/entrance/utils.cpp", 52 "$ace_root/adapter/ohos/entrance/window/foldable_window_ohos.cpp", 53 54 # innerkits impl 55 "$ace_root/adapter/ohos/entrance/ui_content_impl.cpp", 56 "$ace_root/adapter/ohos/entrance/ui_event_impl.cpp", 57 58 # drag window 59 "$ace_root/adapter/ohos/entrance/window/drag_window_ohos.cpp", 60 61 # ArkTs Card 62 "$ace_root/adapter/ohos/entrance/form_module_preloader.cpp", 63 64 # Dynamic Component 65 "$ace_root/adapter/ohos/entrance/dynamic_component/dynamic_component_renderer_impl.cpp", 66 "$ace_root/adapter/ohos/entrance/dynamic_component/uv_task_wrapper_impl.cpp", 67 68 # CJUtils 69 "$ace_root/adapter/ohos/entrance/cj_utils/cj_utils.cpp", 70 71 #Miscdevice Vibrator 72 "$ace_root/adapter/ohos/entrance/vibrator/vibrator_utils.cpp", 73 74 # AudioHaptic 75 "$ace_root/adapter/ohos/entrance/timepicker/timepicker_haptic_factory.cpp", 76 ] 77 78 if (enable_audio_framework && enable_player_framework) { 79 sources += [ 80 "$ace_root/adapter/ohos/entrance/timepicker/timepicker_haptic_controller.cpp", 81 "$ace_root/adapter/ohos/entrance/timepicker/timepicker_haptic_impl.cpp", 82 ] 83 } 84 85 if (target_cpu == "arm64") { 86 defines += [ "_ARM64_" ] 87 } 88 if (current_os == "ohos" && current_cpu == "x86_64") { 89 defines += [ "SIMULATOR_64" ] 90 } 91 92 configs = [ "$ace_root:ace_config" ] 93 94 if (defined(config.enable_rosen_backend) && config.enable_rosen_backend) { 95 configs += [ 96 "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:export_config", 97 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:render_service_client_config", 98 ] 99 } 100 101 include_dirs = [ "$ace_root/interfaces/inner_api/ui_session" ] 102 deps = [ 103 "$ace_root/adapter/ohos/capability:ace_capability_ohos", 104 "$ace_root/interfaces/inner_api/ace:ace_uicontent", 105 "$ace_root/interfaces/inner_api/ui_session:ui_session", 106 ] 107 108 external_deps = [ 109 "ability_base:base", 110 "ability_base:configuration", 111 "ability_base:extractortool", 112 "ability_base:view_data", 113 "ability_base:want", 114 "ability_runtime:ability_context_native", 115 "ability_runtime:ability_manager", 116 "ability_runtime:abilitykit_native", 117 "ability_runtime:app_context", 118 "ability_runtime:auto_fill_manager", 119 "ability_runtime:data_ability_helper", 120 "ability_runtime:ui_extension", 121 "bundle_framework:appexecfwk_core", 122 "common_event_service:cesfwk_innerkits", 123 "data_share:datashare_consumer", 124 "ets_runtime:libark_jsruntime", 125 "eventhandler:libeventhandler", 126 "graphic_2d:2d_graphics", 127 "graphic_2d:librender_service_client", 128 "hilog:libhilog", 129 "i18n:intl_util", 130 "input:libmmi-client", 131 "ipc:ipc_core", 132 "ipc:ipc_napi", 133 "miscdevice:vibrator_interface_native", 134 "napi:ace_napi", 135 "preferences:native_preferences", 136 "relational_store:native_dataability", 137 "relational_store:native_rdb", 138 "resource_management:global_resmgr", 139 "safwk:system_ability_fwk", 140 "samgr:samgr_proxy", 141 "window_manager:libdm", 142 "window_manager:libwm", 143 "window_manager:libwsutils", 144 "window_manager:scene_session", 145 "window_manager:screen_session_manager_client", 146 "zlib:shared_libz", 147 ] 148 149 defines += [ "INDEXER_SUPPORT_VIBRATOR" ] 150 if (form_fwk_enable) { 151 external_deps += [ 152 "form_fwk:fmskit_native", 153 "form_fwk:fmskit_provider_client", 154 "form_fwk:form_manager", 155 ] 156 } 157 158 if (defined(config.media_library_exists) && config.media_library_exists) { 159 external_deps += [ "media_library:media_library_manager" ] 160 } 161 162 if (enable_audio_framework) { 163 external_deps += [ "audio_framework:audio_client" ] 164 } 165 166 if (enable_player_framework) { 167 external_deps += [ "player_framework:audio_haptic" ] 168 } 169 170 if (enable_graphic_text_gine) { 171 external_deps += [ "graphic_2d:rosen_text" ] 172 } 173 174 if (os_account_exists) { 175 external_deps += [ "os_account:os_account_innerkits" ] 176 } 177 deps += 178 [ "$ace_root/interfaces/inner_api/ui_service_manager:ui_service_mgr" ] 179 } 180} 181 182foreach(item, ace_platforms) { 183 platform = item.name 184 if (platform == "ohos" || platform == "ohos_ng") { 185 ace_ohos_standard_source_set("ace_ohos_standard_entrance_${platform}") { 186 defines = [] 187 cflags_cc = [] 188 config = { 189 } 190 191 if (defined(item.config)) { 192 config = item.config 193 } 194 195 if (defined(config.defines)) { 196 defines = config.defines 197 } 198 199 if (defined(config.cflags_cc)) { 200 cflags_cc = config.cflags_cc 201 } 202 } 203 } 204} 205