修复在arm安装运行库无法正常调用wine的问题

This commit is contained in:
gfdgd xi 2022-09-22 21:24:02 +08:00
parent 2454f926d0
commit 932ff67008
6 changed files with 18 additions and 18 deletions

View File

@ -48,7 +48,7 @@ def Download(wineBotton, dllName, urlPart, wine: str) -> bool:
except:
pass
os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/system32' -o '{dllName}' '{urlPart}'")
os.system(f"WINEPREFIX='{wineBotton}' '{wine}' reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v {os.path.splitext(dllName)[0]} /d native /f")
os.system(f"WINEPREFIX='{wineBotton}' {wine} reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v {os.path.splitext(dllName)[0]} /d native /f")
return 0
def exit():

View File

@ -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("写入缓存")

View File

@ -25,7 +25,7 @@ except:
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]}\"")
os.system(f"WINEPREFIX='{wineBotton}' {wine} msiexec /i \"/tmp/deepin-wine-runner-msxml/{msxmlList[id][2]}\"")
if __name__ == "__main__":
if "--help" in sys.argv:
@ -77,7 +77,7 @@ if __name__ == "__main__":
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("开始下载")
@ -85,5 +85,5 @@ if __name__ == "__main__":
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("安装结束,按回车键退出")

View File

@ -48,7 +48,7 @@ except:
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}'")
os.system(f"WINEPREFIX='{wineBotton}' {wine} '/tmp/deepin-wine-runner-net/{programName}'")
if __name__ == "__main__":
if "--help" in sys.argv:
@ -101,12 +101,12 @@ if __name__ == "__main__":
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}'")
input("安装结束,按回车键退出")
os.system(f"WINEPREFIX='{sys.argv[1]}' {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/.netframework/{programName}'")
input("安装结束,按回车键退出")

View File

@ -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()

View File

@ -38,7 +38,7 @@ def Download(wineBotton: str, id: int, wine: str) -> int:
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]}'")
os.system(f"WINEPREFIX='{wineBotton}' {wine} '/tmp/deepin-wine-runner-vcpp/{netList[id][2]}'")
if __name__ == "__main__":
if "--help" in sys.argv:
@ -83,12 +83,12 @@ if __name__ == "__main__":
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("安装结束,按回车键退出")