支持导入.7z包时自动移除部分特殊符号
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run

This commit is contained in:
gfdgd xi 2024-07-15 21:46:24 +08:00
parent e3c54ffc32
commit f1decf51d1
2 changed files with 10 additions and 1 deletions

View File

@ -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 应用无法正常打开**
**除非你有把握不会损坏容器**

View File

@ -144,8 +144,15 @@ def InstallOtherWine():
rfile = open(f"{programPath}/winelist.json", "r")
list = json.loads(rfile.read())
rfile.close()
# 创建映射
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}\"