mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
新增 VB Runtime 组件安装工具
This commit is contained in:
parent
8bb60a1be9
commit
47b3dddfbc
13
AutoShell/command/installvb
Executable file
13
AutoShell/command/installvb
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
for i in sys.argv[1:]:
|
||||||
|
argv.append(i.replace(" ", "\\ "))
|
||||||
|
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||||
|
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
@ -37,5 +37,6 @@
|
|||||||
"killall": "杀死指定进程\n参数数量:1\n参数介绍:进程名",
|
"killall": "杀死指定进程\n参数数量:1\n参数介绍:进程名",
|
||||||
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
||||||
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
||||||
"killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无"
|
"killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无",
|
||||||
|
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6"
|
||||||
}
|
}
|
@ -3,7 +3,7 @@
|
|||||||
###########################################################################################
|
###########################################################################################
|
||||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||||
# 版本:2.1.0
|
# 版本:2.1.0
|
||||||
# 更新时间:2022年08月25日
|
# 更新时间:2022年10月05日
|
||||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||||
# 基于 Python3 构建
|
# 基于 Python3 构建
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
@ -109,7 +109,8 @@ class Command():
|
|||||||
"enabledwinecrashdialog",
|
"enabledwinecrashdialog",
|
||||||
"disbledwinecrashdialog",
|
"disbledwinecrashdialog",
|
||||||
"disbledWinebottlecreatelink",
|
"disbledWinebottlecreatelink",
|
||||||
"enabledWinebottlecreatelink"
|
"enabledWinebottlecreatelink",
|
||||||
|
"installvb"
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, commandString: str) -> None:
|
def __init__(self, commandString: str) -> None:
|
||||||
@ -391,6 +392,10 @@ class Command():
|
|||||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
||||||
self.Bat()
|
self.Bat()
|
||||||
|
|
||||||
|
def InstallVB(self):
|
||||||
|
import InstallVisualBasicRuntime
|
||||||
|
return InstallVisualBasicRuntime.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||||
|
|
||||||
# 可以运行的命令的映射关系
|
# 可以运行的命令的映射关系
|
||||||
# 可以被使用的命令的映射
|
# 可以被使用的命令的映射
|
||||||
commandList = {
|
commandList = {
|
||||||
@ -431,7 +436,8 @@ class Command():
|
|||||||
"enabledwinecrashdialog": EnabledWineCrashDialog,
|
"enabledwinecrashdialog": EnabledWineCrashDialog,
|
||||||
"disbledwinecrashdialog": DisbledWineCrashDialog,
|
"disbledwinecrashdialog": DisbledWineCrashDialog,
|
||||||
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
|
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
|
||||||
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink
|
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink,
|
||||||
|
"installvb": InstallVB
|
||||||
}
|
}
|
||||||
|
|
||||||
# 参数数列表
|
# 参数数列表
|
||||||
@ -474,7 +480,8 @@ class Command():
|
|||||||
"enabledwinecrashdialog": [0],
|
"enabledwinecrashdialog": [0],
|
||||||
"disbledwinecrashdialog": [0],
|
"disbledwinecrashdialog": [0],
|
||||||
"disbledWinebottlecreatelink": [0],
|
"disbledWinebottlecreatelink": [0],
|
||||||
"enabledWinebottlecreatelink": [0]
|
"enabledWinebottlecreatelink": [0],
|
||||||
|
"installvb": [1]
|
||||||
}
|
}
|
||||||
windowsUnrun = [
|
windowsUnrun = [
|
||||||
"createbotton",
|
"createbotton",
|
||||||
|
86
InstallVisualBasicRuntime.py
Executable file
86
InstallVisualBasicRuntime.py
Executable file
@ -0,0 +1,86 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 使用系统默认的 python3 运行
|
||||||
|
###########################################################################################
|
||||||
|
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||||
|
# 版本:2.1.0
|
||||||
|
# 更新时间:2022年10月05日
|
||||||
|
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||||
|
# 基于 Python3 构建
|
||||||
|
###########################################################################################
|
||||||
|
#################
|
||||||
|
# 引入所需的库
|
||||||
|
#################
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
import req as requests
|
||||||
|
try:
|
||||||
|
netList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/list.json").text)
|
||||||
|
except:
|
||||||
|
netList = [
|
||||||
|
["Visual Basic 1(DOS application)", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun100.exe", "vbrun100.exe"],
|
||||||
|
["Visual Basic 2(DOS application)", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun200.exe", "vbrun200.exe"],
|
||||||
|
["Visual Basic 3", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vb3run.exe", "vb3run.exe"],
|
||||||
|
["Visual Basic 4", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vb4run.exe", "vb4run.exe"],
|
||||||
|
["Visual Basic 6", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun60sp4.exe", "vbrun60sp4.exe"]
|
||||||
|
]
|
||||||
|
def Download(wineBotton: str, id: int, wine: str) -> int:
|
||||||
|
try:
|
||||||
|
os.remove(f"/tmp/deepin-wine-runner-vb/{netList[id][2]}")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
os.system(f"aria2c -x 16 -s 16 -d '/tmp/deepin-wine-runner-vb' -o '{netList[id][2]}' \"{netList[id][1]}\"")
|
||||||
|
os.system(f"WINEPREFIX='{wineBotton}' {wine} '/tmp/deepin-wine-runner-vb/{netList[id][2]}'")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
if "--help" in sys.argv:
|
||||||
|
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||||
|
print("版本:1.0.0")
|
||||||
|
print("本程序可以更方便的在 wine 容器中安装 Visual Basic Runtime")
|
||||||
|
sys.exit()
|
||||||
|
if len(sys.argv) <= 2 or sys.argv[1] == "" or sys.argv[2] == "":
|
||||||
|
print("您未指定需要安装 Visual Basic Runtime 的容器和使用的 wine,无法继续")
|
||||||
|
print("参数:")
|
||||||
|
print("XXX 参数一 参数二 参数三(可略)")
|
||||||
|
print("参数一为需要安装的容器,参数二为需要使用的wine,参数三为是否缓存(可略),三个参数位置不能颠倒")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
homePath = os.path.expanduser('~')
|
||||||
|
print('''
|
||||||
|
m m mmmmm
|
||||||
|
"m m" # #
|
||||||
|
# # #mmmm"
|
||||||
|
"mm" # #
|
||||||
|
## #mmmm"
|
||||||
|
|
||||||
|
|
||||||
|
''')
|
||||||
|
|
||||||
|
print("请选择以下的 Visual Basic Runtime 进行安装(不保证能正常安装运行)")
|
||||||
|
for i in range(0, len(netList)):
|
||||||
|
print(f"{i} Visual Basic Runtime {netList[i][0]}")
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
choose = input("请输入要选择的 Visual Basic Runtime 版本(输入“exit”退出):").lower()
|
||||||
|
if choose == "exit":
|
||||||
|
break
|
||||||
|
choose = int(choose)
|
||||||
|
except:
|
||||||
|
print("输入错误,请重新输入")
|
||||||
|
continue
|
||||||
|
if 0 <= choose and choose < len(netList):
|
||||||
|
break
|
||||||
|
if choose == "exit":
|
||||||
|
exit()
|
||||||
|
print(f"您选择了 Visual Basic Runtime {netList[choose][0]}")
|
||||||
|
if os.path.exists(f"{homePath}/.cache/deepin-wine-runner/vb/{netList[choose][2]}"):
|
||||||
|
print("已经缓存,使用本地版本")
|
||||||
|
os.system(f"WINEPREFIX='{sys.argv[1]}' {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/vb/{netList[choose][2]}'")
|
||||||
|
input("安装结束,按回车键退出")
|
||||||
|
exit()
|
||||||
|
print("开始下载")
|
||||||
|
os.system(f"rm -rf '{homePath}/.cache/deepin-wine-runner/vb/{netList[choose][2]}'")
|
||||||
|
os.system(f"mkdir -p '{homePath}/.cache/deepin-wine-runner/vb'")
|
||||||
|
os.system(f"aria2c -x 16 -s 16 -d '{homePath}/.cache/deepin-wine-runner/vb' -o '{netList[choose][2]}' \"{netList[choose][1]}\"")
|
||||||
|
os.system(f"WINEPREFIX='{sys.argv[1]}' {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/vb/{netList[choose][2]}'")
|
||||||
|
input("安装结束,按回车键退出")
|
Binary file not shown.
BIN
__pycache__/InstallVisualBasicRuntime.cpython-37.pyc
Normal file
BIN
__pycache__/InstallVisualBasicRuntime.cpython-37.pyc
Normal file
Binary file not shown.
@ -632,6 +632,13 @@ def InstallNetFramework():
|
|||||||
wineBottonPath = e1.currentText()
|
wineBottonPath = e1.currentText()
|
||||||
OpenTerminal(f"'{programPath}/InstallNetFramework.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}")
|
OpenTerminal(f"'{programPath}/InstallNetFramework.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}")
|
||||||
|
|
||||||
|
def InstallVB():
|
||||||
|
if e1.currentText() == "":
|
||||||
|
wineBottonPath = setting["DefultBotton"]
|
||||||
|
else:
|
||||||
|
wineBottonPath = e1.currentText()
|
||||||
|
OpenTerminal(f"'{programPath}/InstallVisualBasicRuntime.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}")
|
||||||
|
|
||||||
def InstallVisualStudioCPlusPlus():
|
def InstallVisualStudioCPlusPlus():
|
||||||
if e1.currentText() == "":
|
if e1.currentText() == "":
|
||||||
wineBottonPath = setting["DefultBotton"]
|
wineBottonPath = setting["DefultBotton"]
|
||||||
@ -1816,16 +1823,7 @@ exe路径\' 参数 \'
|
|||||||
<b>千万不要中断后不删除源的情况下 apt upgrade !!!</b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可
|
<b>千万不要中断后不删除源的情况下 apt upgrade !!!</b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可
|
||||||
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
|
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
|
||||||
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
|
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
|
||||||
updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版底层调用 bash,旧版任然使用旧版解析引擎)
|
updateThingsString = '''※1、新增 VB Runtime 组件安装工具
|
||||||
※2、修复缺失 wimtools 依赖导致无法正常安装的问题
|
|
||||||
※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题,并支持指定不同的包名和容器名
|
|
||||||
※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
|
|
||||||
※5、修复安装更多 Wine 终端调用问题和图标问题
|
|
||||||
※6、支持 openkylin
|
|
||||||
7、支持通过 exe 路径自动生成 Wine 容器路径
|
|
||||||
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
|
|
||||||
9、支持设置 wine 容器代理
|
|
||||||
10、自动配置脚本支持使用 --help 参数查看帮助
|
|
||||||
'''
|
'''
|
||||||
for i in information["Thank"]:
|
for i in information["Thank"]:
|
||||||
thankText += f"{i}\n"
|
thankText += f"{i}\n"
|
||||||
@ -2107,12 +2105,14 @@ wm1_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine
|
|||||||
wm1_3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 MSXML"))
|
wm1_3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 MSXML"))
|
||||||
wm1_4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 gecko"))
|
wm1_4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 gecko"))
|
||||||
wm1_5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 mono"))
|
wm1_5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 mono"))
|
||||||
|
wm1_7 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 Visual Basic Runtime"))
|
||||||
wm1_6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装其它运行库"))
|
wm1_6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装其它运行库"))
|
||||||
wm1.addAction(wm1_1)
|
wm1.addAction(wm1_1)
|
||||||
wm1.addAction(wm1_2)
|
wm1.addAction(wm1_2)
|
||||||
wm1.addAction(wm1_3)
|
wm1.addAction(wm1_3)
|
||||||
wm1.addAction(wm1_4)
|
wm1.addAction(wm1_4)
|
||||||
wm1.addAction(wm1_5)
|
wm1.addAction(wm1_5)
|
||||||
|
wm1.addAction(wm1_7)
|
||||||
wm1.addAction(wm1_6)
|
wm1.addAction(wm1_6)
|
||||||
wm2 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "在指定 Wine、容器运行基础应用"))
|
wm2 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "在指定 Wine、容器运行基础应用"))
|
||||||
wm2_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的控制面板"))
|
wm2_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的控制面板"))
|
||||||
@ -2188,6 +2188,7 @@ wm1_2.triggered.connect(lambda: threading.Thread(target=InstallVisualStudioCPlus
|
|||||||
wm1_3.triggered.connect(lambda: threading.Thread(target=InstallMSXML).start())
|
wm1_3.triggered.connect(lambda: threading.Thread(target=InstallMSXML).start())
|
||||||
wm1_4.triggered.connect(lambda: threading.Thread(target=InstallMonoGecko, args=["gecko"]).start())
|
wm1_4.triggered.connect(lambda: threading.Thread(target=InstallMonoGecko, args=["gecko"]).start())
|
||||||
wm1_5.triggered.connect(lambda: threading.Thread(target=InstallMonoGecko, args=["mono"]).start())
|
wm1_5.triggered.connect(lambda: threading.Thread(target=InstallMonoGecko, args=["mono"]).start())
|
||||||
|
wm1_7.triggered.connect(lambda: threading.Thread(target=InstallVB).start())
|
||||||
wm1_6.triggered.connect(lambda: threading.Thread(target=InstallOther).start())
|
wm1_6.triggered.connect(lambda: threading.Thread(target=InstallOther).start())
|
||||||
wm2_1.triggered.connect(lambda: RunWineProgram("control"))
|
wm2_1.triggered.connect(lambda: RunWineProgram("control"))
|
||||||
wm2_2.triggered.connect(lambda: RunWineProgram("iexplore' 'https://www.deepin.org"))
|
wm2_2.triggered.connect(lambda: RunWineProgram("iexplore' 'https://www.deepin.org"))
|
||||||
@ -2272,6 +2273,8 @@ help.addAction(h2)
|
|||||||
help.addAction(h3)
|
help.addAction(h3)
|
||||||
help.addAction(h4)
|
help.addAction(h4)
|
||||||
help.addSeparator()
|
help.addSeparator()
|
||||||
|
wikiHelp = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "程序 Wiki"))
|
||||||
|
help.addAction(wikiHelp)
|
||||||
videoHelp = help.addMenu(QtCore.QCoreApplication.translate("U", "视频教程"))
|
videoHelp = help.addMenu(QtCore.QCoreApplication.translate("U", "视频教程"))
|
||||||
easyHelp = QtWidgets.QAction("简易使用教程")
|
easyHelp = QtWidgets.QAction("简易使用教程")
|
||||||
buildHelp = QtWidgets.QAction("打包教程")
|
buildHelp = QtWidgets.QAction("打包教程")
|
||||||
@ -2296,6 +2299,7 @@ runStatusWebSize.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdg
|
|||||||
h2.triggered.connect(helps)
|
h2.triggered.connect(helps)
|
||||||
h3.triggered.connect(UpdateThings)
|
h3.triggered.connect(UpdateThings)
|
||||||
h4.triggered.connect(ThankWindow)
|
h4.triggered.connect(ThankWindow)
|
||||||
|
wikiHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io/wine-runner-wiki"))
|
||||||
easyHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/video/BV1ma411972Y"))
|
easyHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/video/BV1ma411972Y"))
|
||||||
buildHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/video/BV1EU4y1k7zr"))
|
buildHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/video/BV1EU4y1k7zr"))
|
||||||
h5.triggered.connect(UpdateWindow.ShowWindow)
|
h5.triggered.connect(UpdateWindow.ShowWindow)
|
||||||
|
Loading…
Reference in New Issue
Block a user