mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2026-08-08 19:33:56 +08:00
Compare commits
2
Commits
10db5c042d
...
f1decf51d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1decf51d1 | ||
|
|
e3c54ffc32 |
@@ -11,6 +11,8 @@ Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程
|
||||
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
|
||||
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式
|
||||
|
||||
当前支持 amd64、arm64、mips64el、loong64(新世界)、loongarch64(旧世界)、riscv64
|
||||
|
||||
注:
|
||||
**在使用运行器时不要随便动 .deepinwine 下的容器,否则会导致安装的 wine 应用无法正常打开**
|
||||
**除非你有把握不会损坏容器**
|
||||
|
||||
+19
-10
@@ -112,7 +112,7 @@ class Ui_MainWindow(object):
|
||||
self.delButton.setText(_translate("MainWindow", ">>"))
|
||||
self.unzip.setText(_translate("MainWindow", "不解压Wine资源文件"))
|
||||
self.deleteZip.setText(_translate("MainWindow", "删除下载的资源包,只解压保留(两个选项都选相互抵消)"))
|
||||
self.addOtherWine.setText(_translate("MainWindow", "导入自己的Wine"))
|
||||
self.addOtherWine.setText(_translate("MainWindow", "导入 Wine 7z 包"))
|
||||
self.downloadWineFromCloudDisk.setText(_translate("MainWindow", "从网盘下载 Wine"))
|
||||
|
||||
def ReadLocalInformation():
|
||||
@@ -136,7 +136,7 @@ def ReadLocalInformation():
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
def InstallOtherWine():
|
||||
path = QtWidgets.QFileDialog.getOpenFileName(window, "选择 Wine", os.getenv("~"), "wine(wine);;wine64(wine64);;全部文件(*.*)")
|
||||
path = QtWidgets.QFileDialog.getOpenFileName(window, "选择 Wine 运行器 Wine 7z 包", os.getenv("~"), "Wine 运行器 Wine 7z 包(*.7z);;全部文件(*.*)")
|
||||
if path[0] == "" or not path[1]:
|
||||
return
|
||||
try:
|
||||
@@ -144,14 +144,23 @@ def InstallOtherWine():
|
||||
rfile = open(f"{programPath}/winelist.json", "r")
|
||||
list = json.loads(rfile.read())
|
||||
rfile.close()
|
||||
# 创建映射
|
||||
name = os.path.basename(os.path.dirname(os.path.dirname(path[0])))
|
||||
if name == "" or name == None:
|
||||
name = f"useradd-wine-{random.randint(0, 99999)}"
|
||||
#binPath = os.path.dirname(os.path.dirname(path[0]))
|
||||
os.makedirs(f"{programPath}/{name}/bin")
|
||||
if os.system(f"ln -s '{path[0]}' '{programPath}/{name}/bin/wine'") != 0:
|
||||
QtWidgets.QMessageBox.critical(window, "新建wine映射失败")
|
||||
name = os.path.splitext(os.path.basename(path[0]))[0]
|
||||
removeSymbol = ["(", ")", "(", ")", " ", "!", "@", "#",
|
||||
"$", "%", "^", "&", "*", "=", "[", "]",
|
||||
"{", "}", "\\", "/", "|", "?",
|
||||
"<", ">", "·", "「", ";", ":", ":",
|
||||
"?", "《", "》", ",", "。", ",", ".",
|
||||
"`", "~", "~", "、"]
|
||||
for i in removeSymbol:
|
||||
name.replace(i, "")
|
||||
unpackPath = f"{programPath}/{name}"
|
||||
shellCommand = f"""mkdir -p \"{unpackPath}\"
|
||||
7z x -y \"{path[0]}\" -o\"{unpackPath}\"
|
||||
"""
|
||||
shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
|
||||
shellFile.write(shellCommand)
|
||||
shellFile.close()
|
||||
OpenTerminal("bash /tmp/depein-wine-runner-wine-install.sh")
|
||||
# C++ 版注释:不直接用 readwrite 是因为不能覆盖写入
|
||||
file = open(f"{programPath}/winelist.json", "w")
|
||||
list.append(name)
|
||||
|
||||
Reference in New Issue
Block a user