1# Copyright (c) 2021 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/graphic/graphic_2d/graphic_config.gni") 16 17## Build bootanimation {{{ 18config("bootanimation_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 "include", 23 "$graphic_2d_root/utils/log", 24 "${graphic_2d_root}/rosen/modules/render_service_client", 25 "//third_party/cJSON", 26 "//foundation/multimedia/player_framework/interfaces/inner_api/native", 27 ] 28 29 cflags = [ 30 "-Wall", 31 "-Werror", 32 "-g3", 33 ] 34 35 defines = [] 36 defines += gpu_defines 37} 38 39ohos_executable("bootanimation") { 40 install_enable = true 41 42 sources = [ 43 "src/boot_animation.cpp", 44 "src/boot_animationconfig.cpp", 45 "src/boot_videoplayer.cpp", 46 "src/main.cpp", 47 "src/util.cpp", 48 ] 49 50 configs = [ 51 ":bootanimation_config", 52 "//commonlibrary/c_utils/base:utils_config", 53 ] 54 55 deps = [ 56 "$graphic_2d_root:libsurface", 57 "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics", 58 "$graphic_2d_root/rosen/modules/render_service_base/src/platform:platform", 59 "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client", 60 "//third_party/cJSON:cjson_static", 61 "//third_party/zlib:libz", 62 ] 63 64 if (defined(use_new_skia) && use_new_skia) { 65 deps += [ "//third_party/skia:skia_ohos" ] 66 } else { 67 deps += [ "//third_party/flutter/build/skia:ace_skia_ohos" ] 68 } 69 70 if (defined(use_new_render_context) && use_new_render_context) { 71 deps += [ "$graphic_2d_root/rosen/modules/render_service_base/src/render_backend:librender_backend" ] 72 } 73 74 external_deps = [ 75 "config_policy:configpolicy_util", 76 "hilog:libhilog", 77 "hitrace:hitrace_meter", 78 "ipc:ipc_core", 79 "player_framework:media_client", 80 "resource_management:global_resmgr", 81 "samgr:samgr_proxy", 82 "window_manager:libdm", 83 "window_manager:libwm", 84 ] 85 86 if (is_standard_system) { 87 external_deps += [ "init:libbegetutil" ] 88 } else { 89 external_deps += [ "startup:syspara" ] 90 } 91 92 part_name = "graphic_2d" 93 subsystem_name = "graphic" 94} 95 96## Build bootanimation }}} 97 98## Install boot animation resource to /system/etc/graphic/ {{{ 99ohos_prebuilt_etc("bootanimation_pics") { 100 source = "data/bootpic.zip" 101 relative_install_dir = "graphic" 102 part_name = "graphic_2d" 103 subsystem_name = "graphic" 104} 105 106ohos_prebuilt_etc("bootanimation_sounds") { 107 source = "data/bootsound.wav" 108 relative_install_dir = "graphic" 109 part_name = "graphic_2d" 110 subsystem_name = "graphic" 111} 112 113ohos_prebuilt_etc("bootanimation_video") { 114 source = "data/bootvideo.mp4" 115 relative_install_dir = "graphic" 116 part_name = "graphic_2d" 117 subsystem_name = "graphic" 118} 119## Install boot animation resource to /system/etc/graphic/ }}} 120