15f9996aaSopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 25f9996aaSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 35f9996aaSopenharmony_ci# you may not use this file except in compliance with the License. 45f9996aaSopenharmony_ci# You may obtain a copy of the License at 55f9996aaSopenharmony_ci# 65f9996aaSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 75f9996aaSopenharmony_ci# 85f9996aaSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 95f9996aaSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 105f9996aaSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 115f9996aaSopenharmony_ci# See the License for the specific language governing permissions and 125f9996aaSopenharmony_ci# limitations under the License. 135f9996aaSopenharmony_ci 145f9996aaSopenharmony_ciimport("//build/config/python.gni") 155f9996aaSopenharmony_ciimport("//build/ohos/build_var.gni") 165f9996aaSopenharmony_ciimport("//build/ohos_var.gni") 175f9996aaSopenharmony_ci 185f9996aaSopenharmony_citemplate("ohos_hisysevent_install_info") { 195f9996aaSopenharmony_ci assert(defined(invoker.system_install_info_file)) 205f9996aaSopenharmony_ci assert(defined(invoker.hisysevent_install_info_file)) 215f9996aaSopenharmony_ci 225f9996aaSopenharmony_ci forward_variables_from(invoker, 235f9996aaSopenharmony_ci [ 245f9996aaSopenharmony_ci "system_install_info_file", 255f9996aaSopenharmony_ci "hisysevent_install_info_file", 265f9996aaSopenharmony_ci ]) 275f9996aaSopenharmony_ci 285f9996aaSopenharmony_ci _deps = [] 295f9996aaSopenharmony_ci if (defined(invoker.deps)) { 305f9996aaSopenharmony_ci _deps += invoker.deps 315f9996aaSopenharmony_ci } 325f9996aaSopenharmony_ci 335f9996aaSopenharmony_ci if (is_system_component) { 345f9996aaSopenharmony_ci config_install_dir = "${system_base_dir}/etc/hiview" 355f9996aaSopenharmony_ci } else { 365f9996aaSopenharmony_ci config_install_dir = "${vendor_base_dir}/etc/hiview" 375f9996aaSopenharmony_ci } 385f9996aaSopenharmony_ci 395f9996aaSopenharmony_ci action_with_pydeps(target_name) { 405f9996aaSopenharmony_ci deps = _deps 415f9996aaSopenharmony_ci script = "//build/ohos/hisysevent/hisysevent_process.py" 425f9996aaSopenharmony_ci hisysevent_config_file = 435f9996aaSopenharmony_ci "${build_configs_path}/parts_info/hisysevent_configs.json" 445f9996aaSopenharmony_ci sources = [ system_install_info_file ] 455f9996aaSopenharmony_ci outputs = [ hisysevent_install_info_file ] 465f9996aaSopenharmony_ci depfile = "$target_gen_dir/$target_name.d" 475f9996aaSopenharmony_ci args = [ 485f9996aaSopenharmony_ci "--parts-config-file", 495f9996aaSopenharmony_ci rebase_path(hisysevent_config_file, root_build_dir), 505f9996aaSopenharmony_ci "--system-install-info-file", 515f9996aaSopenharmony_ci rebase_path(system_install_info_file, root_build_dir), 525f9996aaSopenharmony_ci "--config-install-dest-dir", 535f9996aaSopenharmony_ci config_install_dir, 545f9996aaSopenharmony_ci "--hisysevent-install-info-file", 555f9996aaSopenharmony_ci rebase_path(hisysevent_install_info_file, root_build_dir), 565f9996aaSopenharmony_ci "--depfile", 575f9996aaSopenharmony_ci rebase_path(depfile, root_build_dir), 585f9996aaSopenharmony_ci "--source-root-dir", 595f9996aaSopenharmony_ci rebase_path("//"), 605f9996aaSopenharmony_ci "--gn-root-build-dir", 615f9996aaSopenharmony_ci rebase_path(root_build_dir), 625f9996aaSopenharmony_ci ] 635f9996aaSopenharmony_ci } 645f9996aaSopenharmony_ci} 65