新增foxpro安装器

This commit is contained in:
gfdgd xi 2023-07-11 10:44:35 +08:00
parent 70014b29ef
commit a85a7aeb0c
4 changed files with 127 additions and 6 deletions

105
InstallFoxpro.py Executable file
View File

@ -0,0 +1,105 @@
#!/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 updatekiller
import req as requests
try:
sourcesList = [
"http://Visual FoxPro.wine-runner.gfdgdxi.top/list.json",
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/Visual FoxPro/list.json"
]
change = False
for i in sourcesList:
try:
netList = json.loads(requests.get(i).text)
change = True
break
except:
pass
if not change:
netList = json.loads(requests.get(sourcesList[0]).text)
except:
print("使用离线列表")
netList = [
["3.0 Runtime Service Pack 1", "http://FoxPro.wine-runner.gfdgdxi.top/VFP3SP1RT.exe", "VFP3SP1RT.exe"],
["5.0 Runtime Service Pack 1", "http://FoxPro.wine-runner.gfdgdxi.top/VFP5SP1RT.exe", "VFP5SP1RT.exe"],
["6.0 Runtime Service Pack 5", "http://FoxPro.wine-runner.gfdgdxi.top/VFP6SP5RT.exe", "VFP6SP5RT.exe"],
["7.0 Runtime Service Pack 0", "http://FoxPro.wine-runner.gfdgdxi.top/VFP7SP0RT.exe", "VFP7SP0RT.exe"],
["7.0 Runtime Service Pack 1", "http://FoxPro.wine-runner.gfdgdxi.top/VFP7SP1RT.exe", "VFP7SP1RT.exe"],
["8.0 Runtime Service Pack 0", "http://FoxPro.wine-runner.gfdgdxi.top/VFP8SP0RT.exe", "VFP8SP0RT.exe"],
["8.0 Runtime Service Pack 1", "http://FoxPro.wine-runner.gfdgdxi.top/VFP8SP1RT.exe", "VFP8SP1RT.exe"],
["9.0 Runtime Service Pack 1", "http://FoxPro.wine-runner.gfdgdxi.top/VFP9SP1RT.exe", "VFP9SP1RT.exe"],
["9.0 Runtime Service Pack 2 with Hotfixes", "http://FoxPro.wine-runner.gfdgdxi.top/VFP9SP2RT.exe", "VFP9SP2RT.exe"]
]
def Download(wineBotton: str, id: int, wine: str) -> int:
try:
os.remove(f"/tmp/deepin-wine-runner-FoxPro/{netList[id][2]}")
except:
pass
os.system(f"aria2c -x 16 -s 16 -d '/tmp/deepin-wine-runner-FoxPro' -o '{netList[id][2]}' \"{netList[id][1]}\"")
return os.system(f"WINEPREFIX='{wineBotton}' {wine} '/tmp/deepin-wine-runner-FoxPro/{netList[id][2]}'")
if __name__ == "__main__":
if "--help" in sys.argv:
print("作者gfdgd xi")
print("版本1.0.0")
print("本程序可以更方便的在 wine 容器中安装 Visual FoxPro")
sys.exit()
if len(sys.argv) <= 2 or sys.argv[1] == "" or sys.argv[2] == "":
print("您未指定需要安装 Visual FoxPro 的容器和使用的 wine无法继续")
print("参数:")
print("XXX 参数一 参数二 参数三(可略)")
print("参数一为需要安装的容器参数二为需要使用的wine参数三为是否缓存可略三个参数位置不能颠倒")
sys.exit()
homePath = os.path.expanduser('~')
print('''
mmmmmm mmmmm
# mmm m m # "# m mm mmm
#mmmmm #" "# #m# #mmm#" #" " #" "#
# # # m#m # # # #
# "#m#" m" "m # # "#m#"
''')
print("请选择以下的 Visual FoxPro 进行安装(不保证能正常安装运行)")
for i in range(0, len(netList)):
print(f"{i} Visual FoxPro {netList[i][0]}")
while True:
try:
choose = input("请输入要选择的 Visual FoxPro 版本输入“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 FoxPro {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]}'")
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]}'")
input("安装结束,按回车键退出")

View File

