mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
解释器大体完成
This commit is contained in:
parent
8afe569b19
commit
3f38af72d9
@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi
|
||||
# 版本:1.5.1
|
||||
# 更新时间:2022年07月03日
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 tkinter 构建
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
@ -26,8 +26,16 @@ def InstallSparkWine(wine):
|
||||
#os.system("sudo apt install apt-fast -y")
|
||||
#os.system(f"sudo ss-apt-fast install \"{wine}\" -y")
|
||||
#return
|
||||
#os.system("sudo ss-apt-fast update")
|
||||
if not os.system("which aptss"):
|
||||
os.system(f"sudo aptss install \"{wine}\" -y")
|
||||
elif not os.system("which ss-apt-fast"):
|
||||
os.system("sudo ss-apt-fast update")
|
||||
os.system(f"sudo ss-apt-fast install \"{wine}\" -y")
|
||||
elif not os.system("which apt-fast"):
|
||||
os.system(f"sudo apt-fast install \"{wine}\" -y")
|
||||
else:
|
||||
os.system(f"sudo apt install \"{wine}\" -y")
|
||||
|
||||
###################
|
||||
# 程序功能
|
||||
|
187
AutoConfig.py
187
AutoConfig.py
@ -1,117 +1,80 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import PyQt5.QtCore as QtCore
|
||||
shell = """# “#”后面代表注释
|
||||
# 可以为了方便观看改为 bash 的高亮模式
|
||||
# 安装 dll
|
||||
installdll 0
|
||||
installdll 1
|
||||
# 安装字体
|
||||
installfont 0 # 后面参数填 Wine 运行器的字体安装器提示的编号
|
||||
# 安装字体(安装星火应用商店的微软核心字体)
|
||||
installsparkcorefont
|
||||
# 安装 Mono
|
||||
installmono
|
||||
# 安装 gecko
|
||||
installgecko
|
||||
# 安装 vcpp
|
||||
installvcpp 0 # 后面参数填 Wine 运行器的 VCPP 安装器提示的编号
|
||||
# 安装 .net
|
||||
installnet # 后面参数填 Wine 运行器的 VCPP 安装器提示的编号
|
||||
# 安装 MSXML
|
||||
installmsxml # 后面参数填 Wine 运行器的 MSXML 安装器提示的编号
|
||||
#aaaaa
|
||||
"""
|
||||
import sys
|
||||
import json
|
||||
import traceback
|
||||
import requests
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
from UI.AutoConfig import *
|
||||
|
||||
class Command():
|
||||
# 可以被使用的命令
|
||||
commandList = [
|
||||
"installdll",
|
||||
"installfont",
|
||||
"installsparkcorefont",
|
||||
"installmono",
|
||||
"installgecko",
|
||||
"installvcpp",
|
||||
"installnet",
|
||||
"installmsxml"
|
||||
]
|
||||
def __init__(self, commandString: str) -> None:
|
||||
self.commandString = commandString
|
||||
urlSources = "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/auto"
|
||||
lists = []
|
||||
|
||||
# 解析器
|
||||
# 命令字符串转可供解析的列表
|
||||
def GetCommandList(self) -> list:
|
||||
shellList = []
|
||||
shellFirstShell = self.commandString.split("\n")
|
||||
# 转换成可以执行的数组
|
||||
for l in range(0, len(shellFirstShell)):
|
||||
i = shellFirstShell[l]
|
||||
# 判断有没有注释
|
||||
if "#" in i:
|
||||
# 忽略注释
|
||||
i = i[:i.index("#")]
|
||||
# 删除前后空格
|
||||
i = i.strip()
|
||||
# 如果是空行
|
||||
if i == "":
|
||||
# 忽略此行,此行不做处理
|
||||
continue
|
||||
# 解析
|
||||
i = i.split()
|
||||
# 判断是否为合法的参数,否则提示并忽略
|
||||
if not i[0] in self.commandList:
|
||||
print(f"行{l + 1}命令{i[0]}不存在,忽略")
|
||||
continue
|
||||
shellList.append(i)
|
||||
return shellList
|
||||
class Connect:
|
||||
def SearchBotton_Clicked():
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
if ui.searchThings.text() == "":
|
||||
# 显示全部内容
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
return
|
||||
for i in lists:
|
||||
# 显示筛选的内容
|
||||
if ui.searchThings.text() in i[0]:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
|
||||
# 运行器
|
||||
class Run():
|
||||
def RunBotton_Clicked():
|
||||
# 获取选中项
|
||||
try:
|
||||
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
|
||||
return
|
||||
fileName = ""
|
||||
for i in lists:
|
||||
print(i)
|
||||
if i[0] == choose:
|
||||
fileName = i[1]
|
||||
break
|
||||
# 下载脚本
|
||||
try:
|
||||
print(f"{urlSources}/{fileName}")
|
||||
file = open("/tmp/wine-runner-auto-config.wsh", "w")
|
||||
file.write(requests.get(f"{urlSources}/{fileName}").text)
|
||||
file.close()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "无法获取配置文件")
|
||||
return
|
||||
# 执行脚本
|
||||
process = QtCore.QProcess()
|
||||
process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", "WINE=deepin-wine6-stable", "WINEPREFIX=/home/gfdgd_xi/.deepinwine", f"{programPath}/ConfigLanguareRunner.py", "/tmp/wine-runner-auto-config.wsh"])
|
||||
process.waitForFinished()
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
def InstallDll(self) -> int:
|
||||
import InstallDll
|
||||
return InstallDll.Download(self.wineBottonPath, InstallDll.GetNameByNumber(int(self.command[1])), InstallDll.GetUrlByNumber(int(self.command[1])))
|
||||
|
||||
def InstallFont(self) -> int:
|
||||
pass
|
||||
|
||||
def InstallMono(self) -> int:
|
||||
return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' mono")
|
||||
|
||||
def InstallGecko(self) -> int:
|
||||
return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' gecko")
|
||||
|
||||
def InstallVCPP(self) -> int:
|
||||
pass
|
||||
|
||||
def InstallNet(self) -> int:
|
||||
pass
|
||||
|
||||
def InstallMsxml(self) -> int:
|
||||
pass
|
||||
|
||||
def InstallSparkCoreFont(self):
|
||||
pass
|
||||
|
||||
# 可以运行的命令的映射关系
|
||||
# 可以被使用的命令的映射
|
||||
commandList = {
|
||||
"installdll": InstallDll,
|
||||
"installfont": InstallFont,
|
||||
"installsparkcorefont": InstallSparkCoreFont,
|
||||
"installmono": InstallMono,
|
||||
"installgecko": InstallGecko,
|
||||
"installvcpp": InstallVCPP,
|
||||
"installnet": InstallNet,
|
||||
"installmsxml": InstallMsxml
|
||||
}
|
||||
# 解析
|
||||
def __init__(self, command: list, wineBottonPath: str, wine: str) -> int:
|
||||
self.wineBottonPath = wineBottonPath
|
||||
self.wine = wine
|
||||
for i in command:
|
||||
self.command = i
|
||||
self.commandList[i[0]](self)
|
||||
|
||||
|
||||
com = Command(shell)
|
||||
com.Run(com.GetCommandList(), "/home/gfdgd_xi/.wine", "deepin-wine6-stable")
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
ui.setupUi(window)
|
||||
window.show()
|
||||
# 连接信号和槽
|
||||
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
|
||||
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
|
||||
# 解析云列表
|
||||
try:
|
||||
# 获取列表
|
||||
lists = json.loads(requests.get(f"{urlSources}/list.json").text)
|
||||
# 解释列表并显示在 GUI 上
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||
app.exec_()
|
361
ConfigLanguareRunner.py
Executable file
361
ConfigLanguareRunner.py
Executable file
@ -0,0 +1,361 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
from inspect import trace
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import traceback
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
# 读取文本文档
|
||||
def readtxt(path):
|
||||
f = open(path, "r") # 设置文件对象
|
||||
str = f.read() # 获取内容
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
information = json.loads(readtxt(f"{programPath}/information.json"))
|
||||
version = information["Version"]
|
||||
thankText = ""
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
programEnv = [
|
||||
["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
|
||||
["($WINE)", "deepin-wine6-stable"],
|
||||
["($DANGER)", "0"],
|
||||
["($HOME)", os.path.expanduser('~')],
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($?)", 0]
|
||||
]
|
||||
readOnlyEnv = [
|
||||
"($DANGER)",
|
||||
"($HOME)",
|
||||
"($PROGRAMPATH)",
|
||||
"($VERSION)",
|
||||
"($THANK)"
|
||||
]
|
||||
|
||||
class Command():
|
||||
# 有风险的命令
|
||||
dangerCommand = [
|
||||
"bash",
|
||||
"bat",
|
||||
"download"
|
||||
]
|
||||
# 可以被使用的命令
|
||||
commandList = [
|
||||
"installdll",
|
||||
"installfont",
|
||||
"installsparkcorefont",
|
||||
"installmono",
|
||||
"installgecko",
|
||||
"installvcpp",
|
||||
"installnet",
|
||||
"installmsxml",
|
||||
"echo",
|
||||
"info",
|
||||
"error",
|
||||
"warning",
|
||||
"exit",
|
||||
"bash",
|
||||
"bat",
|
||||
"version",
|
||||
"thank",
|
||||
"pause",
|
||||
"download"
|
||||
]
|
||||
|
||||
def __init__(self, commandString: str) -> None:
|
||||
self.commandString = commandString
|
||||
|
||||
# 解析器
|
||||
# 命令字符串转可供解析的列表
|
||||
def GetCommandList(self) -> list:
|
||||
shellList = []
|
||||
shellFirstShell = self.commandString.split("\n")
|
||||
# 转换成可以执行的数组
|
||||
for l in range(0, len(shellFirstShell)):
|
||||
i = shellFirstShell[l]
|
||||
# 判断有没有注释
|
||||
if "#" in i:
|
||||
# 忽略注释
|
||||
i = i[:i.index("#")]
|
||||
# 删除前后空格
|
||||
i = i.strip()
|
||||
# 如果是空行
|
||||
if i == "":
|
||||
# 忽略此行,此行不做处理
|
||||
continue
|
||||
# 空格转义
|
||||
i = i.replace("\\ ", "@Space@")
|
||||
# 解析
|
||||
i = i.split()
|
||||
# 判断是否为合法的参数,否则提示并忽略
|
||||
if not i[0] in self.commandList and i[0][0] != "(":
|
||||
print(f"行{l + 1}命令{i[0]}不存在,忽略")
|
||||
programEnv[9][1] = "-2"
|
||||
continue
|
||||
if programEnv[2][1] == "0" and i[0] in self.dangerCommand:
|
||||
print(f"行{l + 1}命令{i[0]}目前解析器不允许运行,忽略")
|
||||
print("如果需要运行,可以在配置面板开启“允许修改系统”选项(针对GUI用户)")
|
||||
print("或添加参数 --system(终端调用运行用户)")
|
||||
programEnv[9][1] = "-1"
|
||||
continue
|
||||
rightList = []
|
||||
for k in i:
|
||||
# 处理符号转义
|
||||
rightList.append(k.replace("@Space@", " ").replace("\\n", "\n").replace("\\r", "\r"))
|
||||
shellList.append(rightList)
|
||||
return shellList
|
||||
|
||||
# 运行器
|
||||
class Run():
|
||||
close = False
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
def Exit(self):
|
||||
self.close = True
|
||||
return 0
|
||||
|
||||
def InstallDll(self) -> int:
|
||||
import InstallDll
|
||||
# 如果是数字
|
||||
number = False
|
||||
try:
|
||||
int(self.command[1])
|
||||
number = True
|
||||
except:
|
||||
pass
|
||||
if number:
|
||||
return InstallDll.Download(self.wineBottonPath, InstallDll.GetNameByNumber(int(self.command[1])), InstallDll.GetUrlByNumber(int(self.command[1])))
|
||||
return InstallDll.Download(self.wineBottonPath, self.command[1], InstallDll.GetUrlByName(self.command[1]))
|
||||
|
||||
def Thank(self) -> int:
|
||||
for i in information["Thank"]:
|
||||
print(i)
|
||||
return 0
|
||||
|
||||
def InstallFont(self) -> int:
|
||||
import InstallFont
|
||||
return InstallFont.Download(self.wineBottonPath, int(self.command[1]))
|
||||
|
||||
def InstallMono(self) -> int:
|
||||
return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' mono")
|
||||
|
||||
def InstallGecko(self) -> int:
|
||||
return os.system(f"ENTERNOTSHOW=0 '{self.programPath}/InstallMono.py' '{self.wineBottonPath}' '{self.wine}' gecko")
|
||||
|
||||
def InstallVCPP(self) -> int:
|
||||
import InstallVisualCPlusPlus
|
||||
return InstallVisualCPlusPlus.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def InstallNet(self) -> int:
|
||||
import InstallNetFramework
|
||||
return InstallNetFramework.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def InstallMsxml(self) -> int:
|
||||
import InstallMsxml
|
||||
return InstallMsxml.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def Info(self) -> int:
|
||||
QtWidgets.QMessageBox.information(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def InstallSparkCoreFont(self):
|
||||
if not os.system("which aptss"):
|
||||
# 最新版本星火应用商店处理
|
||||
os.system("pkexec bash aptss ssupdate")
|
||||
return os.system("pkexec bash aptss install ms-core-fonts")
|
||||
if not os.system("which ss-apt-fast"):
|
||||
# 稍久的版本
|
||||
os.system("pkexec ss-apt-fast update")
|
||||
return os.system("pkexec bash ss-apt-fast install ms-core-fonts")
|
||||
# 不知道什么版本的处理方法
|
||||
if not os.system("which apt-fast"):
|
||||
# 稍久的版本
|
||||
os.system("pkexec apt-fast update")
|
||||
return os.system("pkexec apt-fast install ms-core-fonts")
|
||||
os.system("pkexec apt update")
|
||||
return os.system("pkexec apt install ms-core-fonts")
|
||||
|
||||
def Echo(self) -> int:
|
||||
del self.command[0]
|
||||
print(" ".join(self.command))
|
||||
return 0
|
||||
|
||||
def Warning(self):
|
||||
QtWidgets.QMessageBox.warning(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def Error(self):
|
||||
QtWidgets.QMessageBox.critical(None, self.command[1], self.command[2])
|
||||
return 0
|
||||
|
||||
def Bash(self):
|
||||
command = ""
|
||||
for i in self.command[1:]:
|
||||
command += f"'{i}' "
|
||||
return os.system(command)
|
||||
|
||||
def Bat(self):
|
||||
command = ["WINEPREFIX='$WINEPREFIX'", "$WINE"]
|
||||
for i in programEnv:
|
||||
for k in range(len(command)):
|
||||
command[k] = command[k].replace(i[0], i[1])
|
||||
for i in self.command[1:]:
|
||||
command.append(i)
|
||||
commandStr = command[0] + " "
|
||||
for i in command[1:]:
|
||||
commandStr += f"{i} "
|
||||
print(commandStr)
|
||||
return os.system(commandStr)
|
||||
|
||||
def Version(self):
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
return 0
|
||||
|
||||
def Pause(self) -> int:
|
||||
input("按回车键继续……")
|
||||
return 0
|
||||
|
||||
def Download(self) -> int:
|
||||
command = f"aria2c -x 16 -s 16 -c '{self.command[1]}' "
|
||||
try:
|
||||
command += f"-d '{self.command[2]}' "
|
||||
command += f"-o '{self.command[3]}' "
|
||||
except:
|
||||
pass
|
||||
return os.system(command)
|
||||
|
||||
# 可以运行的命令的映射关系
|
||||
# 可以被使用的命令的映射
|
||||
commandList = {
|
||||
"installdll": InstallDll,
|
||||
"installfont": InstallFont,
|
||||
"installsparkcorefont": InstallSparkCoreFont,
|
||||
"installmono": InstallMono,
|
||||
"installgecko": InstallGecko,
|
||||
"installvcpp": InstallVCPP,
|
||||
"installnet": InstallNet,
|
||||
"installmsxml": InstallMsxml,
|
||||
"echo": Echo,
|
||||
"info": Info,
|
||||
"warning": Warning,
|
||||
"error": Error,
|
||||
"exit": Exit,
|
||||
"bash": Bash,
|
||||
"bat": Bat,
|
||||
"version": Version,
|
||||
"thank": Thank,
|
||||
"pause": Pause,
|
||||
"download": Download
|
||||
}
|
||||
|
||||
# 参数数列表
|
||||
commandInfo = {
|
||||
"installdll": [1],
|
||||
"installfont": [1],
|
||||
"installsparkcorefont": [0],
|
||||
"installmono": [0],
|
||||
"installgecko": [0],
|
||||
"installvcpp": [1],
|
||||
"installnet": [1],
|
||||
"installmsxml": [1],
|
||||
"echo": [1],
|
||||
"info": [2],
|
||||
"warning": [2],
|
||||
"error": [2],
|
||||
"exit": [0],
|
||||
"bash": [1],
|
||||
"bat": [1],
|
||||
"version": [0],
|
||||
"thank": [0],
|
||||
"pause": [0],
|
||||
"download": [1]
|
||||
}
|
||||
|
||||
# 解析
|
||||
def __init__(self, command: list, wineBottonPath: str, wine: str) -> int:
|
||||
self.wineBottonPath = wineBottonPath
|
||||
self.wine = wine
|
||||
for i in command:
|
||||
self.command = i
|
||||
# 变量解析
|
||||
if self.command[0][0] == "(" and "=" in self.command[0]:
|
||||
env = i[0][: i[0].index("=")]
|
||||
value = i[0][i[0].index("=") + 1:]
|
||||
# 判断是不是只读变量
|
||||
if env in readOnlyEnv:
|
||||
print(f"运行命令{' '.join(self.command)}出现错误")
|
||||
print(f"变量 {env} 只读,无法修改,忽略")
|
||||
continue
|
||||
change = False
|
||||
for k in range(len(programEnv)):
|
||||
# 修改变量
|
||||
if env == programEnv[k][0]:
|
||||
programEnv[k][1] = value
|
||||
change = True
|
||||
break
|
||||
if not change:
|
||||
# 添加变量
|
||||
programEnv.append([f"{env}", value])
|
||||
continue
|
||||
# 正常命令解析
|
||||
if len(i) -1 < self.commandInfo[i[0]][0]:
|
||||
print("参数不足")
|
||||
continue
|
||||
# 替换环境变量
|
||||
for a in range(1, len(i)):
|
||||
for b in programEnv:
|
||||
if b[0] in i[a]:
|
||||
i[a] = i[a].replace(b[0], b[1])
|
||||
commandReturn = self.commandList[i[0]](self)
|
||||
if commandReturn:
|
||||
print(f"运行命令{' '.join(self.command)}出现错误")
|
||||
programEnv[9][1] = str(commandReturn)
|
||||
if self.close:
|
||||
break
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
optionAll = 0
|
||||
if "--system" in sys.argv:
|
||||
programEnv[2][1] = "1"
|
||||
optionAll += 1
|
||||
if os.getenv("WINE") != None:
|
||||
programEnv[1][1] = os.getenv("WINE")
|
||||
if os.getenv("WINEPREFIX") != None:
|
||||
programEnv[0][1] = os.getenv("WINEPREFIX")
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
while True:
|
||||
commandLine = input(">")
|
||||
if commandLine == "exit":
|
||||
break
|
||||
com = Command(commandLine)
|
||||
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
|
||||
exit()
|
||||
# 读取文件
|
||||
try:
|
||||
file = open(sys.argv[1], "r")
|
||||
com = Command(file.read())
|
||||
file.close()
|
||||
except:
|
||||
print("错误:无法读取该文件,无法继续")
|
||||
sys.exit(1)
|
||||
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
|
@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:1.8.0
|
||||
# 更新时间:2022年08月24日
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
@ -32,12 +32,17 @@ def GetUrlByNumber(dllID: int) -> str:
|
||||
def GetNameByNumber(dllID: int) -> str:
|
||||
return lists[dllID][0]
|
||||
|
||||
def GetUrlByName(dllName: str):
|
||||
for i in range(0, len(lists)):
|
||||
if dllName == lists[i][0]:
|
||||
return f"{url}/{lists[i][1]}/{lists[i][2]}/{lists[i][0]}"
|
||||
|
||||
def Download(wineBotton, dllName, urlPart) -> bool:
|
||||
try:
|
||||
os.remove(f"{wineBotton}/drive_c/windows/system32/{dllName}")
|
||||
except:
|
||||
pass
|
||||
return not os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/system32' -o '{dllName}' '{urlPart}'")
|
||||
return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/system32' -o '{dllName}' '{urlPart}'")
|
||||
|
||||
def exit():
|
||||
input("按回车键退出")
|
||||
|
@ -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:
|
||||
|
@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:1.8.0
|
||||
# 更新时间:2022年08月06日
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
@ -65,7 +65,7 @@ except:
|
||||
file = open(f"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/information.txt", "r")
|
||||
version = file.read().replace("\n", "")
|
||||
print("安装版本:", version)
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} msiexec /i \"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/install.msi\"")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' msiexec /i \"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/install.msi\"")
|
||||
if exitInputShow:
|
||||
input("安装结束,按回车键退出")
|
||||
exit()
|
||||
@ -98,7 +98,7 @@ if os.path.exists(f"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/install.m
|
||||
print("缓存版本:", version.replace("/", ""))
|
||||
print("已经缓存,使用本地版本")
|
||||
file.close()
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} msiexec /i \"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/install.msi\"")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' msiexec /i \"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/install.msi\"")
|
||||
if exitInputShow:
|
||||
input("安装结束,按回车键退出")
|
||||
exit()
|
||||
@ -109,7 +109,7 @@ os.system(f"rm -rf \"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/install.
|
||||
os.system("mkdir -p /tmp/winegeckomonoinstall")
|
||||
os.system(f"aria2c -x 16 -s 16 -d \"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}\" -o install.msi \"{programDownloadUrl}\"")
|
||||
print("开始安装")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} msiexec /i \"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/install.msi\"")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' msiexec /i \"{homePath}/.cache/deepin-wine-runner/{sys.argv[3]}/install.msi\"")
|
||||
try:
|
||||
if sys.argv[4] == "1":
|
||||
print("写入缓存")
|
||||
|
@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:1.8.0
|
||||
# 更新时间:2022年08月06日
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
@ -14,7 +14,20 @@ import os
|
||||
import sys
|
||||
import json
|
||||
import requests
|
||||
try:
|
||||
msxmlList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/msxml/list.json").text)
|
||||
except:
|
||||
msxmlList = [
|
||||
["MSXML 4.0 SP2", "https://www.gitlink.org.cn/api/attachments/390679?gfdgd_xi", "msxml6.0.msi"],
|
||||
["MSXML 4.0 SP3", "https://www.gitlink.org.cn/api/attachments/390678?gfdgd_xi", "msxml4.0SP3.msi"],
|
||||
["MSXML 6.0", "https://www.gitlink.org.cn/api/attachments/390681?gfdgd_xi", "msxml6_x64.msi"]
|
||||
]
|
||||
|
||||
def Download(wineBotton: str, id: int, wine: str):
|
||||
os.system(f"aria2c -x 16 -s 16 -d \"/tmp/deepin-wine-runner-msxml/\" -o \"{msxmlList[id][2]}\" \"{msxmlList[id][1]}\"")
|
||||
os.system(f"WINEPREFIX='{wineBotton}' '{wine}' msiexec /i \"/tmp/deepin-wine-runner-msxml/{msxmlList[id][2]}\"")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("版本:1.0.0")
|
||||
@ -37,14 +50,7 @@ print('''
|
||||
|
||||
|
||||
''')
|
||||
try:
|
||||
msxmlList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/msxml/list.json").text)
|
||||
except:
|
||||
msxmlList = [
|
||||
["MSXML 4.0 SP2", "https://www.gitlink.org.cn/api/attachments/390679?gfdgd_xi", "msxml6.0.msi"],
|
||||
["MSXML 4.0 SP3", "https://www.gitlink.org.cn/api/attachments/390678?gfdgd_xi", "msxml4.0SP3.msi"],
|
||||
["MSXML 6.0", "https://www.gitlink.org.cn/api/attachments/390681?gfdgd_xi", "msxml6_x64.msi"]
|
||||
]
|
||||
|
||||
print("请选择以下的 MSXML 进行安装(不保证能正常安装运行)")
|
||||
for i in range(0, len(msxmlList)):
|
||||
print(f"{i}、{msxmlList[i][0]}")
|
||||
@ -71,7 +77,7 @@ else:
|
||||
choice = (sys.argv[3] == "1")
|
||||
if os.path.exists(f"{homePath}/.config/deepin-wine-runner/MSXML/{msxmlList[choose][2]}") and choice:
|
||||
print("已经缓存,使用本地版本")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} msiexec /i \"{homePath}/.config/deepin-wine-runner/MSXML/{msxmlList[choose][2]}\"")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' msiexec /i \"{homePath}/.config/deepin-wine-runner/MSXML/{msxmlList[choose][2]}\"")
|
||||
input("安装结束,按回车键退出")
|
||||
exit()
|
||||
print("开始下载")
|
||||
@ -79,5 +85,5 @@ os.system(f"rm -rfv \"{homePath}/.config/deepin-wine-runner/MSXML/{msxmlList[cho
|
||||
os.system(f"mkdir -p \"{homePath}/.config/deepin-wine-runner/MSXML/\"")
|
||||
os.system(f"aria2c -x 16 -s 16 -d \"{homePath}/.config/deepin-wine-runner/MSXML\" -o \"{msxmlList[choose][2]}\" \"{msxmlList[choose][1]}\"")
|
||||
print("开始安装")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} msiexec /i \"{homePath}/.config/deepin-wine-runner/MSXML/{msxmlList[choose][2]}\"")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' msiexec /i \"{homePath}/.config/deepin-wine-runner/MSXML/{msxmlList[choose][2]}\"")
|
||||
input("安装结束,按回车键退出")
|
@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:1.8.0
|
||||
# 更新时间:2022年08月01日
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
@ -14,7 +14,30 @@ import os
|
||||
import sys
|
||||
import json
|
||||
import requests
|
||||
try:
|
||||
netList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/net/list.json").text)
|
||||
except:
|
||||
netList = [
|
||||
["3.5 SP1 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/b635098a-2d1d-4142-bef6-d237545123cb/2651b87007440a15209cac29634a4e45/dotnetfx35.exe"],
|
||||
["4.0 Offline Installer", "https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"],
|
||||
["4.5 Web Installer", "https://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe"],
|
||||
["4.5.1 Offline Installer", "https://download.microsoft.com/download/1/6/7/167F0D79-9317-48AE-AEDB-17120579F8E2/NDP451-KB2858728-x86-x64-AllOS-ENU.exe"],
|
||||
["4.5.2 Offline Installer", "https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe"],
|
||||
["4.6 Offline Installer", "https://download.microsoft.com/download/6/F/9/6F9673B1-87D1-46C4-BF04-95F24C3EB9DA/enu_netfx/NDP46-KB3045557-x86-x64-AllOS-ENU_exe/NDP46-KB3045557-x86-x64-AllOS-ENU.exe"],
|
||||
["4.6.1 Offline Installer", "https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe"],
|
||||
["4.6.2 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/8e396c75-4d0d-41d3-aea8-848babc2736a/80b431456d8866ebe053eb8b81a168b3/ndp462-kb3151800-x86-x64-allos-enu.exe"],
|
||||
["4.7 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/2dfcc711-bb60-421a-a17b-76c63f8d1907/e5c0231bd5d51fffe65f8ed7516de46a/ndp47-kb3186497-x86-x64-allos-enu.exe"],
|
||||
["4.7.1 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/4312fa21-59b0-4451-9482-a1376f7f3ba4/9947fce13c11105b48cba170494e787f/ndp471-kb4033342-x86-x64-allos-enu.exe"],
|
||||
["4.7.2 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/1f5af042-d0e4-4002-9c59-9ba66bcf15f6/089f837de42708daacaae7c04b7494db/ndp472-kb4054530-x86-x64-allos-enu.exe"],
|
||||
["4.8 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe"]
|
||||
]
|
||||
|
||||
def Download(wineBotton: str, id: int, wine: str):
|
||||
programName = os.path.split(netList[id][1])[1]
|
||||
os.system(f"aria2c -x 16 -s 16 -d \"/tmp/deepin-wine-runner-net\" -o \"{programName}\" \"{netList[id][1]}\"")
|
||||
os.system(f"WINEPREFIX='{wineBotton}' '{wine}' '/tmp/deepin-wine-runner-net/{programName}'")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("版本:1.0.0")
|
||||
@ -37,23 +60,6 @@ print('''
|
||||
|
||||
|
||||
''')
|
||||
try:
|
||||
netList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/net/list.json").text)
|
||||
except:
|
||||
netList = [
|
||||
["3.5 SP1 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/b635098a-2d1d-4142-bef6-d237545123cb/2651b87007440a15209cac29634a4e45/dotnetfx35.exe"],
|
||||
["4.0 Offline Installer", "https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"],
|
||||
["4.5 Web Installer", "https://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe"],
|
||||
["4.5.1 Offline Installer", "https://download.microsoft.com/download/1/6/7/167F0D79-9317-48AE-AEDB-17120579F8E2/NDP451-KB2858728-x86-x64-AllOS-ENU.exe"],
|
||||
["4.5.2 Offline Installer", "https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe"],
|
||||
["4.6 Offline Installer", "https://download.microsoft.com/download/6/F/9/6F9673B1-87D1-46C4-BF04-95F24C3EB9DA/enu_netfx/NDP46-KB3045557-x86-x64-AllOS-ENU_exe/NDP46-KB3045557-x86-x64-AllOS-ENU.exe"],
|
||||
["4.6.1 Offline Installer", "https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe"],
|
||||
["4.6.2 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/8e396c75-4d0d-41d3-aea8-848babc2736a/80b431456d8866ebe053eb8b81a168b3/ndp462-kb3151800-x86-x64-allos-enu.exe"],
|
||||
["4.7 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/2dfcc711-bb60-421a-a17b-76c63f8d1907/e5c0231bd5d51fffe65f8ed7516de46a/ndp47-kb3186497-x86-x64-allos-enu.exe"],
|
||||
["4.7.1 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/4312fa21-59b0-4451-9482-a1376f7f3ba4/9947fce13c11105b48cba170494e787f/ndp471-kb4033342-x86-x64-allos-enu.exe"],
|
||||
["4.7.2 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/1f5af042-d0e4-4002-9c59-9ba66bcf15f6/089f837de42708daacaae7c04b7494db/ndp472-kb4054530-x86-x64-allos-enu.exe"],
|
||||
["4.8 Offline Installer", "https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe"]
|
||||
]
|
||||
print("请选择以下的 .net framework 进行安装(不保证能正常安装运行)")
|
||||
for i in range(0, len(netList)):
|
||||
print(f"{i} .net framework {netList[i][0]}")
|
||||
@ -82,12 +88,12 @@ print(f"一般建议 Offline Installer 版本在下载完 exe 安装程序后在
|
||||
programName = os.path.split(netList[choose][1])[1]
|
||||
if os.path.exists(f"{homePath}/.cache/deepin-wine-runner/.netframework/{programName}") and choice:
|
||||
print("已经缓存,使用本地版本")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/.netframework/{programName}'")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' '{homePath}/.cache/deepin-wine-runner/.netframework/{programName}'")
|
||||
input("安装结束,按回车键退出")
|
||||
exit()
|
||||
print("开始下载")
|
||||
os.system(f"rm -rf '{homePath}/.cache/deepin-wine-runner/.netframework/{programName}'")
|
||||
os.system(f"mkdir -p '{homePath}/.cache/deepin-wine-runner/.netframework'")
|
||||
os.system(f"aria2c -x 16 -s 16 -d \"{homePath}/.cache/deepin-wine-runner/.netframework\" -o \"{programName}\" \"{netList[choose][1]}\"")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/.netframework/{programName}'")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' '{homePath}/.cache/deepin-wine-runner/.netframework/{programName}'")
|
||||
input("安装结束,按回车键退出")
|
@ -1,4 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 bash 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
#################
|
||||
echo
|
||||
echo 'm m " m m mmmm '
|
||||
echo '# # # mmm m mm mmm # # m" "m'
|
||||
@ -60,6 +71,10 @@ which ss-apt-fast > /dev/null
|
||||
if [ $? == 0 ]; then
|
||||
apt="ss-apt-fast"
|
||||
fi
|
||||
which aptss > /dev/null
|
||||
if [ $? == 0 ]; then
|
||||
apt="aptss"
|
||||
fi
|
||||
# 添加源
|
||||
if [ $system = "0" ]; then
|
||||
${debianSource[$systemVersion]}
|
||||
|
@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:1.8.0
|
||||
# 更新时间:2022年08月01日
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
@ -66,11 +66,11 @@ print(f"您选择了{msxmlList[choose][0]}")
|
||||
if os.path.exists(f"{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}") and choice:
|
||||
print("已经缓存,使用本地版本")
|
||||
if msxmlList[choose][2] == "msi":
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} msiexec /i '{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}'")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' msiexec /i '{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}'")
|
||||
input("安装结束,按回车键退出")
|
||||
sys.exit()
|
||||
if msxmlList[choose][2] == "exe":
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}'")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' '{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}'")
|
||||
input("安装结束,按回车键退出")
|
||||
sys.exit()
|
||||
print("开始下载")
|
||||
@ -79,12 +79,12 @@ os.system(f"mkdir -p '{homePath}/.cache/deepin-wine-runner/other'")
|
||||
if msxmlList[choose][2] == "msi":
|
||||
os.system(f"aria2c -x 16 -s 16 -d '{homePath}/.cache/deepin-wine-runner/other' -o '{msxmlList[choose][3]}' \"{msxmlList[choose][1]}\"")
|
||||
print("开始安装")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} msiexec /i '{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}'")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' msiexec /i '{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}'")
|
||||
print("安装结束")
|
||||
sys.exit()
|
||||
if msxmlList[choose][2] == "exe":
|
||||
os.system(f"aria2c -x 16 -s 16 -d '{homePath}/.cache/deepin-wine-runner/other' -o '{msxmlList[choose][3]}' \"{msxmlList[choose][1]}\"")
|
||||
print("开始安装")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}'")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' '{homePath}/.cache/deepin-wine-runner/other/{msxmlList[choose][3]}'")
|
||||
input("安装结束,按回车键退出")
|
||||
sys.exit()
|
@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:1.8.0
|
||||
# 更新时间:2022年08月01日
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
@ -14,7 +14,32 @@ import os
|
||||
import sys
|
||||
import json
|
||||
import requests
|
||||
try:
|
||||
netList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vscpp/list.json").text)
|
||||
except:
|
||||
netList = [
|
||||
["2005 Service Pack 1 Redistributable Package MFC 安全更新", "https://download.microsoft.com/download/4/A/2/4A22001F-FA3B-4C13-BF4E-42EC249D51C4/vcredist_x86.EXE", "vcredist05_x86.exe"],
|
||||
["2008 (VC++ 9.0) SP1 (不再支持) X86", "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe", "vcredist08_x86.exe"],
|
||||
["2008 (VC++ 9.0) SP1 (不再支持) X64", "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe", "vcredist08_x86.exe"],
|
||||
["2010 (VC++ 10.0) SP1 (不再支持) X86", "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe", "vcredist10_x86.exe"],
|
||||
["2010 (VC++ 10.0) SP1 (不再支持) X64", "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe", "vcredist10_x64.exe"],
|
||||
["2012 (VC++ 11.0) Update 4 X86", "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe", "vcredist12_x86.exe"],
|
||||
["2012 (VC++ 11.0) Update 4 X64", "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe", "vcredist12_x64.exe"],
|
||||
["2013 (VC++ 12.0) X86", "https://aka.ms/highdpimfc2013x86enu", "vcredist13_x86.exe"],
|
||||
["2013 (VC++ 12.0) X64", "https://aka.ms/highdpimfc2013x64enu", "vcredist13_x64.exe"],
|
||||
["2015、2017、2019 和 2022 X86", "https://aka.ms/vs/17/release/vc_redist.x86.exe", "vc_redist15.x86.exe"],
|
||||
["2015、2017、2019 和 2022 X64", "https://aka.ms/vs/17/release/vc_redist.x64.exe", "vc_redist15.x64.exe"],
|
||||
["2015、2017、2019 和 2022 ARM64", "https://aka.ms/vs/17/release/vc_redist.arm64.exe", "vc_redist15.arm64.exe"]
|
||||
]
|
||||
def Download(wineBotton: str, id: int, wine: str) -> int:
|
||||
try:
|
||||
os.remove(f"/tmp/deepin-wine-runner-vcpp/{netList[id][2]}")
|
||||
except:
|
||||
pass
|
||||
os.system(f"aria2c -x 16 -s 16 -d '/tmp/deepin-wine-runner-vcpp' -o '{netList[id][2]}' \"{netList[id][1]}\"")
|
||||
os.system(f"WINEPREFIX='{wineBotton}' '{wine}' '/tmp/deepin-wine-runner-vcpp/{netList[id][2]}'")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("版本:1.0.0")
|
||||
@ -37,17 +62,7 @@ print('''
|
||||
|
||||
|
||||
''')
|
||||
try:
|
||||
netList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vscpp/list.json").text)
|
||||
except:
|
||||
netList = [
|
||||
["2005 Service Pack 1 Redistributable Package MFC 安全更新", "https://download.microsoft.com/download/4/A/2/4A22001F-FA3B-4C13-BF4E-42EC249D51C4/vcredist_x86.EXE", "vcredist05_x86.exe"],
|
||||
["2008 (VC++ 9.0) SP1 (不再支持) ", "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe", "vcredist08_x86.exe"],
|
||||
["2010 (VC++ 10.0) SP1 (不再支持) ", "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe", "vcredist10_x86.exe"],
|
||||
["2012 (VC++ 11.0) Update 4", "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe", "vcredist12_x86.exe"],
|
||||
["2013 (VC++ 12.0) ", "https://download.visualstudio.microsoft.com/download/pr/10912113/5da66ddebb0ad32ebd4b922fd82e8e25/vcredist_x86.exe", "vcredist13_x86.exe"],
|
||||
["2015、2017、2019 和 2022", "https://aka.ms/vs/17/release/vc_redist.x86.exe", "vcredist15_x86.exe"]
|
||||
]
|
||||
|
||||
print("请选择以下的 Visual Studio C++ 进行安装(不保证能正常安装运行)")
|
||||
for i in range(0, len(netList)):
|
||||
print(f"{i} Visual Studio C++ {netList[i][0]}")
|
||||
@ -67,12 +82,12 @@ if choose == "exit":
|
||||
print(f"您选择了 Visual Studio C++ {netList[choose][0]}")
|
||||
if os.path.exists(f"{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}"):
|
||||
print("已经缓存,使用本地版本")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}'")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' '{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}'")
|
||||
input("安装结束,按回车键退出")
|
||||
exit()
|
||||
print("开始下载")
|
||||
os.system(f"rm -rf '{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}'")
|
||||
os.system(f"mkdir -p '{homePath}/.cache/deepin-wine-runner/vcpp'")
|
||||
os.system(f"aria2c -x 16 -s 16 -d '{homePath}/.cache/deepin-wine-runner/vcpp' -o '{netList[choose][2]}' \"{netList[choose][1]}\"")
|
||||
os.system(f"WINEPREFIX={sys.argv[1]} {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}'")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' '{sys.argv[2]}' '{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}'")
|
||||
input("安装结束,按回车键退出")
|
@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:1.8.0
|
||||
# 更新时间:2022年08月02日
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
|
85
UI/AutoConfig.py
Normal file
85
UI/AutoConfig.py
Normal file
@ -0,0 +1,85 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'AutoConfig.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.6
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(800, 600)
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget)
|
||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.searchTips = QtWidgets.QLabel(self.centralwidget)
|
||||
self.searchTips.setObjectName("searchTips")
|
||||
self.horizontalLayout.addWidget(self.searchTips)
|
||||
self.searchThings = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.searchThings.setObjectName("searchThings")
|
||||
self.horizontalLayout.addWidget(self.searchThings)
|
||||
self.saerchBotton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.saerchBotton.setObjectName("saerchBotton")
|
||||
self.horizontalLayout.addWidget(self.saerchBotton)
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout)
|
||||
self.searchList = QtWidgets.QListView(self.centralwidget)
|
||||
self.searchList.setObjectName("searchList")
|
||||
self.verticalLayout_3.addWidget(self.searchList)
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_2.addItem(spacerItem)
|
||||
self.runBotton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.runBotton.setObjectName("runBotton")
|
||||
self.horizontalLayout_2.addWidget(self.runBotton)
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menu_2 = QtWidgets.QMenu(self.menubar)
|
||||
self.menu_2.setObjectName("menu_2")
|
||||
self.menu = QtWidgets.QMenu(self.menubar)
|
||||
self.menu.setObjectName("menu")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.about = QtWidgets.QAction(MainWindow)
|
||||
self.about.setObjectName("about")
|
||||
self.exitProgram = QtWidgets.QAction(MainWindow)
|
||||
self.exitProgram.setObjectName("exitProgram")
|
||||
self.help = QtWidgets.QAction(MainWindow)
|
||||
self.help.setObjectName("help")
|
||||
self.openFile = QtWidgets.QAction(MainWindow)
|
||||
self.openFile.setObjectName("openFile")
|
||||
self.menu_2.addAction(self.help)
|
||||
self.menu_2.addSeparator()
|
||||
self.menu_2.addAction(self.about)
|
||||
self.menu.addAction(self.openFile)
|
||||
self.menu.addSeparator()
|
||||
self.menu.addAction(self.exitProgram)
|
||||
self.menubar.addAction(self.menu.menuAction())
|
||||
self.menubar.addAction(self.menu_2.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本"))
|
||||
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
|
||||
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
|
||||
self.runBotton.setText(_translate("MainWindow", "部署此方案"))
|
||||
self.menu_2.setTitle(_translate("MainWindow", "帮助"))
|
||||
self.menu.setTitle(_translate("MainWindow", "程序"))
|
||||
self.about.setText(_translate("MainWindow", "关于"))
|
||||
self.exitProgram.setText(_translate("MainWindow", "退出程序"))
|
||||
self.help.setText(_translate("MainWindow", "帮助"))
|
||||
self.openFile.setText(_translate("MainWindow", "打开本地部署脚本"))
|
119
UI/AutoConfig.ui
Normal file
119
UI/AutoConfig.ui
Normal file
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>自动部署脚本</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="searchTips">
|
||||
<property name="text">
|
||||
<string>搜索内容(为空代表显示所有内容):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchThings"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="saerchBotton">
|
||||
<property name="text">
|
||||
<string>搜索</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListView" name="searchList"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="runBotton">
|
||||
<property name="text">
|
||||
<string>部署此方案</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>36</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_2">
|
||||
<property name="title">
|
||||
<string>帮助</string>
|
||||
</property>
|
||||
<addaction name="help"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="about"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>程序</string>
|
||||
</property>
|
||||
<addaction name="openFile"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="exitProgram"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
<addaction name="menu_2"/>
|
||||
</widget>
|
||||
<action name="about">
|
||||
<property name="text">
|
||||
<string>关于</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="exitProgram">
|
||||
<property name="text">
|
||||
<string>退出程序</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="help">
|
||||
<property name="text">
|
||||
<string>帮助</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="openFile">
|
||||
<property name="text">
|
||||
<string>打开本地部署脚本</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
BIN
UI/__pycache__/AutoConfig.cpython-310.pyc
Normal file
BIN
UI/__pycache__/AutoConfig.cpython-310.pyc
Normal file
Binary file not shown.
BIN
UI/__pycache__/AutoConfig.cpython-37.pyc
Normal file
BIN
UI/__pycache__/AutoConfig.cpython-37.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
__pycache__/InstallDll.cpython-37.pyc
Normal file
BIN
__pycache__/InstallDll.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/InstallFont.cpython-310.pyc
Normal file
BIN
__pycache__/InstallFont.cpython-310.pyc
Normal file
Binary file not shown.
BIN
__pycache__/InstallFont.cpython-37.pyc
Normal file
BIN
__pycache__/InstallFont.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/InstallMsxml.cpython-310.pyc
Normal file
BIN
__pycache__/InstallMsxml.cpython-310.pyc
Normal file
Binary file not shown.
BIN
__pycache__/InstallMsxml.cpython-37.pyc
Normal file
BIN
__pycache__/InstallMsxml.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/InstallNetFramework.cpython-310.pyc
Normal file
BIN
__pycache__/InstallNetFramework.cpython-310.pyc
Normal file
Binary file not shown.
BIN
__pycache__/InstallNetFramework.cpython-37.pyc
Normal file
BIN
__pycache__/InstallNetFramework.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/InstallVisualCPlusPlus.cpython-310.pyc
Normal file
BIN
__pycache__/InstallVisualCPlusPlus.cpython-310.pyc
Normal file
Binary file not shown.
BIN
__pycache__/InstallVisualCPlusPlus.cpython-37.pyc
Normal file
BIN
__pycache__/InstallVisualCPlusPlus.cpython-37.pyc
Normal file
Binary file not shown.
@ -13,7 +13,7 @@
|
||||
"感谢 @PossibleVing 提供的新版应用图标",
|
||||
"感谢 @zhengjl 反馈的 1.7.0 中 .net framrwork 3.5 非离线版安装包的问题以及 1.8.0 重复路径一直自动重复增加的问题",
|
||||
"感谢 @国川 @刘岐 提供的非 i386、amd64 运行 wine 使用 i386/amd64 可执行文件的教程和脚本",
|
||||
"感谢 @勇往直前 梦想启航 @189******09 @tfhyl 提供在非 X86 平台的国产 PC 进行测试",
|
||||
"感谢 @王俊文 @189******09 @tfhyl 提供在非 X86 平台的国产 PC 进行测试",
|
||||
"感谢 @cuisirwork 提供的提供视频教程的建议",
|
||||
"感谢 @办公助手 提供的非 X86 平台 Wine 运行自定义 exe 应用教程和 deb 包",
|
||||
"感谢 @季星火 反馈的无法使用该程序删除生成的 .desktop 的问题",
|
||||
|
@ -653,7 +653,15 @@ def ThankWindow():
|
||||
about_this_program()
|
||||
|
||||
def InstallWineFont():
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C 'echo 这些字体来自星火应用商店 && sudo ss-apt-fast install ms-core-fonts winfonts -y' --keep-open"]).start()
|
||||
# 筛选 apt
|
||||
if not os.system("which aptss"):
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C 'echo 这些字体来自星火应用商店 && sudo aptss install ms-core-fonts -y' --keep-open"]).start()
|
||||
elif not os.system("which ss-apt-fast"):
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C 'echo 这些字体来自星火应用商店 && sudo ss-apt-fast update && sudo ss-apt-fast install ms-core-fonts -y' --keep-open"]).start()
|
||||
elif not os.system("which apt-fast"):
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C 'echo 这些字体来自星火应用商店 && sudo apt-fast install ms-core-fonts -y' --keep-open"]).start()
|
||||
else:
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C 'echo 这些字体来自星火应用商店 && sudo apt install ms-core-fonts -y' --keep-open"]).start()
|
||||
|
||||
def WineRunnerBugUpload():
|
||||
threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start()
|
||||
@ -1346,7 +1354,8 @@ exe路径\' 参数 \'
|
||||
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
|
||||
updateThingsString = '''<b>※1、新增新的 Wine 安装器,并支持将安装的 Wine 打包到 Wine 程序 deb 包中
|
||||
※2、Wine 打包器打包 Windows 应用支持将 Wine 打包入 deb 内,可以不依赖 Wine(一般不推荐把 Wine 打包入内,推荐用依赖的形式),并支持设置自定义依赖和生成模板
|
||||
※3、开始初步多语言支持</b>
|
||||
※3、开始初步多语言支持
|
||||
※4、修复了在没有安装任何 Wine 的情况下使用高级功能导致程序闪退的问题</b>
|
||||
4、修改错别字(图形话=>图形化)
|
||||
5、修复评分功能名称为空也可以上传评分的问题
|
||||
6、去除 toilet 依赖,使在 Deepin 23 Preview 上运行更佳
|
||||
@ -1806,6 +1815,10 @@ if len(sys.argv) > 1 and sys.argv[1]:
|
||||
e2.setEditText(sys.argv[1])
|
||||
if not os.path.exists("/opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"):
|
||||
sparkWineSetting.setEnabled(False)
|
||||
#ProgramRunStatusShow.ShowWindow()
|
||||
#ProgramRunStatusUpload.ShowWindow()
|
||||
if o1.currentText() == "":
|
||||
# 一个 Wine 都没有却用 Wine 的功能
|
||||
# 还是要处理的,至少不会闪退
|
||||
wine["没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用"] = "没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用"
|
||||
canUseWine.append("没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用")
|
||||
o1.addItem("没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用")
|
||||
sys.exit(app.exec_())
|
||||
|
@ -2,7 +2,7 @@
|
||||
# 本来是用C++写的,但在非deepin/UOS编译/运行就是下载不了https文件,只能用python重写
|
||||
#########################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布
|
||||
# 版本:2.0.1
|
||||
# 版本:2.1.0
|
||||
# 感谢:感谢 deepin-wine 团队,提供了 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 PyQt5 构建
|
||||
#########################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user