1# Copyright (c) 2021-2024 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/templates/abc/ohos_abc.gni") 16import("//foundation/arkui/ace_engine/ace_config.gni") 17import("//foundation/arkui/ace_engine/build/ace_ext.gni") 18import("//foundation/arkui/ace_engine/build/ace_gen_obj.gni") 19import( 20 "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/state_mgmt/files_to_watch.gni") 21 22# declarative frontend source 23template("declarative_frontend") { 24 forward_variables_from(invoker, "*") 25 platform = invoker.platform 26 27 ohos_source_set(target_name) { 28 subsystem_name = ace_engine_subsystem 29 part_name = ace_engine_part 30 defines += invoker.defines 31 defines += [ "USE_ARK_ENGINE" ] 32 configs = [ "$ace_root:ace_config" ] 33 34 include_dirs = [ 35 "$ace_napi_frameworks/bridge/declarative_frontend/engine/jsi", 36 "$ace_root", 37 ] 38 if (platform == "ohos_ng" || is_arkui_x) { 39 sources = [ 40 "ng/declarative_frontend_ng.cpp", 41 "ng/frontend_delegate_declarative_ng.cpp", 42 "ng/page_router_manager.cpp", 43 "ng/page_router_manager_static.cpp", 44 ] 45 } else { 46 sources = [ 47 "declarative_frontend.cpp", 48 "frontend_delegate_declarative.cpp", 49 "ng/page_router_manager.cpp", 50 "ng/page_router_manager_static.cpp", 51 ] 52 } 53 54 if (ace_engine_feature_enable_split_mode && 55 defined(vendor_configs.ace_engine_advanced_split_mode_dirs)) { 56 include_dirs += vendor_configs.ace_engine_advanced_split_mode_dirs 57 } 58 59 if (ace_engine_feature_enable_split_mode && 60 defined(vendor_configs.ace_engine_advanced_split_mode_bridge)) { 61 sources += vendor_configs.ace_engine_advanced_split_mode_bridge 62 } else { 63 sources += [ "ng/page_router_manager_factory.cpp" ] 64 } 65 66 deps = [ "$ace_root/frameworks/core/components/theme:build_theme_code" ] 67 if (is_arkui_x) { 68 deps += [ 69 "//arkcompiler/ets_runtime:libark_jsruntime_static", 70 "//foundation/arkui/napi:ace_napi", 71 ] 72 } 73 external_deps = [ 74 "ets_runtime:libark_jsruntime", 75 "napi:ace_napi", 76 ] 77 if (use_hilog) { 78 external_deps += [ "hilog:libhilog" ] 79 } 80 } 81} 82 83foreach(item, ace_platforms) { 84 platform = item.name 85 declarative_frontend("declarative_frontend_" + item.name) { 86 defines = [] 87 config = { 88 } 89 90 if (defined(item.config)) { 91 config = item.config 92 } 93 94 if (defined(config.defines)) { 95 defines = config.defines 96 } 97 } 98} 99 100# js resources objects 101base_output_path = get_label_info(":gen_js_proxyclass", "target_out_dir") 102jsproxyclass_obj_path = base_output_path + "/js_proxy_class.o" 103jsenumstyle_obj_path = base_output_path + "/js_enum_style.o" 104jsmocksystemplugin_obj_path = base_output_path + "/js_mock_system_plugin.o" 105ark_theme_obj_path = base_output_path + "/arkTheme.o" 106jsuicontext_obj_path = base_output_path + "/jsUIContext.o" 107arkcomponent_obj_path = base_output_path + "/arkComponent.o" 108 109action("run_state_mgmt_build") { 110 script = "state_mgmt/build.py" 111 inputs = state_mgmt_release_files_to_watch 112 outputs = [ "$target_out_dir/stateMgmt.js" ] 113 args = [ 114 # Paths: 1 StateMgmt root folder. 2. Folder to check need of npm install. 3. stateMgmt.js output path. 115 rebase_path("$ace_root/frameworks/bridge/declarative_frontend/state_mgmt"), 116 rebase_path( 117 "$ace_root/frameworks/bridge/declarative_frontend/state_mgmt/node_modules"), 118 rebase_path("$target_out_dir"), 119 "--release", 120 ] 121} 122 123gen_obj("js_proxyclass") { 124 input = "$target_out_dir/stateMgmt.js" 125 if (use_mac || use_mingw_win || use_linux || target_os == "ios") { 126 jsproxyclass_obj_path = base_output_path + "/js_proxy_class.c" 127 } 128 output = jsproxyclass_obj_path 129 snapshot_dep = [ ":run_state_mgmt_build" ] 130} 131 132gen_obj("js_enum_style") { 133 input = "engine/jsEnumStyle.js" 134 if (use_mac || use_mingw_win || use_linux || target_os == "ios") { 135 jsenumstyle_obj_path = base_output_path + "/js_enum_style.c" 136 } 137 output = jsenumstyle_obj_path 138 snapshot_dep = [] 139} 140 141gen_obj("ark_theme") { 142 input = "engine/arkTheme.js" 143 if (use_mac || use_mingw_win || use_linux || target_os == "ios") { 144 ark_theme_obj_path = base_output_path + "/ark_theme.c" 145 } 146 output = ark_theme_obj_path 147 snapshot_dep = [] 148} 149 150gen_obj("ark_component") { 151 input = "engine/arkComponent.js" 152 if (use_mac || use_mingw_win || use_linux || target_os == "ios") { 153 arkcomponent_obj_path = base_output_path + "/ark_component.c" 154 } 155 output = arkcomponent_obj_path 156 snapshot_dep = [] 157} 158 159if (!is_arkui_x && (use_mac || use_mingw_win || use_linux)) { 160 gen_obj("js_mock_system_plugin") { 161 input = "$root_out_dir/obj/ide/tools/previewer/automock/dist/jsMockSystemPlugin.js" 162 if (use_mac || use_mingw_win || use_linux || target_os == "ios") { 163 jsmocksystemplugin_obj_path = 164 base_output_path + "/js_mock_system_plugin.c" 165 } 166 output = jsmocksystemplugin_obj_path 167 snapshot_dep = [ "//ide/tools/previewer/automock:gen_snapshot_jsmock" ] 168 } 169} 170 171gen_obj("js_uicontext") { 172 input = "engine/jsUIContext.js" 173 if (use_mac || use_mingw_win || use_linux || target_os == "ios") { 174 jsuicontext_obj_path = base_output_path + "/jsUIContext.c" 175 } 176 output = jsuicontext_obj_path 177 snapshot_dep = [] 178} 179 180# build declarative javascript engine source 181template("declarative_js_engine") { 182 forward_variables_from(invoker, "*") 183 184 ohos_source_set(target_name) { 185 subsystem_name = ace_engine_subsystem 186 part_name = ace_engine_part 187 defines += invoker.defines 188 if (target_cpu == "arm64") { 189 if (!is_mingw) { 190 defines += [ "_ARM64_" ] 191 } 192 } 193 if (current_os == "ohos" && current_cpu == "x86_64") { 194 defines += [ "SIMULATOR_64" ] 195 } 196 197 deps = [ 198 ":ark_modifier", 199 ":ark_theme_control", 200 ":gen_obj_src_ark_component", 201 ":gen_obj_src_ark_theme", 202 ":gen_obj_src_js_enum_style", 203 ":gen_obj_src_js_proxyclass", 204 ":mock", 205 ":prefetcher", 206 ":shape", 207 ":statemanagement", 208 ":x_node", 209 "engine/$engine_path:declarative_js_engine_bridge_${engine_name}_$platform", 210 ] 211 212 if (!is_arkui_x) { 213 deps += [ ":uicontext" ] 214 } else { 215 deps += [ ":gen_obj_src_js_uicontext" ] 216 } 217 218 configs = [ "$ace_root:ace_config" ] 219 if (ace_engine_feature_enable_point_light) { 220 defines += [ "POINT_LIGHT_ENABLE" ] 221 } 222 223 sources = [ 224 "engine/bindings_implementation.cpp", 225 "engine/declarative_engine_loader.cpp", 226 "engine/functions/js_accessibility_function.cpp", 227 "engine/functions/js_animation_on_finish_function.cpp", 228 "engine/functions/js_animator_function.cpp", 229 "engine/functions/js_cited_event_function.cpp", 230 "engine/functions/js_click_function.cpp", 231 "engine/functions/js_clipboard_function.cpp", 232 "engine/functions/js_common_event_function.cpp", 233 "engine/functions/js_common_gesture_function.cpp", 234 "engine/functions/js_common_utils.cpp", 235 "engine/functions/js_drag_function.cpp", 236 "engine/functions/js_event_function.cpp", 237 "engine/functions/js_focus_function.cpp", 238 "engine/functions/js_foreach_function.cpp", 239 "engine/functions/js_function.cpp", 240 "engine/functions/js_gesture_function.cpp", 241 "engine/functions/js_gesture_judge_function.cpp", 242 "engine/functions/js_gesture_recognizer.cpp", 243 "engine/functions/js_hover_function.cpp", 244 "engine/functions/js_key_function.cpp", 245 "engine/functions/js_mouse_function.cpp", 246 "engine/functions/js_navigation_function.cpp", 247 "engine/functions/js_on_area_change_function.cpp", 248 "engine/functions/js_on_child_touch_test_function.cpp", 249 "engine/functions/js_on_size_change_function.cpp", 250 "engine/functions/js_page_transition_function.cpp", 251 "engine/functions/js_pan_function.cpp", 252 "engine/functions/js_should_built_in_recognizer_parallel_with_function.cpp", 253 "engine/functions/js_swiper_function.cpp", 254 "engine/functions/js_tabs_function.cpp", 255 "engine/functions/js_touch_function.cpp", 256 "engine/functions/js_touch_intercept_function.cpp", 257 "engine/functions/js_touch_test_done_function.cpp", 258 "engine/functions/js_webview_function.cpp", 259 "engine/functions/js_xcomponent_onload_function.cpp", 260 "engine/js_types.cpp", 261 "interfaces/profiler/js_profiler.cpp", 262 "jsview/action_sheet/js_action_sheet.cpp", 263 "jsview/canvas/js_canvas.cpp", 264 "jsview/canvas/js_canvas_gradient.cpp", 265 "jsview/canvas/js_canvas_image_data.cpp", 266 "jsview/canvas/js_canvas_path.cpp", 267 "jsview/canvas/js_canvas_pattern.cpp", 268 "jsview/canvas/js_canvas_renderer.cpp", 269 "jsview/canvas/js_canvas_util.cpp", 270 "jsview/canvas/js_drawing_rendering_context.cpp", 271 "jsview/canvas/js_matrix2d.cpp", 272 "jsview/canvas/js_offscreen_canvas.cpp", 273 "jsview/canvas/js_offscreen_rendering_context.cpp", 274 "jsview/canvas/js_path2d.cpp", 275 "jsview/canvas/js_render_image.cpp", 276 "jsview/canvas/js_rendering_context.cpp", 277 "jsview/canvas/js_rendering_context_settings.cpp", 278 "jsview/dialog/js_alert_dialog.cpp", 279 "jsview/dialog/js_custom_dialog_controller.cpp", 280 "jsview/js_accessibility.cpp", 281 "jsview/js_animator.cpp", 282 "jsview/js_app_bar_view.cpp", 283 "jsview/js_badge.cpp", 284 "jsview/js_base_node.cpp", 285 "jsview/js_blank.cpp", 286 "jsview/js_button.cpp", 287 "jsview/js_calendar.cpp", 288 "jsview/js_calendar_controller.cpp", 289 "jsview/js_calendar_picker.cpp", 290 "jsview/js_checkbox.cpp", 291 "jsview/js_checkboxgroup.cpp", 292 "jsview/js_circle.cpp", 293 "jsview/js_circle_shape.cpp", 294 "jsview/js_clipboard.cpp", 295 "jsview/js_column.cpp", 296 "jsview/js_column_split.cpp", 297 "jsview/js_common_view.cpp", 298 "jsview/js_container_base.cpp", 299 "jsview/js_container_modal_view.cpp", 300 "jsview/js_container_span.cpp", 301 "jsview/js_content_slot.cpp", 302 "jsview/js_counter.cpp", 303 "jsview/js_data_panel.cpp", 304 "jsview/js_datepicker.cpp", 305 "jsview/js_divider.cpp", 306 "jsview/js_dump_log.cpp", 307 "jsview/js_ellipse.cpp", 308 "jsview/js_ellipse_shape.cpp", 309 "jsview/js_environment.cpp", 310 "jsview/js_flex.cpp", 311 "jsview/js_flex_impl.cpp", 312 "jsview/js_foreach.cpp", 313 "jsview/js_form_link.cpp", 314 "jsview/js_gauge.cpp", 315 "jsview/js_gesture.cpp", 316 "jsview/js_grid.cpp", 317 "jsview/js_grid_col.cpp", 318 "jsview/js_grid_container.cpp", 319 "jsview/js_grid_item.cpp", 320 "jsview/js_grid_row.cpp", 321 "jsview/js_hyperlink.cpp", 322 "jsview/js_if_else.cpp", 323 "jsview/js_image.cpp", 324 "jsview/js_image_animator.cpp", 325 "jsview/js_image_span.cpp", 326 "jsview/js_indexer.cpp", 327 "jsview/js_indicator.cpp", 328 "jsview/js_interactable_view.cpp", 329 "jsview/js_keyboard_avoid.cpp", 330 "jsview/js_layout_manager.cpp", 331 "jsview/js_layoutable_view.cpp", 332 "jsview/js_lazy_foreach.cpp", 333 "jsview/js_lazy_grid.cpp", 334 "jsview/js_line.cpp", 335 "jsview/js_linear_gradient.cpp", 336 "jsview/js_linear_indicator.cpp", 337 "jsview/js_linear_indicator_controller.cpp", 338 "jsview/js_list.cpp", 339 "jsview/js_list_item.cpp", 340 "jsview/js_list_item_group.cpp", 341 "jsview/js_loading_progress.cpp", 342 "jsview/js_local_storage.cpp", 343 "jsview/js_location_button.cpp", 344 "jsview/js_marquee.cpp", 345 "jsview/js_menu.cpp", 346 "jsview/js_menu_item.cpp", 347 "jsview/js_menu_item_group.cpp", 348 "jsview/js_mock.cpp", 349 "jsview/js_nav_path_stack.cpp", 350 "jsview/js_navdestination.cpp", 351 "jsview/js_navdestination_context.cpp", 352 "jsview/js_navdestination_scrollable_processor.cpp", 353 "jsview/js_navigation.cpp", 354 "jsview/js_navigation_stack.cpp", 355 "jsview/js_navigation_utils.cpp", 356 "jsview/js_navigator.cpp", 357 "jsview/js_navrouter.cpp", 358 "jsview/js_node_container.cpp", 359 "jsview/js_page_transition.cpp", 360 "jsview/js_pan_handler.cpp", 361 "jsview/js_particle.cpp", 362 "jsview/js_paste_button.cpp", 363 "jsview/js_path.cpp", 364 "jsview/js_path_shape.cpp", 365 "jsview/js_pattern_lock.cpp", 366 "jsview/js_persistent.cpp", 367 "jsview/js_polygon.cpp", 368 "jsview/js_polyline.cpp", 369 "jsview/js_popups.cpp", 370 "jsview/js_progress.cpp", 371 "jsview/js_radio.cpp", 372 "jsview/js_rect.cpp", 373 "jsview/js_rect_shape.cpp", 374 "jsview/js_recycle_view.cpp", 375 "jsview/js_refresh.cpp", 376 "jsview/js_relative_container.cpp", 377 "jsview/js_repeat.cpp", 378 "jsview/js_repeat_virtual_scroll.cpp", 379 "jsview/js_repeat_virtual_scroll_2.cpp", 380 "jsview/js_richeditor.cpp", 381 "jsview/js_row.cpp", 382 "jsview/js_row_split.cpp", 383 "jsview/js_save_button.cpp", 384 "jsview/js_scope_util.cpp", 385 "jsview/js_scroll.cpp", 386 "jsview/js_scrollable.cpp", 387 "jsview/js_scrollable_base.cpp", 388 "jsview/js_scroller.cpp", 389 "jsview/js_search.cpp", 390 "jsview/js_sec_button_base.cpp", 391 "jsview/js_select.cpp", 392 "jsview/js_shape.cpp", 393 "jsview/js_shape_abstract.cpp", 394 "jsview/js_sheet.cpp", 395 "jsview/js_side_bar.cpp", 396 "jsview/js_slider.cpp", 397 "jsview/js_sliding_panel.cpp", 398 "jsview/js_span.cpp", 399 "jsview/js_stack.cpp", 400 "jsview/js_state_mgmt_profiler.cpp", 401 "jsview/js_stepper.cpp", 402 "jsview/js_stepper_item.cpp", 403 "jsview/js_swiper.cpp", 404 "jsview/js_symbol.cpp", 405 "jsview/js_symbol_span.cpp", 406 "jsview/js_tab_content.cpp", 407 "jsview/js_tabs.cpp", 408 "jsview/js_tabs_controller.cpp", 409 "jsview/js_tabs_feature.cpp", 410 "jsview/js_text.cpp", 411 "jsview/js_text_clock.cpp", 412 "jsview/js_text_editable_controller.cpp", 413 "jsview/js_textarea.cpp", 414 "jsview/js_textfield.cpp", 415 "jsview/js_textinput.cpp", 416 "jsview/js_textpicker.cpp", 417 "jsview/js_texttimer.cpp", 418 "jsview/js_toggle.cpp", 419 "jsview/js_toolbaritem.cpp", 420 "jsview/js_touch_handler.cpp", 421 "jsview/js_utils.cpp", 422 "jsview/js_view.cpp", 423 "jsview/js_view_abstract.cpp", 424 "jsview/js_view_abstract_bridge.cpp", 425 "jsview/js_view_context.cpp", 426 "jsview/js_view_functions.cpp", 427 "jsview/js_view_measure_layout.cpp", 428 "jsview/js_view_stack_processor.cpp", 429 "jsview/js_water_flow.cpp", 430 "jsview/js_water_flow_item.cpp", 431 "jsview/js_water_flow_sections.cpp", 432 "jsview/menu/js_context_menu.cpp", 433 "jsview/scroll_bar/js_scroll_bar.cpp", 434 "jsview/text_menu/js_text_menu.cpp", 435 "sharedata/js_share_data.cpp", 436 "style_string/js_span_object.cpp", 437 "style_string/js_span_string.cpp", 438 "style_string/js_text_layout.cpp", 439 "view_stack_processor.cpp", 440 441 # ark_theme 442 "ark_theme/theme_apply/js_theme.cpp", 443 "ark_theme/theme_apply/js_with_theme.cpp", 444 445 # Models implemenations for classic fw 446 "jsview/models/action_sheet_model_impl.cpp", 447 "jsview/models/alert_dialog_model_impl.cpp", 448 "jsview/models/animator_model_impl.cpp", 449 "jsview/models/badge_model_impl.cpp", 450 "jsview/models/blank_model_impl.cpp", 451 "jsview/models/button_model_impl.cpp", 452 "jsview/models/calendar_controller_model_impl.cpp", 453 "jsview/models/calendar_model_impl.cpp", 454 "jsview/models/canvas/canvas_model_impl.cpp", 455 "jsview/models/canvas/canvas_rendering_context_2d_model_impl.cpp", 456 "jsview/models/canvas/offscreen_canvas_rendering_context_2d_model_impl.cpp", 457 "jsview/models/checkbox_model_impl.cpp", 458 "jsview/models/checkboxgroup_model_impl.cpp", 459 "jsview/models/circle_model_impl.cpp", 460 "jsview/models/column_model_impl.cpp", 461 "jsview/models/common_view_model_impl.cpp", 462 "jsview/models/counter_model_impl.cpp", 463 "jsview/models/custom_dialog_controller_model_impl.cpp", 464 "jsview/models/data_panel_model_impl.cpp", 465 "jsview/models/divider_model_impl.cpp", 466 "jsview/models/ellipse_model_impl.cpp", 467 "jsview/models/flex_model_impl.cpp", 468 "jsview/models/for_each_model_impl.cpp", 469 "jsview/models/gauge_model_impl.cpp", 470 "jsview/models/gesture_model_impl.cpp", 471 "jsview/models/grid_col_model_impl.cpp", 472 "jsview/models/grid_container_model_impl.cpp", 473 "jsview/models/grid_item_model_impl.cpp", 474 "jsview/models/grid_model_impl.cpp", 475 "jsview/models/grid_row_model_impl.cpp", 476 "jsview/models/hyperlink_model_impl.cpp", 477 "jsview/models/if_else_model_impl.cpp", 478 "jsview/models/image_animator_model_impl.cpp", 479 "jsview/models/image_model_impl.cpp", 480 "jsview/models/indexer_model_impl.cpp", 481 "jsview/models/lazy_for_each_model_impl.cpp", 482 "jsview/models/line_model_impl.cpp", 483 "jsview/models/linear_split_model_impl.cpp", 484 "jsview/models/list_item_group_model_impl.cpp", 485 "jsview/models/list_item_model_impl.cpp", 486 "jsview/models/list_model_impl.cpp", 487 "jsview/models/loading_progress_model_impl.cpp", 488 "jsview/models/marquee_model_impl.cpp", 489 "jsview/models/menu_item_model_impl.cpp", 490 "jsview/models/menu_model_impl.cpp", 491 "jsview/models/navigation_model_impl.cpp", 492 "jsview/models/navigator_model_impl.cpp", 493 "jsview/models/page_transition_model_impl.cpp", 494 "jsview/models/path_model_impl.cpp", 495 "jsview/models/patternlock_model_impl.cpp", 496 "jsview/models/picker_model_impl.cpp", 497 "jsview/models/polygon_model_impl.cpp", 498 "jsview/models/progress_model_impl.cpp", 499 "jsview/models/radio_model_impl.cpp", 500 "jsview/models/rect_model_impl.cpp", 501 "jsview/models/refresh_model_impl.cpp", 502 "jsview/models/relative_container_model_impl.cpp", 503 "jsview/models/richeditor_model_impl.cpp", 504 "jsview/models/row_model_impl.cpp", 505 "jsview/models/scroll_bar_model_impl.cpp", 506 "jsview/models/scroll_model_impl.cpp", 507 "jsview/models/search_model_impl.cpp", 508 "jsview/models/select_model_impl.cpp", 509 "jsview/models/shape_abstract_model_impl.cpp", 510 "jsview/models/shape_model_impl.cpp", 511 "jsview/models/side_bar_container_model_impl.cpp", 512 "jsview/models/slider_model_impl.cpp", 513 "jsview/models/sliding_panel_model_impl.cpp", 514 "jsview/models/span_model_impl.cpp", 515 "jsview/models/stack_model_impl.cpp", 516 "jsview/models/stepper_item_model_impl.cpp", 517 "jsview/models/stepper_model_impl.cpp", 518 "jsview/models/swiper_model_impl.cpp", 519 "jsview/models/tab_content_model_impl.cpp", 520 "jsview/models/tabs_model_impl.cpp", 521 "jsview/models/text_clock_model_impl.cpp", 522 "jsview/models/text_field_model_impl.cpp", 523 "jsview/models/text_model_impl.cpp", 524 "jsview/models/text_timer_model_impl.cpp", 525 "jsview/models/textpicker_model_impl.cpp", 526 "jsview/models/timepicker_model_impl.cpp", 527 "jsview/models/toggle_model_impl.cpp", 528 "jsview/models/view_abstract_model_impl.cpp", 529 "jsview/models/view_context_model_impl.cpp", 530 "jsview/models/view_full_update_model_impl.cpp", 531 "jsview/models/view_partial_update_model_impl.cpp", 532 "jsview/models/water_flow_item_model_impl.cpp", 533 "jsview/models/water_flow_model_impl.cpp", 534 ] 535 536 if (!ace_engine_feature_wearable) { 537 sources += [ "jsview/js_folder_stack.cpp" ] 538 } 539 540 if (ace_engine_feature_enable_digital_crown) { 541 sources += [ "engine/functions/js_crown_function.cpp" ] 542 } 543 544 if (qrcodegen_support) { 545 sources += [ 546 "jsview/js_qrcode.cpp", 547 "jsview/models/qrcode_model_impl.cpp", 548 ] 549 } 550 551 external_deps = [ "graphic_2d:drawing_napi_impl" ] 552 if (!build_ohos_sdk) { 553 external_deps += [ "graphic_2d:text_napi_impl" ] 554 } 555 if (use_hilog) { 556 external_deps += [ "hilog:libhilog" ] 557 } 558 if (defined(config.enable_drag_framework) && config.enable_drag_framework && 559 defined(global_parts_info.distributeddatamgr_udmf)) { 560 external_deps += [ 561 "udmf:udmf_client", 562 "udmf:udmf_data_napi", 563 ] 564 } 565 if (is_ohos_standard_system && !build_ohos_sdk) { 566 sources += [ "jsview/js_form_button.cpp" ] 567 } 568 569 # rich components needed by phone and TV. wearable like watch do not need them 570 if (defined(config.rich_components_support) && 571 config.rich_components_support) { 572 sources += [ 573 "jsview/js_camera.cpp", 574 "jsview/js_piece.cpp", 575 "jsview/js_rating.cpp", 576 "jsview/models/rating_model_impl.cpp", 577 ] 578 if (defined(config.video_components_support) && 579 config.video_components_support) { 580 sources += [ 581 "jsview/js_video.cpp", 582 "jsview/js_video_controller.cpp", 583 "jsview/models/video_model_impl.cpp", 584 ] 585 } 586 if (defined(config.video_support_jsstack) && 587 config.video_support_jsstack) { 588 external_deps += [ "hiview:libxpower_event_js" ] 589 } 590 } 591 592 include_dirs = [] 593 if (defined(vendor_configs.ace_engine_advanced)) { 594 include_dirs += vendor_configs.ace_advance_dirs 595 sources += vendor_configs.ace_engine_advanced_jsview 596 } else { 597 sources += [ "jsview/js_cached_image.cpp" ] 598 } 599 600 if (defined(config.xcomponent_components_support) && 601 config.xcomponent_components_support) { 602 sources += [ 603 "jsview/js_xcomponent.cpp", 604 "jsview/js_xcomponent_controller.cpp", 605 "jsview/models/xcomponent_model_impl.cpp", 606 ] 607 } 608 609 if (defined(config.enable_ability_component) && 610 config.enable_ability_component) { 611 sources += [ 612 "jsview/js_ability_component.cpp", 613 "jsview/js_ability_component_controller.cpp", 614 "jsview/models/ability_component_model_impl.cpp", 615 ] 616 617 external_deps += [ 618 "bundle_framework:appexecfwk_base", 619 "input:libmmi-client", 620 "window_manager:scene_session", 621 ] 622 } 623 624 if (defined(config.web_components_support) && 625 config.web_components_support) { 626 if (is_arkui_x) { 627 sources += [ 628 "jsview/js_web.cpp", 629 "jsview/models/web_model_impl.cpp", 630 ] 631 } else { 632 sources += [ 633 "jsview/js_richtext.cpp", 634 "jsview/js_web.cpp", 635 "jsview/js_web_controller.cpp", 636 "jsview/models/richtext_model_impl.cpp", 637 "jsview/models/web_model_impl.cpp", 638 ] 639 } 640 external_deps += [ 641 "webview:libarkweb_utils", 642 ] 643 } 644 645 if (defined(config.form_components_support) && 646 config.form_components_support) { 647 sources += [ 648 "jsview/js_form.cpp", 649 "jsview/js_form_menu_item.cpp", 650 "jsview/models/form_model_impl.cpp", 651 ] 652 } 653 654 if (defined(config.remote_window_support) && config.remote_window_support) { 655 sources += [ 656 "jsview/js_remote_window.cpp", 657 "jsview/models/remote_window_model_impl.cpp", 658 ] 659 } 660 661 if (defined(config.effect_component_support) && 662 config.effect_component_support) { 663 sources += [ 664 "jsview/js_effect_component.cpp", 665 "jsview/models/effect_component_model_impl.cpp", 666 ] 667 } 668 669 if (defined(config.plugin_components_support) && 670 config.plugin_components_support) { 671 sources += [ 672 "jsview/js_plugin.cpp", 673 "jsview/models/plugin_model_impl.cpp", 674 ] 675 } 676 677 if (defined(config.preview_support) && config.preview_support) { 678 sources += [ "jsview/js_previewer_mock.cpp" ] 679 } 680 681 if (defined(config.model_component_support) && 682 config.model_component_support) { 683 sources += [ "jsview/js_sceneview.cpp" ] 684 external_deps += [ "graphic_3d:lib3dWidgetAdapter" ] 685 } 686 687 if (defined(config.use_build_in_js_engine) && 688 config.use_build_in_js_engine) { 689 deps += [ "$ace_root/frameworks/bridge:framework_bridge_$platform" ] 690 defines += [ "BUILT_IN_JS_ENGINE" ] 691 } else { 692 sources += [ 693 "$ace_root/frameworks/bridge/js_frontend/engine/common/js_engine.cpp", 694 ] 695 deps += [ "$ace_root/build:libace_compatible" ] 696 if (defined(config.build_container_scope_lib) && 697 config.build_container_scope_lib) { 698 if (is_arkui_x) { 699 deps += [ "$ace_root/frameworks/core:ace_container_scope_static" ] 700 } else { 701 deps += [ "$ace_root/frameworks/core:ace_container_scope" ] 702 } 703 } 704 } 705 706 # add for cross_platfrom_build temporarily, shall be removed after external_deps is supported 707 if (is_arkui_x) { 708 configs += [ "$ark_ets_path:ark_jsruntime_public_config" ] 709 deps += [ 710 "$ace_graphic/rosen/modules/render_service_base:librender_service_base_static", 711 "$ark_ets_path:libark_jsruntime_static", 712 ] 713 if (defined(config.pixel_map_support) && config.pixel_map_support) { 714 configs += [ "//foundation/multimedia/image_framework/interfaces/innerkits:image_external_config" ] 715 } 716 } else { 717 external_deps += [ 718 "ets_runtime:libark_jsruntime", 719 "graphic_2d:librender_service_client", 720 "napi:ace_napi", 721 ] 722 } 723 724 if (platform == "windows" || platform == "mac" || platform == "linux") { 725 deps += [ ":gen_obj_src_js_mock_system_plugin" ] 726 } else { 727 if (defined(config.plugin_components_support) && 728 config.plugin_components_support) { 729 if (!use_mingw_win && !use_mac && !use_linux) { 730 external_deps += [ 731 "image_framework:image", 732 "image_framework:image_native", 733 ] 734 } 735 } else { 736 external_deps += [ 737 "image_framework:image", 738 "image_framework:image_native", 739 ] 740 } 741 742 if (defined(config.window_scene_support) && config.window_scene_support) { 743 sources += [ 744 "jsview/js_embedded_component.cpp", 745 "jsview/js_security_ui_extension.cpp", 746 "jsview/js_ui_extension.cpp", 747 "jsview/window_scene/js_root_scene.cpp", 748 "jsview/window_scene/js_screen.cpp", 749 "jsview/window_scene/js_window_scene.cpp", 750 ] 751 752 if (defined(config.dynamic_component_support) && 753 config.dynamic_component_support && !build_ohos_sdk) { 754 external_deps += [ "ets_utils:worker" ] 755 sources += [ 756 "jsview/js_dynamic_component.cpp", 757 "jsview/js_isolated_component.cpp", 758 ] 759 } 760 } 761 } 762 } 763} 764 765# build ng declarative javascript engine source 766template("declarative_js_engine_ng") { 767 forward_variables_from(invoker, "*") 768 769 ohos_source_set(target_name) { 770 subsystem_name = ace_engine_subsystem 771 part_name = ace_engine_part 772 defines += invoker.defines 773 if (target_cpu == "arm64") { 774 if (!is_mingw) { 775 defines += [ "_ARM64_" ] 776 } 777 } 778 if (current_os == "ohos" && current_cpu == "x86_64") { 779 defines += [ "SIMULATOR_64" ] 780 } 781 782 deps = [ 783 ":ark_modifier", 784 ":ark_theme_control", 785 ":gen_obj_src_ark_component", 786 ":gen_obj_src_ark_theme", 787 ":gen_obj_src_js_enum_style", 788 ":gen_obj_src_js_proxyclass", 789 ":mock", 790 ":prefetcher", 791 ":shape", 792 ":statemanagement", 793 ":x_node", 794 "engine/$engine_path:declarative_js_engine_bridge_${engine_name}_$platform", 795 ] 796 797 if (!is_arkui_x) { 798 deps += [ ":uicontext" ] 799 } else { 800 deps += [ ":gen_obj_src_js_uicontext" ] 801 } 802 803 configs = [ "$ace_root:ace_config" ] 804 805 sources = [ 806 "engine/bindings_implementation.cpp", 807 "engine/declarative_engine_loader.cpp", 808 "engine/functions/js_accessibility_function.cpp", 809 "engine/functions/js_animation_on_finish_function.cpp", 810 "engine/functions/js_animator_function.cpp", 811 "engine/functions/js_cited_event_function.cpp", 812 "engine/functions/js_click_function.cpp", 813 "engine/functions/js_clipboard_function.cpp", 814 "engine/functions/js_common_event_function.cpp", 815 "engine/functions/js_common_gesture_function.cpp", 816 "engine/functions/js_common_utils.cpp", 817 "engine/functions/js_drag_function.cpp", 818 "engine/functions/js_event_function.cpp", 819 "engine/functions/js_focus_function.cpp", 820 "engine/functions/js_foreach_function.cpp", 821 "engine/functions/js_function.cpp", 822 "engine/functions/js_gesture_function.cpp", 823 "engine/functions/js_gesture_judge_function.cpp", 824 "engine/functions/js_gesture_recognizer.cpp", 825 "engine/functions/js_hover_function.cpp", 826 "engine/functions/js_key_function.cpp", 827 "engine/functions/js_mouse_function.cpp", 828 "engine/functions/js_navigation_function.cpp", 829 "engine/functions/js_on_area_change_function.cpp", 830 "engine/functions/js_on_child_touch_test_function.cpp", 831 "engine/functions/js_on_size_change_function.cpp", 832 "engine/functions/js_page_transition_function.cpp", 833 "engine/functions/js_pan_function.cpp", 834 "engine/functions/js_should_built_in_recognizer_parallel_with_function.cpp", 835 "engine/functions/js_swiper_function.cpp", 836 "engine/functions/js_tabs_function.cpp", 837 "engine/functions/js_touch_function.cpp", 838 "engine/functions/js_touch_intercept_function.cpp", 839 "engine/functions/js_touch_test_done_function.cpp", 840 "engine/functions/js_webview_function.cpp", 841 "engine/functions/js_xcomponent_onload_function.cpp", 842 "engine/js_types.cpp", 843 "jsview/js_dump_log.cpp", 844 "jsview/js_environment.cpp", 845 "jsview/js_local_storage.cpp", 846 "jsview/js_persistent.cpp", 847 "jsview/js_state_mgmt_profiler.cpp", 848 "jsview/js_view_functions.cpp", 849 "jsview/js_view_measure_layout.cpp", 850 "jsview/js_view_stack_processor.cpp", 851 "sharedata/js_share_data.cpp", 852 853 # jsviews 854 "interfaces/profiler/js_profiler.cpp", 855 "jsview/action_sheet/js_action_sheet.cpp", 856 "jsview/canvas/js_canvas.cpp", 857 "jsview/canvas/js_canvas_gradient.cpp", 858 "jsview/canvas/js_canvas_image_data.cpp", 859 "jsview/canvas/js_canvas_path.cpp", 860 "jsview/canvas/js_canvas_pattern.cpp", 861 "jsview/canvas/js_canvas_renderer.cpp", 862 "jsview/canvas/js_canvas_util.cpp", 863 "jsview/canvas/js_drawing_rendering_context.cpp", 864 "jsview/canvas/js_matrix2d.cpp", 865 "jsview/canvas/js_offscreen_canvas.cpp", 866 "jsview/canvas/js_offscreen_rendering_context.cpp", 867 "jsview/canvas/js_path2d.cpp", 868 "jsview/canvas/js_render_image.cpp", 869 "jsview/canvas/js_rendering_context.cpp", 870 "jsview/canvas/js_rendering_context_settings.cpp", 871 "jsview/dialog/js_alert_dialog.cpp", 872 "jsview/dialog/js_custom_dialog_controller.cpp", 873 "jsview/js_accessibility.cpp", 874 "jsview/js_animator.cpp", 875 "jsview/js_app_bar_view.cpp", 876 "jsview/js_badge.cpp", 877 "jsview/js_base_node.cpp", 878 "jsview/js_blank.cpp", 879 "jsview/js_button.cpp", 880 "jsview/js_calendar.cpp", 881 "jsview/js_calendar_controller.cpp", 882 "jsview/js_calendar_picker.cpp", 883 "jsview/js_checkbox.cpp", 884 "jsview/js_checkboxgroup.cpp", 885 "jsview/js_circle.cpp", 886 "jsview/js_circle_shape.cpp", 887 "jsview/js_clipboard.cpp", 888 "jsview/js_column.cpp", 889 "jsview/js_column_split.cpp", 890 "jsview/js_common_view.cpp", 891 "jsview/js_container_base.cpp", 892 "jsview/js_container_modal_view.cpp", 893 "jsview/js_container_span.cpp", 894 "jsview/js_content_slot.cpp", 895 "jsview/js_counter.cpp", 896 "jsview/js_data_panel.cpp", 897 "jsview/js_datepicker.cpp", 898 "jsview/js_divider.cpp", 899 "jsview/js_ellipse.cpp", 900 "jsview/js_ellipse_shape.cpp", 901 "jsview/js_flex.cpp", 902 "jsview/js_flex_impl.cpp", 903 "jsview/js_foreach.cpp", 904 "jsview/js_form_link.cpp", 905 "jsview/js_gauge.cpp", 906 "jsview/js_gesture.cpp", 907 "jsview/js_grid.cpp", 908 "jsview/js_grid_col.cpp", 909 "jsview/js_grid_container.cpp", 910 "jsview/js_grid_item.cpp", 911 "jsview/js_grid_row.cpp", 912 "jsview/js_hyperlink.cpp", 913 "jsview/js_if_else.cpp", 914 "jsview/js_image.cpp", 915 "jsview/js_image_animator.cpp", 916 "jsview/js_image_span.cpp", 917 "jsview/js_indexer.cpp", 918 "jsview/js_indicator.cpp", 919 "jsview/js_interactable_view.cpp", 920 "jsview/js_keyboard_avoid.cpp", 921 "jsview/js_layout_manager.cpp", 922 "jsview/js_layoutable_view.cpp", 923 "jsview/js_lazy_foreach.cpp", 924 "jsview/js_lazy_grid.cpp", 925 "jsview/js_line.cpp", 926 "jsview/js_linear_gradient.cpp", 927 "jsview/js_linear_indicator.cpp", 928 "jsview/js_linear_indicator_controller.cpp", 929 "jsview/js_list.cpp", 930 "jsview/js_list_item.cpp", 931 "jsview/js_list_item_group.cpp", 932 "jsview/js_loading_progress.cpp", 933 "jsview/js_location_button.cpp", 934 "jsview/js_marquee.cpp", 935 "jsview/js_menu.cpp", 936 "jsview/js_menu_item.cpp", 937 "jsview/js_menu_item_group.cpp", 938 "jsview/js_mock.cpp", 939 "jsview/js_nav_path_stack.cpp", 940 "jsview/js_navdestination.cpp", 941 "jsview/js_navdestination_context.cpp", 942 "jsview/js_navdestination_scrollable_processor.cpp", 943 "jsview/js_navigation.cpp", 944 "jsview/js_navigation_stack.cpp", 945 "jsview/js_navigation_utils.cpp", 946 "jsview/js_navigator.cpp", 947 "jsview/js_navrouter.cpp", 948 "jsview/js_node_container.cpp", 949 "jsview/js_page_transition.cpp", 950 "jsview/js_paste_button.cpp", 951 "jsview/js_path.cpp", 952 "jsview/js_path_shape.cpp", 953 "jsview/js_polygon.cpp", 954 "jsview/js_polyline.cpp", 955 "jsview/js_popups.cpp", 956 "jsview/js_progress.cpp", 957 "jsview/js_radio.cpp", 958 "jsview/js_rating.cpp", 959 "jsview/js_rect.cpp", 960 "jsview/js_rect_shape.cpp", 961 "jsview/js_recycle_view.cpp", 962 "jsview/js_refresh.cpp", 963 "jsview/js_repeat.cpp", 964 "jsview/js_repeat_virtual_scroll.cpp", 965 "jsview/js_repeat_virtual_scroll_2.cpp", 966 "jsview/js_richeditor.cpp", 967 "jsview/js_row.cpp", 968 "jsview/js_row_split.cpp", 969 "jsview/js_save_button.cpp", 970 "jsview/js_scope_util.cpp", 971 "jsview/js_scroll.cpp", 972 "jsview/js_scrollable.cpp", 973 "jsview/js_scrollable_base.cpp", 974 "jsview/js_scroller.cpp", 975 "jsview/js_search.cpp", 976 "jsview/js_sec_button_base.cpp", 977 "jsview/js_select.cpp", 978 "jsview/js_shape.cpp", 979 "jsview/js_shape_abstract.cpp", 980 "jsview/js_side_bar.cpp", 981 "jsview/js_slider.cpp", 982 "jsview/js_sliding_panel.cpp", 983 "jsview/js_span.cpp", 984 "jsview/js_stack.cpp", 985 "jsview/js_stepper.cpp", 986 "jsview/js_stepper_item.cpp", 987 "jsview/js_swiper.cpp", 988 "jsview/js_symbol.cpp", 989 "jsview/js_symbol_span.cpp", 990 "jsview/js_tab_content.cpp", 991 "jsview/js_tabs.cpp", 992 "jsview/js_tabs_controller.cpp", 993 "jsview/js_tabs_feature.cpp", 994 "jsview/js_text.cpp", 995 "jsview/js_text_clock.cpp", 996 "jsview/js_text_editable_controller.cpp", 997 "jsview/js_textarea.cpp", 998 "jsview/js_textfield.cpp", 999 "jsview/js_textinput.cpp", 1000 "jsview/js_textpicker.cpp", 1001 "jsview/js_texttimer.cpp", 1002 "jsview/js_toggle.cpp", 1003 "jsview/js_toolbaritem.cpp", 1004 "jsview/js_utils.cpp", 1005 "jsview/js_view.cpp", 1006 "jsview/js_view_abstract.cpp", 1007 "jsview/js_view_abstract_bridge.cpp", 1008 "jsview/js_view_context.cpp", 1009 "jsview/js_water_flow.cpp", 1010 "jsview/js_water_flow_item.cpp", 1011 "jsview/js_water_flow_sections.cpp", 1012 "jsview/menu/js_context_menu.cpp", 1013 "jsview/scroll_bar/js_scroll_bar.cpp", 1014 "jsview/text_menu/js_text_menu.cpp", 1015 "style_string/js_span_object.cpp", 1016 "style_string/js_span_string.cpp", 1017 "style_string/js_text_layout.cpp", 1018 1019 # ark_theme 1020 "ark_theme/theme_apply/js_theme.cpp", 1021 "ark_theme/theme_apply/js_with_theme.cpp", 1022 ] 1023 1024 if (!ace_engine_feature_wearable) { 1025 sources += [ "jsview/js_folder_stack.cpp" ] 1026 } 1027 1028 if (ace_engine_feature_enable_digital_crown) { 1029 sources += [ "engine/functions/js_crown_function.cpp" ] 1030 } 1031 1032 sources += [ 1033 "$ace_root/frameworks/bridge/js_frontend/engine/common/js_engine.cpp", 1034 ] 1035 1036 external_deps = ["graphic_2d:drawing_napi_impl", "graphic_2d:text_napi_impl"] 1037 if (use_hilog) { 1038 external_deps += [ "hilog:libhilog" ] 1039 } 1040 1041 if (!defined(config.use_components_lib) || !config.use_components_lib) { 1042 sources += [ 1043 "jsview/js_pattern_lock.cpp", 1044 "jsview/js_relative_container.cpp", 1045 ] 1046 if (qrcodegen_support) { 1047 sources += [ "jsview/js_qrcode.cpp" ] 1048 } 1049 } 1050 1051 if (defined(config.video_components_support) && 1052 config.video_components_support) { 1053 sources += [ 1054 "jsview/js_video.cpp", 1055 "jsview/js_video_controller.cpp", 1056 ] 1057 if (defined(config.video_support_jsstack) && 1058 config.video_support_jsstack) { 1059 external_deps += [ "hiview:libxpower_event_js" ] 1060 } 1061 } 1062 1063 if (defined(config.window_scene_support) && config.window_scene_support) { 1064 sources += [ 1065 "jsview/js_embedded_component.cpp", 1066 "jsview/js_security_ui_extension.cpp", 1067 "jsview/js_ui_extension.cpp", 1068 "jsview/window_scene/js_root_scene.cpp", 1069 "jsview/window_scene/js_screen.cpp", 1070 "jsview/window_scene/js_window_scene.cpp", 1071 ] 1072 1073 if (defined(config.dynamic_component_support) && 1074 config.dynamic_component_support && !build_ohos_sdk) { 1075 external_deps += [ "ets_utils:worker" ] 1076 1077 sources += [ 1078 "jsview/js_dynamic_component.cpp", 1079 "jsview/js_isolated_component.cpp", 1080 ] 1081 } 1082 } 1083 if (is_ohos_standard_system && !build_ohos_sdk) { 1084 sources += [ "jsview/js_form_button.cpp" ] 1085 } 1086 if (defined(config.enable_ability_component) && 1087 config.enable_ability_component) { 1088 sources += [ 1089 "jsview/js_ability_component.cpp", 1090 "jsview/js_ability_component_controller.cpp", 1091 ] 1092 1093 external_deps += [ 1094 "bundle_framework:appexecfwk_base", 1095 "input:libmmi-client", 1096 "window_manager:scene_session", 1097 ] 1098 } 1099 1100 if (defined(config.form_components_support) && 1101 config.form_components_support) { 1102 sources += [ "jsview/js_form.cpp" ] 1103 } 1104 1105 if (defined(config.plugin_components_support) && 1106 config.plugin_components_support) { 1107 sources += [ "jsview/js_plugin.cpp" ] 1108 } 1109 1110 if (defined(config.web_components_support) && 1111 config.web_components_support) { 1112 sources += [ 1113 "jsview/js_richtext.cpp", 1114 "jsview/js_web.cpp", 1115 "jsview/js_web_controller.cpp", 1116 ] 1117 external_deps += [ 1118 "webview:libarkweb_utils", 1119 ] 1120 } 1121 1122 if (defined(config.remote_window_support) && config.remote_window_support) { 1123 sources += [ "jsview/js_remote_window.cpp" ] 1124 } 1125 1126 if (!defined(vendor_configs.ace_engine_advanced)) { 1127 sources += [ "jsview/js_cached_image.cpp" ] 1128 } 1129 1130 if (defined(config.xcomponent_components_support) && 1131 config.xcomponent_components_support) { 1132 sources += [ 1133 "jsview/js_xcomponent.cpp", 1134 "jsview/js_xcomponent_controller.cpp", 1135 ] 1136 } 1137 1138 if (defined(config.effect_component_support) && 1139 config.effect_component_support) { 1140 sources += [ 1141 "jsview/js_effect_component.cpp", 1142 #"jsview/models/effect_component_model_impl.cpp", 1143 ] 1144 } 1145 1146 if (defined(config.model_component_support) && 1147 config.model_component_support) { 1148 sources += [ "jsview/js_sceneview.cpp" ] 1149 external_deps += [ "graphic_3d:lib3dWidgetAdapter" ] 1150 } 1151 1152 if (defined(config.use_build_in_js_engine) && 1153 config.use_build_in_js_engine) { 1154 deps += [ "$ace_root/frameworks/bridge:framework_bridge_ng_$platform" ] 1155 defines += [ "BUILT_IN_JS_ENGINE" ] 1156 } else { 1157 if (is_asan) { 1158 deps += [ "$ace_root/build:libace_compatible" ] 1159 } else { 1160 deps += [ "$ace_root/build:libace" ] 1161 } 1162 if (defined(config.build_container_scope_lib) && 1163 config.build_container_scope_lib) { 1164 deps += [ "$ace_root/frameworks/core:ace_container_scope" ] 1165 } 1166 } 1167 1168 # add for cross_platfrom_build temporarily, shall be removed after external_deps is supported 1169 if (is_arkui_x) { 1170 sources -= [ 1171 "interfaces/profiler/js_profiler.cpp", 1172 "jsview/js_location_button.cpp", 1173 "jsview/js_paste_button.cpp", 1174 "jsview/js_save_button.cpp", 1175 "jsview/js_sec_button_base.cpp", 1176 "jsview/text_menu/js_text_menu.cpp", 1177 ] 1178 configs += [ "$ark_ets_path:ark_jsruntime_public_config" ] 1179 deps += [ 1180 "$ace_graphic/rosen/modules/render_service_base:librender_service_base_static", 1181 "$ark_ets_path:libark_jsruntime_static", 1182 "//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi_impl", 1183 ] 1184 if (defined(config.pixel_map_support) && config.pixel_map_support) { 1185 configs += [ "//foundation/multimedia/image_framework/interfaces/innerkits:image_external_config" ] 1186 } 1187 } else { 1188 external_deps += [ 1189 "ets_runtime:libark_jsruntime", 1190 "graphic_2d:librender_service_client", 1191 "napi:ace_napi", 1192 ] 1193 } 1194 1195 if (defined(config.enable_drag_framework) && config.enable_drag_framework && 1196 defined(global_parts_info.distributeddatamgr_udmf)) { 1197 external_deps += [ 1198 "udmf:udmf_client", 1199 "udmf:udmf_data_napi", 1200 ] 1201 } 1202 1203 if (!use_mingw_win && !use_mac && !use_linux) { 1204 external_deps += [ 1205 "image_framework:image", 1206 "image_framework:image_native", 1207 ] 1208 } 1209 } 1210} 1211 1212# dynamic generate js_engine targets 1213foreach(item, ace_platforms) { 1214 platform = item.name 1215 engine_config = { 1216 } 1217 engine_config = item.config 1218 support_engines = [] 1219 support_engines = engine_config.js_engines 1220 foreach(engine, support_engines) { 1221 declarative_js_engine( 1222 "declarative_js_engine_${engine.engine_name}_$platform") { 1223 platform = item.name 1224 engine_name = engine.engine_name 1225 engine_path = engine.engine_path 1226 defines = engine.engine_defines 1227 1228 config = { 1229 } 1230 if (defined(item.config)) { 1231 config = item.config 1232 } 1233 if (defined(config.defines)) { 1234 defines += config.defines 1235 } 1236 } 1237 1238 declarative_js_engine_ng( 1239 "declarative_js_engine_ng_${engine.engine_name}_$platform") { 1240 platform = item.name 1241 engine_name = engine.engine_name 1242 engine_path = engine.engine_path 1243 defines = engine.engine_defines 1244 1245 config = { 1246 } 1247 if (defined(item.config)) { 1248 config = item.config 1249 } 1250 if (defined(config.defines)) { 1251 defines += config.defines 1252 } 1253 } 1254 } 1255} 1256 1257ohos_abc("statemanagement") { 1258 sources = [ "engine/jsStateManagement.js" ] 1259 output_name = "statemanagement" 1260 install_images = [ "system" ] 1261 module_install_dir = "etc/abc/arkui" 1262 subsystem_name = ace_engine_subsystem 1263 part_name = ace_engine_part 1264} 1265 1266ohos_abc("mock") { 1267 sources = [ "engine/jsMock.js" ] 1268 output_name = "mock" 1269 install_images = [ "system" ] 1270 module_install_dir = "etc/abc/arkui" 1271 subsystem_name = ace_engine_subsystem 1272 part_name = ace_engine_part 1273} 1274 1275ohos_abc("x_node") { 1276 sources = [ "engine/jsXNode.js" ] 1277 output_name = "node" 1278 install_images = [ "system" ] 1279 module_install_dir = "etc/abc/arkui" 1280 subsystem_name = ace_engine_subsystem 1281 part_name = ace_engine_part 1282} 1283 1284ohos_abc("prefetcher") { 1285 sources = [ "engine/jsPrefetcher.js" ] 1286 output_name = "prefetcher" 1287 install_images = [ "system" ] 1288 module_install_dir = "etc/abc/arkui" 1289 subsystem_name = ace_engine_subsystem 1290 part_name = ace_engine_part 1291} 1292 1293action("gen_uicontext_ohos") { 1294 script = "$ace_root/build/tools/gen_uicontext_ohos.py" 1295 inputs = [ 1296 "$ace_root/frameworks/bridge/declarative_frontend/engine/jsUIContext.js", 1297 ] 1298 outputs = [ "$base_output_path/jsUIContext_ohos.js" ] 1299 args = [ 1300 rebase_path(inputs[0]), 1301 rebase_path(outputs[0]), 1302 ] 1303} 1304 1305ohos_abc("uicontext") { 1306 sources = [ "$base_output_path/jsUIContext_ohos.js" ] 1307 output_name = "uicontext" 1308 deps = [ ":gen_uicontext_ohos" ] 1309 install_images = [ "system" ] 1310 module_install_dir = "etc/abc/arkui" 1311 subsystem_name = ace_engine_subsystem 1312 part_name = ace_engine_part 1313} 1314 1315ohos_abc("ark_theme_control") { 1316 sources = [ "engine/arkThemeControl.js" ] 1317 output_name = "theme" 1318 install_images = [ "system" ] 1319 module_install_dir = "etc/abc/arkui" 1320 subsystem_name = ace_engine_subsystem 1321 part_name = ace_engine_part 1322} 1323 1324ohos_abc("ark_modifier") { 1325 sources = [ "engine/arkModifier.js" ] 1326 output_name = "modifier" 1327 install_images = [ "system" ] 1328 module_install_dir = "etc/abc/arkui" 1329 subsystem_name = ace_engine_subsystem 1330 part_name = ace_engine_part 1331} 1332 1333ohos_abc("shape") { 1334 sources = [ "engine/jsShape.js" ] 1335 output_name = "shape" 1336 install_images = [ "system" ] 1337 module_install_dir = "etc/abc/arkui" 1338 subsystem_name = ace_engine_subsystem 1339 part_name = ace_engine_part 1340} 1341