@ -50,6 +50,8 @@ package:
rm -rfv deb/opt/apps/deepin-wine-runner/wine/winelist.json
cp -rv req deb/opt/apps/deepin-wine-runner
cp -rv pardus-chroot deb/opt/apps/deepin-wine-runner
cp -rv WineLib deb/opt/apps/deepin-wine-runner
cp -rv InstallFoxpro.py deb/opt/apps/deepin-wine-runner
cp -rv BuildDesktop.py deb/opt/apps/deepin-wine-runner
cp -rv ChangePassword.sh deb/opt/apps/deepin-wine-runner
cp -rv trans deb/opt/apps/deepin-wine-runner

View File

@ -9,4 +9,6 @@ fi
sudo rm -rfv lib
sudo rm -rfv lib64
sudo rm -rfv usr
sudo chmod 777 -Rv .
sudo chmod 777 -Rv .
echo 删除完成!按回车键退出
read

View File

@ -899,6 +899,13 @@ def InstallVB():
wineBottonPath = e1.currentText()
OpenTerminal(f"'{programPath}/InstallVisualBasicRuntime.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}")
def InstallFoxPro():
if e1.currentText() == "":
wineBottonPath = setting["DefultBotton"]
else:
wineBottonPath = e1.currentText()
OpenTerminal(f"'{programPath}/InstallFoxpro.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}")
def InstallVisualStudioCPlusPlus():
if e1.currentText() == "":
wineBottonPath = setting["DefultBotton"]
@ -2455,13 +2462,15 @@ updateThingsString = transla.transe("U", '''※1、简易打包器支持选择 W
6更换 Box86 源并支持安装 Box64如果为 aarch64 架构
7新增 Wine 自建源支持 Debian10Deepin20
8修改 WineHQ 安装器使其支持选择国内清华大学镜像源或 WineHQ 官方源
9新增自动构建https://github.com/gfdgd-xi/deep-wine-runner/actions/workflows/auto-building.yml只供尝鲜
10新增 Wine 日构建安装更多 Wine处可以获取目前有 i386amd64i386+amd64amd64+wow64 modeaarch64
11优化容器清理脚本
12修复部分组件没完全换源的问题部分组件支持自动换可用源''')
9新增 Visual FoxPro 安装器
10新增安装局部运行库以解决部分低版本系统运行高版本 Wine 的问题且不与其他运行库和兼容层冲突
11新增自动构建https://github.com/gfdgd-xi/deep-wine-runner/actions/workflows/auto-building.yml只供尝鲜
12新增 Wine 日构建安装更多 Wine处可以获取目前有 i386amd64i386+amd64amd64+wow64 modeaarch64
13优化容器清理脚本
14修复部分组件没完全换源的问题部分组件支持自动换可用源''')
for i in information["Thank"]:
thankText += f"{i}\n"
updateTime = "2023年07月06"
updateTime = "2023年07月11"
aboutProgram = transla.transe("U", """<p>Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序内置了对Wine图形化的支持、各种Wine工具、自制的Wine程序打包器和运行库安装工具等。</p>
<p>它同时还内置了基于VirtualBox制作的专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装创建分区等操作</p>
<pre>
@ -2788,6 +2797,7 @@ wineOption.addSeparator()
wm1 = wineOption.addMenu(transla.transe("U", "在指定 Wine、容器安装组件"))
wm1_1 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 .net framework"))
wm1_2 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 Visual Studio C++"))
wm1_8 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 Visual FoxPro"))
wm1_3 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 MSXML"))
wm1_4 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 gecko"))
wm1_5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("mono"), transla.transe("U", "在指定wine、指定容器安装 mono"))
@ -2795,6 +2805,7 @@ wm1_7 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安
wm1_6 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装其它运行库"))
wm1.addAction(wm1_1)
wm1.addAction(wm1_2)
wm1.addAction(wm1_8)
wm1.addAction(wm1_3)
wm1.addAction(wm1_4)
wm1.addAction(wm1_5)
@ -2902,6 +2913,7 @@ w10.triggered.connect(SetDeepinFileDialogRecovery)
w11.triggered.connect(lambda: RunWinetricks())
wm1_1.triggered.connect(lambda: threading.Thread(target=InstallNetFramework).start())
wm1_2.triggered.connect(lambda: threading.Thread(target=InstallVisualStudioCPlusPlus).start())
wm1_8.triggered.connect(lambda: threading.Thread(target=InstallFoxPro).start())
wm1_3.triggered.connect(lambda: threading.Thread(target=InstallMSXML).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())