• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package ohos;
17 
18 /**
19  * showhelp class of compress tool.
20  *
21  */
22 public interface ShowHelp {
23     Log log = new Log(ShowHelp.class.toString());
24     /**
25      * content of compress command help menu.
26      */
compressHelp()27     static void compressHelp() {
28         log.info("\nHAP USAGE:\n" +
29                 "java -jar hmos_app_packing_tool.jar --mode <options> --json-path <option>\n" +
30                 "--profile-path [option] --maple-so-path [option] --maple-so-dir [option]\n" +
31                 "--dex-path [option] --lib-path [option] --resources-path [option] --assets-path [option]\n" +
32                 "--shell-apk-path [option] --index-path [option] --out-path <option> --force [option]\n" +
33                 "OPTIONS:\n" +
34                 "  --mode               not null  must be hap.\n" +
35                 "  --json-path                    config.json path.\n" +
36                 "  --profile-path                 CAPABILITY.profile path.\n" +
37                 "  --maple-so-path                maple-so/ path\n" +
38                 "  --maple-so-dir                 maple so path must end with .so,\n" +
39                 "                                 if has more than one so, use comma(,) to separate;\n" +
40                 "  --dex-path                     1.dex path must end with .dex,\n" +
41                 "                                 if has more than one dex, use comma(,) to separate;\n" +
42                 "                                 2.dex path also can be directory path.\n" +
43                 "  --lib-path                     lib/ path.\n" +
44                 "  --bin-path                     bin file path.\n" +
45                 "  --resources-path               resources/ path.\n" +
46                 "  --assets-path                  assets/ path.\n" +
47                 "  --shell-apk-path               1.shell apk path must end with .apk,\n" +
48                 "                                 if has more than one apk, use comma(,) to separate;\n" +
49                 "                                 2.shell apk path also can be directory path.\n" +
50                 "  --index-path                   resources.index path\n" +
51                 "  --out-path           not null  target hap binary path, must end with .hap.\n" +
52                 "  --force                        default false; if true, force delete destination\n" +
53                 "                                 out file if exists.\n" +
54                 "----------------------------------------------------------------------------------\n" +
55                 "HAR USAGE:\n" +
56                 "java -jar hmos_app_packing_tool.jar --mode <options> --json-path <option>\n" +
57                 "--jar-path <option> --lib-path [option] --resources-path [option] --txt-path [option]\n" +
58                 "--assets-path [option] --out-path <option> --force [option]\n" +
59                 "OPTIONS:\n" +
60                 "  --mode               not null  must be har.\n" +
61                 "  --json-path          not null  config.json path.\n" +
62                 "  --jar-path           not null  1.jar path must end with .jar,\n" +
63                 "                                 if has more than one jar, use comma(,) to separate;\n" +
64                 "                                 2.jar path also can be directory path.\n" +
65                 "  --lib-path                     lib/ path.\n" +
66                 "  --resources-path     not null  resources/ path.\n" +
67                 "  --txt-path                     1.txt path must end with .txt,\n" +
68                 "                                 if has more than one txt, use comma(,) to separate;\n" +
69                 "                                 2.txt path also can be directory path.\n" +
70                 "  --assets-path                  assets/ path.\n" +
71                 "  --out-path           not null  target har binary path, must end with .har.\n" +
72                 "  --force                        default false; if true, force delete destination\n" +
73                 "                                 out file if exists.\n" +
74                 "----------------------------------------------------------------------------------\n" +
75                 "APP USAGE:\n" +
76                 "java -jar hmos_app_packing_tool.jar --mode <options> --hap-path <option>\n" +
77                 "--pack-info-path [option] --out-path [option] --signature-path [option]\n" +
78                 "--certificate-path [option]  --force [option]\n" +
79                 "OPTIONS:\n" +
80                 "  --mode               not null  must be app.\n" +
81                 "  --hap-path           not null  1.hap path must end with .hap,\n" +
82                 "                                 if has more than one hap, use comma(,) to separate;\n" +
83                 "                                 2.hap path also can be directory path.\n" +
84                 "  --pack-info-path     not null  pack.info path\n" +
85                 "  --out-path           not null  target app binary path, must end with .app.\n" +
86                 "  --force                        default false; if true, force delete destination\n" +
87                 "                                 out file if exists.\n" +
88                 "  --signature-path               signature file path.\n" +
89                 "  --certificate-path             certificate file path.");
90     }
91 
92     /**
93      * content of uncompress command help menu.
94      */
uncompressHelp()95     static void uncompressHelp() {
96         log.info("\nHAP USAGE:\n" +
97                 "java -jar hmos_app_unpacking_tool.jar --mode <options> --hap-path <option>\n" +
98                 "--out-path [option] --force [option]\n" +
99                 "OPTIONS:\n" +
100                 "  --mode               not null  must be hap.\n" +
101                 "  --hap-path           not null  hap path.\n" +
102                 "  --out-path                     target path of unzip.\n" +
103                 "  --force                        default false; if true, force delete destination\n" +
104                 "                                 out file if exists.\n" +
105                 "  --unpackapk                    default false; if true, unpack apk files from hap\n" +
106                 "                                 in the app.\n" +
107                 "----------------------------------------------------------------------------------\n" +
108                 "HAR USAGE:\n" +
109                 "java -jar hmos_app_unpacking_tool.jar --mode <options> --har-path <option>\n" +
110                 "--out-path [option] --force [option]\n" +
111                 "OPTIONS:\n" +
112                 "  --mode               not null  must be har.\n" +
113                 "  --har-path           not null  har path.\n" +
114                 "  --out-path           not null  target path of unzip.\n" +
115                 "  --force                        default false; if true, force delete destination\n" +
116                 "                                 out file if exists.\n" +
117                 "----------------------------------------------------------------------------------\n" +
118                 "APP USAGE:\n" +
119                 "java -jar hmos_app_unpacking_tool.jar --mode <options> --app-path <option>\n" +
120                 "--out-path [option] --force [option]\n" +
121                 "OPTIONS:\n" +
122                 "  --mode               not null  must be app.\n" +
123                 "  --app-path           not null  app path.\n" +
124                 "  --out-path                     target path of unzip.\n" +
125                 "  --force                        default false; if true, force delete destination\n" +
126                 "                                 out file if exists.\n" +
127                 "  --unpackapk                    default false; if true, unpack apk files from hap\n" +
128                 "                                 in the app.");
129     }
130 }
131