| 92 | } |
| 93 | |
| 94 | bool MtouchHelper::push_minitouch() |
| 95 | { |
| 96 | if (!invoke_app_->init()) { |
| 97 | return false; |
| 98 | } |
| 99 | |
| 100 | auto archs = invoke_app_->abilist(); |
| 101 | if (!archs) { |
| 102 | return false; |
| 103 | } |
| 104 | |
| 105 | auto arch_iter = std::ranges::find_first_of(*archs, arch_list_); |
| 106 | if (arch_iter == archs->end()) { |
| 107 | LogError << "no matching arch for minitouch" << VAR(*archs) << VAR(arch_list_); |
| 108 | return false; |
| 109 | } |
| 110 | const std::string& target_arch = *arch_iter; |
| 111 | |
| 112 | const auto bin_path = agent_path_ / path(target_arch) / path("minitouch"); |
| 113 | if (!invoke_app_->push(bin_path)) { |
| 114 | return false; |
| 115 | } |
| 116 | |
| 117 | if (!invoke_app_->chmod()) { |
| 118 | return false; |
| 119 | } |
| 120 | |
| 121 | return true; |
| 122 | } |
| 123 | |
| 124 | void MtouchHelper::remove_binary() |
| 125 | { |