1# Copyright (c) 2021-2022 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/test.gni") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17config("ability_command_config") { 18 include_dirs = [ 19 "include", 20 "${ability_runtime_innerkits_path}/app_manager/include/appmgr", 21 "${ability_runtime_services_path}/abilitymgr/include", 22 "${bundlefwk_inner_api_path}/appexecfwk_base/include", 23 "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", 24 "//third_party/jsoncpp/include", 25 ] 26} 27 28ohos_source_set("tools_aa_source_set") { 29 sources = [ 30 "src/ability_command.cpp", 31 "src/ability_tool_command.cpp", 32 "src/shell_command.cpp", 33 "src/shell_command_config_loader.cpp", 34 "src/shell_command_executor.cpp", 35 "src/shell_command_result.cpp", 36 "src/system_time.cpp", 37 "src/test_observer.cpp", 38 "src/test_observer_proxy.cpp", 39 "src/test_observer_stub.cpp", 40 ] 41 42 public_configs = [ 43 ":ability_command_config", 44 "${ability_runtime_services_path}/abilitymgr:abilityms_config", 45 "${ability_runtime_services_path}/common:common_config", 46 ] 47 48 cflags = [] 49 if (target_cpu == "arm") { 50 cflags += [ "-DBINDER_IPC_32BIT" ] 51 } 52 53 deps = [ 54 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 55 "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting", 56 "${ability_runtime_innerkits_path}/ability_manager:mission_info", 57 "${ability_runtime_innerkits_path}/app_manager:app_manager", 58 ] 59 60 external_deps = [ 61 "ability_base:base", 62 "ability_base:want", 63 "bundle_framework:appexecfwk_base", 64 "bundle_framework:appexecfwk_core", 65 "c_utils:utils", 66 "eventhandler:libeventhandler", 67 "hilog:libhilog", 68 "ipc:ipc_core", 69 "samgr:samgr_proxy", 70 ] 71 72 subsystem_name = "ability" 73 part_name = "ability_runtime" 74} 75 76ohos_executable("aa") { 77 sources = [ "src/main.cpp" ] 78 79 cflags = [] 80 if (target_cpu == "arm") { 81 cflags += [ "-DBINDER_IPC_32BIT" ] 82 } 83 84 deps = [ ":tools_aa_source_set" ] 85 86 external_deps = [ 87 "ability_base:base", 88 "ability_base:configuration", 89 "hilog:libhilog", 90 "ipc:ipc_core", 91 ] 92 93 symlink_target_name = [ "ability_tool" ] 94 95 defines = [] 96 print("accessibility_enable = ", accessibility_enable) 97 if (accessibility_enable) { 98 sources += [ 99 "src/accessibility_ability_command.cpp", 100 "src/accessibility_ability_utils.cpp", 101 ] 102 103 external_deps += [ 104 "access_token:libaccesstoken_sdk", 105 "access_token:libnativetoken", 106 "access_token:libtoken_setproc", 107 "accessibility:accessibility_common", 108 "accessibility:accessibilityclient", 109 "accessibility:accessibilityconfig", 110 ] 111 defines += [ "A11Y_ENABLE" ] 112 symlink_target_name += [ "accessibility" ] 113 } 114 115 install_enable = true 116 117 subsystem_name = "ability" 118 part_name = "ability_runtime" 119} 120 121ohos_prebuilt_etc("shell_command_executor_config.json") { 122 source = "resource/shell_command_executor_config.json" 123 subsystem_name = "ability" 124 part_name = "ability_runtime" 125} 126 127group("tools_aa") { 128 deps = [ 129 ":aa", 130 ":shell_command_executor_config.json", 131 ] 132} 133