chore: 丝滑刷版本号测试

This commit is contained in:
ikun0014
2024-10-11 20:04:42 +08:00
parent eb1501a43a
commit fc03979107
11 changed files with 41 additions and 14 deletions

18
main.py
View File

@@ -1,8 +1,7 @@
import os
import time
import sys
import asyncio
import re
import platform
from colorama import Fore, Back, Style
from colorama import init as cinit
@@ -22,6 +21,20 @@ repos = [
'tymolu233/ManifestAutoUpdate',
]
def check_system_msg():
os_type = platform.system()
try:
if not os_type == 'Windows':
log.error(f'❌ 不用Windows你想上天{os_type}')
except Exception as e:
log.error(f'❌ 获取系统类型失败:{stack_error(e)}')
os_version = sys.getwindowsversion().major
try:
if os_version < 10:
log.error(f'❌ 低于Windows10就别用了买台新电脑吧当前版本Windows {os_version}')
except Exception as e:
log.error(f'❌ 获取系统版本失败:{stack_error(e)}')
def prompt_app_id():
app_id = input(f"{Fore.CYAN}{Back.BLACK}{Style.BRIGHT}🤔 请输入游戏AppID{Style.RESET_ALL}").strip()
if re.match(r'^\d+$', app_id):
@@ -51,6 +64,7 @@ async def run():
if __name__ == '__main__':
try:
check_system_msg()
asyncio.run(run())
except SystemExit:
sys.exit()