update 2024/9/28
This commit is contained in:
parent
c51bb1fddb
commit
6753a1dc3d
@ -9,6 +9,12 @@ import shelve
|
||||
def check_and_create_cmd_files(path):
|
||||
csso_cmd_path = os.path.join(path, 'csso.cmd')
|
||||
css_cmd_path = os.path.join(path, 'css.cmd')
|
||||
hl2_exe_path = os.path.join(path, "hl2.exe")
|
||||
|
||||
if not os.path.isfile(hl2_exe_path):
|
||||
print('请把文件放置在游戏根目录下!')
|
||||
sleep(1)
|
||||
sys.exit()
|
||||
|
||||
if not os.path.isfile(csso_cmd_path):
|
||||
with open(csso_cmd_path, 'w') as csso_file:
|
||||
@ -43,17 +49,17 @@ def is_admin():
|
||||
if is_admin():
|
||||
# 如果已经是管理员,执行主要的逻辑
|
||||
print("已获得管理员权限")
|
||||
|
||||
path = os.getcwd() # 获取当前工作目录的实际路径
|
||||
# 检查并创建cmd文件
|
||||
check_and_create_cmd_files(path)
|
||||
|
||||
print(f"当前模式(1为CS原版, 2为CS:SO): {bin_name}")
|
||||
print("请选择模式")
|
||||
print("1. 改为CS:SO\n2. 改回原版\n3. 退出")
|
||||
|
||||
choice = input('>>> ')
|
||||
|
||||
path = os.getcwd() # 获取当前工作目录的实际路径
|
||||
|
||||
# 检查并创建cmd文件
|
||||
check_and_create_cmd_files(path)
|
||||
|
||||
if choice == '1':
|
||||
if bin_name == '2':
|
||||
print('错误,你已是CS:SO!')
|
||||
|
Loading…
x
Reference in New Issue
Block a user