• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "${graphic_2d_root}/rosen/modules/render_service/core",
26    "${graphic_2d_root}/rosen/modules/composer/hdi_backend/include",
27    "//third_party/cJSON",
28  ]
29
30  cflags = [
31    "-Wall",
32    "-Werror",
33    "-g3",
34  ]
35
36  defines = []
37  defines += gpu_defines
38  if (player_framework_enable) {
39    defines += [ "PLAYER_FRAMEWORK_ENABLE" ]
40  }
41}
42
43ohos_executable("bootanimation") {
44  install_enable = true
45
46  sources = [
47    "src/boot_animation.cpp",
48    "src/boot_animationconfig.cpp",
49    "src/boot_videoplayer.cpp",
50    "src/main.cpp",
51    "src/util.cpp",
52  ]
53
54  configs = [
55    ":bootanimation_config",
56    "//commonlibrary/c_utils/base:utils_config",
57  ]
58
59  deps = [
60    "$graphic_2d_root:libbootanimation_utils",
61    "$graphic_2d_root:libsurface",
62    "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics",
63    "$graphic_2d_root/rosen/modules/composer:libcomposer",
64    "$graphic_2d_root/rosen/modules/render_service:librender_service",
65    "$graphic_2d_root/rosen/modules/render_service_base/src/platform:platform",
66    "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client",
67    "//third_party/cJSON:cjson_static",
68    "//third_party/zlib:libz",
69  ]
70
71  deps += [ "//third_party/skia:skia_ohos" ]
72
73  if (defined(use_new_render_context) && use_new_render_context) {
74    deps += [ "$graphic_2d_root/rosen/modules/render_service_base/src/render_backend:librender_backend" ]
75  }
76
77  external_deps = [
78    "config_policy:configpolicy_util",
79    "hilog:libhilog",
80    "hitrace:hitrace_meter",
81    "ipc:ipc_core",
82    "resource_management:global_resmgr",
83    "samgr:samgr_proxy",
84  ]
85
86  if (player_framework_enable) {
87    external_deps += [ "player_framework:media_client" ]
88  }
89
90  if (is_standard_system) {
91    external_deps += [ "init:libbegetutil" ]
92  } else {
93    external_deps += [ "startup:syspara" ]
94  }
95
96  part_name = "graphic_2d"
97  subsystem_name = "graphic"
98}
99
100## Build bootanimation }}}
101
102## Install boot animation resource to /system/etc/graphic/ {{{
103ohos_prebuilt_etc("bootanimation_pics") {
104  source = "data/bootpic.zip"
105  relative_install_dir = "graphic"
106  part_name = "graphic_2d"
107  subsystem_name = "graphic"
108}
109
110ohos_prebuilt_etc("bootanimation_sounds") {
111  source = "data/bootsound.wav"
112  relative_install_dir = "graphic"
113  part_name = "graphic_2d"
114  subsystem_name = "graphic"
115}
116
117ohos_prebuilt_etc("bootanimation_video") {
118  source = "data/bootvideo.mp4"
119  relative_install_dir = "graphic"
120  part_name = "graphic_2d"
121  subsystem_name = "graphic"
122}
123
124## Install boot animation resource to /system/etc/graphic/ }}}
125
126## Install boot animation para to /system/etc/param/ {{{
127ohos_prebuilt_etc("bootanimation_para") {
128  source = "etc/bootanimation.para"
129  relative_install_dir = "param"
130  part_name = "graphic_2d"
131  subsystem_name = "graphic"
132}
133## Install boot animation para to /system/etc/param/ }}}
134