• 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/config/python.gni")
15import("//build/ohos/build_var.gni")
16import("//build/ohos_var.gni")
17
18template("ohos_hisysevent_install_info") {
19  assert(defined(invoker.system_install_info_file))
20  assert(defined(invoker.hisysevent_install_info_file))
21
22  forward_variables_from(invoker,
23                         [
24                           "system_install_info_file",
25                           "hisysevent_install_info_file",
26                         ])
27
28  _deps = []
29  if (defined(invoker.deps)) {
30    _deps += invoker.deps
31  }
32
33  action_with_pydeps(target_name) {
34    deps = _deps
35    script = "//build/ohos/hisysevent/hisysevent_process.py"
36    hisysevent_config_file =
37        "${build_configs_path}/parts_info/hisysevent_configs.json"
38    sources = [ system_install_info_file ]
39    outputs = [ hisysevent_install_info_file ]
40    depfile = "$target_gen_dir/$target_name.d"
41    args = [
42      "--parts-config-file",
43      rebase_path(hisysevent_config_file, root_build_dir),
44      "--system-install-info-file",
45      rebase_path(system_install_info_file, root_build_dir),
46      "--config-install-dest-dir",
47      "${system_base_dir}/etc/hiview",
48      "--hisysevent-install-info-file",
49      rebase_path(hisysevent_install_info_file, root_build_dir),
50      "--depfile",
51      rebase_path(depfile, root_build_dir),
52      "--source-root-dir",
53      rebase_path("//"),
54      "--gn-root-build-dir",
55      rebase_path(root_build_dir),
56    ]
57  }
58}
59