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