/* * Copyright (c) 2019-2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ use commands for package hap or app. CONSTRAINT: 1.When the app depends on a hap, you need to wait the hap has been packaged, It can be controlled according to the return value of the command execution. 2.If the same command appears many times in a command, take the last value that appears. For example: --mode hap --mode app the mode value is app. 3.If there are several parameters in the same command, take the first value. For example: --mode hap app the mode value is hap. 4.Path cannot start with '--', to avoid conflict with the instruction. 5.Command must be lowercase(such as:--mode), and file's suffix is case insensitive, but json's filename must be config.json and index's filename must be resources.index. 6.Absolute paths is recommended. 7.After package a hap, files under resources/ will put into assets/entry/resources/ directory, files under lib/ will be putted into libs/ directory, files under maple-so/ will be putted into maple/ directory, file of resources.index will be putted into assets/entry/ directory. 8.maple so input method have a tentative plan which can support two input methods. If "maple-so-path" is valid, "maple-so-dir" will not be used. The input method of "maple-so-path" will be discarded later. 9.In app package mode, signature and certificate may be resource files later, so parameters are reserved now. HAP USAGE: java -jar hmos_app_packing_tool.jar --mode