1# Copyright (c) 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("//build/ohos/app/app.gni") 16import("//foundation/ability/form_fwk/form_fwk.gni") 17 18config("formrender_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ "include" ] 21 cflags = [] 22 if (target_cpu == "arm") { 23 cflags += [ "-DBINDER_IPC_32BIT" ] 24 } 25} 26 27ohos_hap("formrender_service_hap") { 28 hap_profile = "FormRenderService/entry/src/main/module.json" 29 deps = [ 30 ":FormRender_js_assets", 31 ":FormRender_resources", 32 ] 33 shared_libraries = [ ":formrender_service" ] 34 certificate_profile = "${form_render_service_path}/signature/formrender.p7b" 35 hap_name = "Form_Render_Service" 36 part_name = "form_fwk" 37 subsystem_name = "ability" 38 module_install_dir = "app/com.ohos.formrenderservice" 39} 40 41ohos_js_assets("FormRender_js_assets") { 42 hap_profile = "FormRenderService/entry/src/main/module.json" 43 ets2abc = true 44 source_dir = "FormRenderService/entry/src/main/ets" 45} 46 47ohos_app_scope("FormRender_app_profile") { 48 app_profile = "FormRenderService/AppScope/app.json" 49 sources = [ "FormRenderService/AppScope/resources" ] 50} 51 52ohos_resources("FormRender_resources") { 53 sources = [ "FormRenderService/entry/src/main/resources" ] 54 deps = [ ":FormRender_app_profile" ] 55 hap_profile = "FormRenderService/entry/src/main/module.json" 56} 57 58ohos_shared_library("formrender") { 59 install_enable = true 60 61 configs = [ ":formrender_config" ] 62 63 sources = [ 64 "src/form_memmgr_client.cpp", 65 "src/form_memory_guard.cpp", 66 "src/form_module_checker.cpp", 67 "src/form_render_event_report.cpp", 68 "src/form_render_record.cpp", 69 "src/form_render_serial_queue.cpp", 70 ] 71 72 defines = [ 73 "FMS_LOG_TAG = \"FormRenderService\"", 74 "FMS_LOG_DOMAIN = 0xD001371", 75 ] 76 77 if (use_musl) { 78 if (musl_use_jemalloc && musl_use_jemalloc_dfx_intf) { 79 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 80 } 81 } 82 83 deps = [ "${form_fwk_path}:form_manager" ] 84 85 external_deps = [ 86 "ability_base:configuration", 87 "ability_base:extractortool", 88 "ability_base:want", 89 "ability_runtime:ability_connect_callback_stub", 90 "ability_runtime:ability_manager", 91 "ability_runtime:abilitykit_native", 92 "ability_runtime:app_context", 93 "ability_runtime:extensionkit_native", 94 "ability_runtime:runtime", 95 "ability_runtime:service_extension", 96 "ace_engine:ace_form_render", 97 "bundle_framework:appexecfwk_base", 98 "bundle_framework:appexecfwk_core", 99 "c_utils:utils", 100 "common_event_service:cesfwk_innerkits", 101 "config_policy:configpolicy_util", 102 "ets_runtime:libark_jsruntime", 103 "eventhandler:libeventhandler", 104 "faultloggerd:libbacktrace_local", 105 "faultloggerd:libdfx_dumpcatcher", 106 "ffrt:libffrt", 107 "hicollie:libhicollie", 108 "hilog:libhilog", 109 "hisysevent:libhisysevent", 110 "hitrace:hitrace_meter", 111 "ipc:ipc_core", 112 "napi:ace_napi", 113 "samgr:samgr_proxy", 114 ] 115 116 subsystem_name = "ability" 117 part_name = "form_fwk" 118} 119 120ohos_shared_library("formrender_service") { 121 install_enable = true 122 123 configs = [ ":formrender_config" ] 124 125 sources = [ 126 "src/form_render_impl.cpp", 127 "src/form_render_service_extension.cpp", 128 ] 129 130 defines = [ "FMS_LOG_TAG = \"FormRenderService\"" ] 131 132 if (use_musl) { 133 if (musl_use_jemalloc && musl_use_jemalloc_dfx_intf) { 134 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 135 } 136 } 137 138 deps = [ 139 ":formrender", 140 "${form_fwk_path}:form_manager", 141 ] 142 143 external_deps = [ 144 "ability_base:configuration", 145 "ability_base:want", 146 "ability_runtime:ability_manager", 147 "ability_runtime:abilitykit_native", 148 "ability_runtime:app_context", 149 "ability_runtime:runtime", 150 "ability_runtime:service_extension", 151 "ace_engine:ace_form_render", 152 "c_utils:utils", 153 "common_event_service:cesfwk_innerkits", 154 "ets_runtime:libark_jsruntime", 155 "eventhandler:libeventhandler", 156 "ffrt:libffrt", 157 "hilog:libhilog", 158 "hitrace:hitrace_meter", 159 "ipc:ipc_core", 160 "napi:ace_napi", 161 ] 162 163 defines = [] 164 if (form_runtime_power) { 165 defines = [ "SUPPORT_POWER" ] 166 external_deps += [ "power_manager:powermgr_client" ] 167 } 168 169 subsystem_name = "ability" 170 part_name = "form_fwk" 171} 172