|
20 | 20 |
|
21 | 21 |
|
22 | 22 | def parse_args(): |
23 | | - parse = ArgumentParser(description='一个MC启动器 {}'.format(LAUNCHER_VERSION), usage='%(prog)s [optional]',epilog='https://github.com/calllivecn/MCLauncher') |
| 23 | + parse = ArgumentParser( |
| 24 | + description=f"一个MC启动器 {LAUNCHER_VERSION}", |
| 25 | + usage='%(prog)s [optional]', |
| 26 | + epilog='https://github.com/calllivecn/MCLauncher' |
| 27 | + ) |
24 | 28 |
|
25 | 29 | parse.add_argument("--install-game", action="store_true", help="安装游戏") |
26 | 30 |
|
27 | | - parse.add_argument("--check-game", action="store_true", help="检查游戏资源完整性") |
| 31 | + parse.add_argument("--check-game", action="store_true", help="检查游戏资源完整性, 缺少的会下载。") |
28 | 32 |
|
29 | 33 | parse.add_argument("--export-game", action="store", help="导出指定游戏版本到新目录") |
30 | 34 |
|
31 | | - parse.add_argument("-u", "--username", action="store", help="MC 游戏用户名") |
| 35 | + parse.add_argument("-u", "--username", action="store", help="MC 游戏用户名。和--online一起使用是切换微软账号。") |
32 | 36 |
|
33 | | - parse.add_argument("--online", action="store_true", help="使用微软账号登录") |
| 37 | + parse.add_argument("--online", action="store_true", help="使用微软账号登录。单独使用时,是添加一个新的微软账号。") |
34 | 38 |
|
35 | | - parse.add_argument("--select-version", action="store_true", help="选择游戏版本。(默认启动本地最新版)") |
| 39 | + parse.add_argument("--select-version", action="store_true", help="交互选择游戏版本。") |
36 | 40 |
|
37 | | - parse.add_argument("--resolution", action="store", help="设置游戏初始窗口大小, 例如:1920x1080(默认自动)") |
| 41 | + parse.add_argument("--resolution", action="store", help="设置游戏启动时窗口大小, 例如:1920x1080(默认自动)") |
38 | 42 |
|
39 | | - parse.add_argument("--java-path", action="store", help="指定 java 路径") |
| 43 | + parse.add_argument("--java-path", action="store", help="指定java路径") |
40 | 44 |
|
41 | | - parse.add_argument("--jvm-args", action="store", help="设置 jvm 参数") |
| 45 | + parse.add_argument("--jvm-args", action="store", help="设置jvm自定义参数") |
42 | 46 |
|
43 | 47 | parse.add_argument("-v", "--verbose", action="count", default=0, help="verbose") |
44 | 48 |
|
@@ -92,12 +96,10 @@ def main(): |
92 | 96 | # 更新游戏版本 |
93 | 97 | if args.select_version: |
94 | 98 | # 选择游戏版本 |
95 | | - # usercfg.currentversion = select_local(mds.versions, latest=False) |
96 | 99 | usercfg.currentversion = select_local(mds.versions) |
97 | 100 |
|
98 | 101 | elif usercfg.currentversion is None: |
99 | 102 | logger.debug(f"currentversion is None ... --> {usercfg.currentversion}") |
100 | | - # usercfg.currentversion = select_local(mds.versions, latest=False) |
101 | 103 | usercfg.currentversion = select_local(mds.versions) |
102 | 104 |
|
103 | 105 | # else: |
|
0 commit comments