mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-13 10:32:03 +08:00
解释器大体完成
This commit is contained in:
@@ -1,9 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
#################
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import shutil
|
||||
import requests
|
||||
homePath = os.path.expanduser('~')
|
||||
try:
|
||||
fontList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/fonts/list.json").text)
|
||||
except:
|
||||
fontList = [
|
||||
["fake_simsun.ttc", "https://gitlink.org.cn/api/attachments/392168", "simsun.ttc", "fake_simsun.ttc(会替换容器内的宋体,且与 deepin 有问题)"],
|
||||
["simsun.ttc", "https://gitlink.org.cn/api/attachments/392181", "simsun.ttc", "simsun.ttc"],
|
||||
["simsunb.ttf", "https://gitlink.org.cn/api/attachments/392180", "simsunb.ttf", "simsunb.ttf"],
|
||||
["msyh.ttc", "https://gitlink.org.cn/api/attachments/392182", "msyh.ttc", "msyh.ttc"],
|
||||
["msyhl.ttc", "https://gitlink.org.cn/api/attachments/392184", "msyhl.ttc", "msyhl.ttc"],
|
||||
["msyhbd.ttc", "https://gitlink.org.cn/api/attachments/392183", "msyhbd.ttc", "msyhbd.ttc"]
|
||||
]
|
||||
def Download(wineBotton: str, id: int) -> int:
|
||||
return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/{fontList[id][2]}' -o '{fontList[id][0]}' \"{fontList[id][1]}\"")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
@@ -17,8 +42,6 @@ if __name__ == "__main__":
|
||||
print("XXX 参数一")
|
||||
print("参数一为需要安装的容器")
|
||||
sys.exit()
|
||||
|
||||
homePath = os.path.expanduser('~')
|
||||
while True:
|
||||
os.system("clear")
|
||||
print('''
|
||||
@@ -33,17 +56,7 @@ if __name__ == "__main__":
|
||||
if not os.path.exists(f"{sys.argv[1]}/drive_c/windows/Fonts"):
|
||||
input("您选择的不是 Wine 容器,无法继续,按回车键退出")
|
||||
exit()
|
||||
try:
|
||||
fontList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/fonts/list.json").text)
|
||||
except:
|
||||
fontList = [
|
||||
["fake_simsun.ttc", "https://gitlink.org.cn/api/attachments/392168", "simsun.ttc", "fake_simsun.ttc(会替换容器内的宋体,且与 deepin 有问题)"],
|
||||
["simsun.ttc", "https://gitlink.org.cn/api/attachments/392181", "simsun.ttc", "simsun.ttc"],
|
||||
["simsunb.ttf", "https://gitlink.org.cn/api/attachments/392180", "simsunb.ttf", "simsunb.ttf"],
|
||||
["msyh.ttc", "https://gitlink.org.cn/api/attachments/392182", "msyh.ttc", "msyh.ttc"],
|
||||
["msyhl.ttc", "https://gitlink.org.cn/api/attachments/392184", "msyhl.ttc", "msyhl.ttc"],
|
||||
["msyhbd.ttc", "https://gitlink.org.cn/api/attachments/392183", "msyhbd.ttc", "msyhbd.ttc"]
|
||||
]
|
||||
|
||||
for i in range(0, len(fontList)):
|
||||
print(f"{i} {fontList[i][3]}")
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user