• 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}/rosen/modules/render_service_client",
24    "${graphic_2d_root}/utils/log",
25  ]
26
27  cflags = [
28    "-Wall",
29    "-Werror",
30    "-g3",
31    "-fdata-sections",
32    "-ffunction-sections",
33    "-fno-asynchronous-unwind-tables",
34    "-fno-unwind-tables",
35    "-Os",
36  ]
37
38  defines = []
39  defines += gpu_defines
40  if (player_framework_enable) {
41    defines += [ "PLAYER_FRAMEWORK_ENABLE" ]
42  }
43
44  if (graphic_2d_feature_bootanimation_ext_enable == "wearable") {
45    defines += [ "FEATURE_CHECK_EXIT_ANIMATION_EXT" ]
46  }
47
48  if (defined(use_rosen_drawing) && use_rosen_drawing) {
49    defines += [ "USE_ROSEN_DRAWING" ]
50  }
51}
52
53ohos_executable("bootanimation") {
54  install_enable = true
55
56  sources = [
57    "src/boot_animation_controller.cpp",
58    "src/boot_animation_operation.cpp",
59    "src/boot_animation_strategy.cpp",
60    "src/boot_associative_display_strategy.cpp",
61    "src/boot_compatible_display_strategy.cpp",
62    "src/boot_compile_progress.cpp",
63    "src/boot_independent_display_strategy.cpp",
64    "src/boot_picture_player.cpp",
65    "src/boot_sound_player.cpp",
66    "src/boot_video_player.cpp",
67    "src/main.cpp",
68    "src/util.cpp",
69  ]
70
71  configs = [ ":bootanimation_config" ]
72
73  deps = [
74    "$graphic_2d_root:libbootanimation_utils",
75    "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics",
76    "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base",
77    "$graphic_2d_root/rosen/modules/render_service_client:librender_service_client",
78  ]
79
80  public_external_deps = [ "cJSON:cjson" ]
81
82  external_deps = [
83    "cJSON:cjson_static",
84    "c_utils:utils",
85    "config_policy:configpolicy_util",
86    "eventhandler:libeventhandler",
87    "hilog:libhilog",
88    "hitrace:hitrace_meter",
89    "ipc:ipc_core",
90    "samgr:samgr_proxy",
91    "skia:skia_canvaskit",
92    "zlib:libz",
93  ]
94
95  if (player_framework_enable) {
96    external_deps += [ "player_framework:media_client" ]
97  }
98
99  if (is_standard_system) {
100    external_deps += [ "init:libbegetutil" ]
101  } else {
102    external_deps += [ "startup:syspara" ]
103  }
104
105  part_name = "graphic_2d"
106  subsystem_name = "graphic"
107
108  sanitize = {
109    cfi = true
110    cfi_cross_dso = true
111    debug = false
112    cfi_vcall_icall_only = true
113    integer_overflow = true
114    ubsan = true
115    boundary_sanitize = true
116  }
117  branch_protector_ret = "pac_ret"
118}
119
120## Build bootanimation }}}
121
122## Install boot animation resource to /system/etc/graphic/ {{{
123ohos_prebuilt_etc("bootanimation_pics") {
124  source = "data/bootpic.zip"
125  relative_install_dir = "graphic"
126  part_name = "graphic_2d"
127  subsystem_name = "graphic"
128}
129
130ohos_prebuilt_etc("bootanimation_sounds") {
131  source = "data/bootsound.wav"
132  relative_install_dir = "graphic"
133  part_name = "graphic_2d"
134  subsystem_name = "graphic"
135}
136
137ohos_prebuilt_etc("bootanimation_video") {
138  source = "data/bootvideo.mp4"
139  relative_install_dir = "graphic"
140  part_name = "graphic_2d"
141  subsystem_name = "graphic"
142}
143
144## Install boot animation resource to /system/etc/graphic/ }}}
145
146## Install boot animation para to /system/etc/param/ {{{
147ohos_prebuilt_etc("bootanimation_para") {
148  source = "etc/bootanimation.para"
149  relative_install_dir = "param"
150  part_name = "graphic_2d"
151  subsystem_name = "graphic"
152}
153## Install boot animation para to /system/etc/param/ }}}
154
155## Install bootanimation.rc to /system/etc/init/bootanimation.rc {{{
156ohos_prebuilt_etc("bootanimation.rc") {
157  source = "bootanimation.cfg"
158  relative_install_dir = "init"
159  part_name = "graphic_2d"
160  subsystem_name = "graphic"
161}
162
163## Install bootanimation.rc to /system/etc/init/bootanimation.rc }}}
164