修改:     deb/DEBIAN/control
	修改:     deb/opt/apps/deepin-wine-runner/deepin-wine-packager.py
	修改:     deb/opt/apps/deepin-wine-runner/deepin-wine-runner
	修改:     deb/opt/apps/deepin-wine-runner/information.json
	修改:     deb/opt/apps/deepin-wine-runner/package-script.zip
	修改:     deb/opt/apps/deepin-wine-runner/wine/installwine
	修改:     information.json
	修改:     mainwindow.py
	修改:     package-script.zip
	修改:     package-script/information.json
	修改:     wine/installwine
This commit is contained in:
gfdgd xi 2022-10-02 14:52:32 +08:00
parent 5edb8188b9
commit f9f8180c60
11 changed files with 213 additions and 68 deletions

View File

@ -1,5 +1,5 @@
Package: spark-deepin-wine-runner Package: spark-deepin-wine-runner
Version: 2.2.1 Version: 2.3.0~alpha1
Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢 Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner
Architecture: all Architecture: all

View File

@ -818,6 +818,7 @@ fi
# 设置容器 # 设置容器
############### ###############
self.label.emit("正在设置 wine 容器") self.label.emit("正在设置 wine 容器")
if e6_text.text()[-3: ] != ".7z":
os.chdir(programPath) os.chdir(programPath)
if cleanBottonByUOS.isChecked(): if cleanBottonByUOS.isChecked():
self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'") self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'")
@ -858,8 +859,8 @@ fi
############### ###############
self.label.emit("正在打包 wine 容器") self.label.emit("正在打包 wine 容器")
# 都有 7z 了为什么要打包呢? # 都有 7z 了为什么要打包呢?
if e1_text.text()[-3: ] == ".7z": if e6_text.text()[-3: ] == ".7z":
shutil.copy(e1_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z") shutil.copy(e6_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z")
else: else:
self.run_command("7z a {}/opt/apps/{}/files/files.7z {}/*".format(debPackagePath, e1_text.text(), b)) self.run_command("7z a {}/opt/apps/{}/files/files.7z {}/*".format(debPackagePath, e1_text.text(), b))
############### ###############
@ -1076,6 +1077,8 @@ def ReadDeb(unzip = False):
# 获取路径 # 获取路径
debPath = QtWidgets.QFileDialog.getOpenFileName(window, "读取 deb 包", get_home(), "deb包(*.deb);;所有文件(*.*)")[0] debPath = QtWidgets.QFileDialog.getOpenFileName(window, "读取 deb 包", get_home(), "deb包(*.deb);;所有文件(*.*)")[0]
print(debPath) print(debPath)
if debPath == "":
return
# 分类讨论 # 分类讨论
path = f"/tmp/deb-unzip-{random.randint(0, 1000)}" path = f"/tmp/deb-unzip-{random.randint(0, 1000)}"
# 新建文件夹 # 新建文件夹
@ -1234,6 +1237,66 @@ def ReadDeb(unzip = False):
wineVersion.setCurrentText(wineValue[dependsItem]) wineVersion.setCurrentText(wineValue[dependsItem])
except: except:
print(f"忽略行:{i}") print(f"忽略行:{i}")
elif os.path.exists(f"{path}/opt/apps/{package}/files/run_with_box86.sh"):
file = open(f"{path}/opt/apps/{package}/files/run_with_box86.sh", "r")
items = file.read().splitlines()
file.close()
for i in items:
# 按行解析
if i.replace(" ", "").replace("\n", "") == "":
# 空行,忽略
continue
# 忽略 export
line = i.replace("export ", "")
# 忽略注释
if "#" in line:
line = line[:line.index("#")]
# 判断是否合法
try:
name = line[:line.index("=")].strip()
value = line[line.index("=") + 1:].replace("\"", "").strip()
#lnkMap[name].setText(value)
if name in lnkMap:
lnkMap[name].setText(value)
continue
# 其它的特殊情况判断
if name == "START_SHELL_PATH" and value == "/opt/deepinwine/tools/spark_run_v4.sh":
# helper
chooseWineHelperValue.setChecked(True)
if name == "APPRUN_CMD" and value in wineValue:
wineVersion.setCurrentText(wineValue[dependsItem])
except:
print(f"忽略行:{i}")
elif os.path.exists(f"{path}/opt/apps/{package}/files/run_with_exagear.sh"):
file = open(f"{path}/opt/apps/{package}/files/run_with_exagear.sh", "r")
items = file.read().splitlines()
file.close()
for i in items:
# 按行解析
if i.replace(" ", "").replace("\n", "") == "":
# 空行,忽略
continue
# 忽略 export
line = i.replace("export ", "")
# 忽略注释
if "#" in line:
line = line[:line.index("#")]
# 判断是否合法
try:
name = line[:line.index("=")].strip()
value = line[line.index("=") + 1:].replace("\"", "").strip()
#lnkMap[name].setText(value)
if name in lnkMap:
lnkMap[name].setText(value)
continue
# 其它的特殊情况判断
if name == "START_SHELL_PATH" and value == "/opt/deepinwine/tools/spark_run_v4.sh":
# helper
chooseWineHelperValue.setChecked(True)
if name == "APPRUN_CMD" and value in wineValue:
wineVersion.setCurrentText(wineValue[dependsItem])
except:
print(f"忽略行:{i}")

View File

@ -165,9 +165,9 @@ class Runexebutton_threading(QtCore.QThread):
else: else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -288,13 +288,13 @@ def make_desktop_on_launcher():
else: else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
value = "" value = ""
if e2.currentText()[:2].upper() == "C:": if e2.currentText()[:2].upper() == "C:":
@ -348,9 +348,9 @@ def make_desktop_on_desktop():
else: else:
wineBottonPath = e1.currentText() wineBottonPath = e1.currentText()
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -423,9 +423,14 @@ def ReStartProgram():
python = sys.executable python = sys.executable
os.execl(python, python, * sys.argv) os.execl(python, python, * sys.argv)
def KillAllProgram():
pass
def KillProgram(): def KillProgram():
os.system(f"killall {wine[o1.currentText()]} -9") os.system(f"killall {wine[o1.currentText()]} -9")
os.system("killall winedbg -9") os.system("killall winedbg -9")
exeName = os.path.basename(e2.currentText())
os.system(f"killall {exeName} -9")
def InstallWine(): def InstallWine():
threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start() threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start()
@ -475,9 +480,9 @@ class RunWineProgramThread(QtCore.QThread):
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'") os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'")
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -514,7 +519,7 @@ runProgram = None
def RunWineProgram(wineProgram, history = False, Disbled = True): def RunWineProgram(wineProgram, history = False, Disbled = True):
global runProgram global runProgram
DisableButton(True) DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 box86 的 deepin-wine6-stable": if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False) DisableButton(False)
return return
@ -539,9 +544,9 @@ class RunWinetricksThread(QtCore.QThread):
if not setting["Debug"]: if not setting["Debug"]:
option += "WINEDEBUG=-all " option += "WINEDEBUG=-all "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -570,11 +575,11 @@ runWinetricks = None
def RunWinetricks(): def RunWinetricks():
global runWinetricks global runWinetricks
DisableButton(True) DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 box86 的 deepin-wine6-stable": if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False) DisableButton(False)
return return
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -759,6 +764,18 @@ def InstallWineFont():
def WineRunnerBugUpload(): def WineRunnerBugUpload():
threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start() threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start()
def SetHttpProxy():
QtWidgets.QMessageBox.information(window, "提示", "请在下面的对话框正确输入内容以便设置代理")
proxyServerAddress = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器地址")[0]
port = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器端口")[0]
if proxyServerAddress == "" or port == "":
return
RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000001 '/f")
RunWineProgram(f"reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyServer /d '{proxyServerAddress}:{port}' '/f")
def DisbledHttpProxy():
RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000000 '/f")
def GetScreenSize(): def GetScreenSize():
screenInformation = [] screenInformation = []
# 使用 xrandr 进行筛选 # 使用 xrandr 进行筛选
@ -1594,7 +1611,7 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 如果要添加其他 wine请在字典添加其名称和执行路径 # 如果要添加其他 wine请在字典添加其名称和执行路径
try: try:
wine = { wine = {
"基于 box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ", "基于 UOS box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ",
"基于 exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ", "基于 exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ",
"deepin-wine6 stable": "deepin-wine6-stable", "deepin-wine6 stable": "deepin-wine6-stable",
"deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine5 stable": "deepin-wine5-stable",
@ -1606,10 +1623,10 @@ try:
"ukylin-wine": "ukylin-wine", "ukylin-wine": "ukylin-wine",
"基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'" "基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'"
} }
untipsWine = ["基于 box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"] untipsWine = ["基于 UOS box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"]
canUseWine = [] canUseWine = []
if os.path.exists("/opt/deepin-box86/box86"): if os.path.exists("/opt/deepin-box86/box86"):
canUseWine.append("基于 box86 的 deepin-wine6-stable") canUseWine.append("基于 UOS box86 的 deepin-wine6-stable")
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
canUseWine.append("基于 exagear 的 deepin-wine6-stable") canUseWine.append("基于 exagear 的 deepin-wine6-stable")
for i in wine.keys(): for i in wine.keys():
@ -1634,8 +1651,14 @@ try:
value = "" value = ""
try: try:
if os.path.exists("/opt/deepin-box86/box86"): if os.path.exists("/opt/deepin-box86/box86"):
name = "基于 box86 的 " name = "基于 UOS box86 的 "
value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 " value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 "
if os.system("which box86") == 0:
name = "基于 box86 的 "
value = f"box86 "
if os.system("which box64") == 0:
name = "基于 box64 的 "
value = f"box64 "
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
name = "基于 exagear 的 " name = "基于 exagear 的 "
value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- " value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- "
@ -1797,8 +1820,11 @@ updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版
※2、修复缺失 wimtools 依赖导致无法正常安装的问题 ※2、修复缺失 wimtools 依赖导致无法正常安装的问题
※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题并支持指定不同的包名和容器名 ※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题并支持指定不同的包名和容器名
※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题 ※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
5、支持通过 exe 路径自动生成 Wine 容器路径 ※5、修复安装更多 Wine 终端调用问题和图标问题
6、支持禁用/启用 wine 容器是否生成快捷方式的功能 ※6、支持 openkylin
7、支持通过 exe 路径自动生成 Wine 容器路径
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
9、支持设置 wine 容器代理
''' '''
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
@ -2132,6 +2158,16 @@ enabledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translat
disbledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器生成快捷方式")) disbledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器生成快捷方式"))
settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink) settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink)
settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink) settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink)
settingWineCrashDialog = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用指定 wine 容器崩溃提示窗口"))
disbledWineCrashDialog = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器崩溃提示窗口"))
enabledWineCrashDialog = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "启用指定 wine 容器崩溃提示窗口"))
settingWineCrashDialog.addAction(disbledWineCrashDialog)
settingWineCrashDialog.addAction(enabledWineCrashDialog)
settingHttpProxy = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "设置指定 Wine 容器代理"))
enabledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置指定 wine 容器的代理"))
disbledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器的代理"))
settingHttpProxy.addAction(enabledHttpProxy)
settingHttpProxy.addAction(disbledHttpProxy)
w1.triggered.connect(OpenWineBotton) w1.triggered.connect(OpenWineBotton)
w2.triggered.connect(InstallWineFont) w2.triggered.connect(InstallWineFont)
w3.triggered.connect(OpenWineFontPath) w3.triggered.connect(OpenWineFontPath)
@ -2167,6 +2203,10 @@ uninstallDxvk.triggered.connect(UninstallDXVK)
deleteDesktopIcon.triggered.connect(DeleteDesktopIcon) deleteDesktopIcon.triggered.connect(DeleteDesktopIcon)
enabledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f")) enabledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f"))
disbledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f")) disbledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f"))
disbledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000000 '/f"))
enabledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000001 '/f"))
enabledHttpProxy.triggered.connect(SetHttpProxy)
disbledHttpProxy.triggered.connect(DisbledHttpProxy)
virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)")) virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)"))
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用")) v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))

View File

@ -1,5 +1,5 @@
{ {
"Version": "2.2.1", "Version": "2.3.0~alpha1",
"Thank": [ "Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948", "感谢 @zhangs https://bbs.deepin.org/post/227948",

View File

@ -178,7 +178,7 @@ class DownloadThread(QtCore.QThread):
if self.downloadUnzip: if self.downloadUnzip:
path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}" path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
shellCommand += f"""mkdir -p \"{path}\" shellCommand += f"""mkdir -p \"{path}\"
7z x \"{savePath}\" -o\"{path}\" 7z x -y \"{savePath}\" -o\"{path}\"
""" """
if self.downloadDeleteZip: if self.downloadDeleteZip:
shellCommand += f"rm -rf \"{savePath}\"\n" shellCommand += f"rm -rf \"{savePath}\"\n"
@ -287,6 +287,7 @@ if __name__ == "__main__":
# 窗口构建 # 窗口构建
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
ui = Ui_MainWindow() ui = Ui_MainWindow()
window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
ui.setupUi(window) ui.setupUi(window)
window.show() window.show()
# 连接信号 # 连接信号

View File

@ -1,5 +1,5 @@
{ {
"Version": "2.2.1", "Version": "2.3.0~alpha1",
"Thank": [ "Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948", "感谢 @zhangs https://bbs.deepin.org/post/227948",

View File

@ -165,9 +165,9 @@ class Runexebutton_threading(QtCore.QThread):
else: else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -288,13 +288,13 @@ def make_desktop_on_launcher():
else: else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
value = "" value = ""
if e2.currentText()[:2].upper() == "C:": if e2.currentText()[:2].upper() == "C:":
@ -348,9 +348,9 @@ def make_desktop_on_desktop():
else: else:
wineBottonPath = e1.currentText() wineBottonPath = e1.currentText()
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -423,9 +423,14 @@ def ReStartProgram():
python = sys.executable python = sys.executable
os.execl(python, python, * sys.argv) os.execl(python, python, * sys.argv)
def KillAllProgram():
pass
def KillProgram(): def KillProgram():
os.system(f"killall {wine[o1.currentText()]} -9") os.system(f"killall {wine[o1.currentText()]} -9")
os.system("killall winedbg -9") os.system("killall winedbg -9")
exeName = os.path.basename(e2.currentText())
os.system(f"killall {exeName} -9")
def InstallWine(): def InstallWine():
threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start() threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start()
@ -475,9 +480,9 @@ class RunWineProgramThread(QtCore.QThread):
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'") os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'")
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -514,7 +519,7 @@ runProgram = None
def RunWineProgram(wineProgram, history = False, Disbled = True): def RunWineProgram(wineProgram, history = False, Disbled = True):
global runProgram global runProgram
DisableButton(True) DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 box86 的 deepin-wine6-stable": if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False) DisableButton(False)
return return
@ -539,9 +544,9 @@ class RunWinetricksThread(QtCore.QThread):
if not setting["Debug"]: if not setting["Debug"]:
option += "WINEDEBUG=-all " option += "WINEDEBUG=-all "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -570,11 +575,11 @@ runWinetricks = None
def RunWinetricks(): def RunWinetricks():
global runWinetricks global runWinetricks
DisableButton(True) DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 box86 的 deepin-wine6-stable": if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False) DisableButton(False)
return return
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
@ -759,6 +764,18 @@ def InstallWineFont():
def WineRunnerBugUpload(): def WineRunnerBugUpload():
threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start() threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start()
def SetHttpProxy():
QtWidgets.QMessageBox.information(window, "提示", "请在下面的对话框正确输入内容以便设置代理")
proxyServerAddress = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器地址")[0]
port = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器端口")[0]
if proxyServerAddress == "" or port == "":
return
RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000001 '/f")
RunWineProgram(f"reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyServer /d '{proxyServerAddress}:{port}' '/f")
def DisbledHttpProxy():
RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000000 '/f")
def GetScreenSize(): def GetScreenSize():
screenInformation = [] screenInformation = []
# 使用 xrandr 进行筛选 # 使用 xrandr 进行筛选
@ -1594,7 +1611,7 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 如果要添加其他 wine请在字典添加其名称和执行路径 # 如果要添加其他 wine请在字典添加其名称和执行路径
try: try:
wine = { wine = {
"基于 box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ", "基于 UOS box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ",
"基于 exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ", "基于 exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ",
"deepin-wine6 stable": "deepin-wine6-stable", "deepin-wine6 stable": "deepin-wine6-stable",
"deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine5 stable": "deepin-wine5-stable",
@ -1606,10 +1623,10 @@ try:
"ukylin-wine": "ukylin-wine", "ukylin-wine": "ukylin-wine",
"基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'" "基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'"
} }
untipsWine = ["基于 box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"] untipsWine = ["基于 UOS box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"]
canUseWine = [] canUseWine = []
if os.path.exists("/opt/deepin-box86/box86"): if os.path.exists("/opt/deepin-box86/box86"):
canUseWine.append("基于 box86 的 deepin-wine6-stable") canUseWine.append("基于 UOS box86 的 deepin-wine6-stable")
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
canUseWine.append("基于 exagear 的 deepin-wine6-stable") canUseWine.append("基于 exagear 的 deepin-wine6-stable")
for i in wine.keys(): for i in wine.keys():
@ -1634,8 +1651,14 @@ try:
value = "" value = ""
try: try:
if os.path.exists("/opt/deepin-box86/box86"): if os.path.exists("/opt/deepin-box86/box86"):
name = "基于 box86 的 " name = "基于 UOS box86 的 "
value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 " value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 "
if os.system("which box86") == 0:
name = "基于 box86 的 "
value = f"box86 "
if os.system("which box64") == 0:
name = "基于 box64 的 "
value = f"box64 "
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
name = "基于 exagear 的 " name = "基于 exagear 的 "
value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- " value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- "
@ -1797,8 +1820,11 @@ updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版
2修复缺失 wimtools 依赖导致无法正常安装的问题 2修复缺失 wimtools 依赖导致无法正常安装的问题
3修复基于生态适配活动脚本打包器对话框过多影响使用的问题并支持指定不同的包名和容器名 3修复基于生态适配活动脚本打包器对话框过多影响使用的问题并支持指定不同的包名和容器名
47z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题 47z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
5支持通过 exe 路径自动生成 Wine 容器路径 5修复安装更多 Wine 终端调用问题和图标问题
6支持禁用/启用 wine 容器是否生成快捷方式的功能 6支持 openkylin
7支持通过 exe 路径自动生成 Wine 容器路径
8支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
9支持设置 wine 容器代理
''' '''
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
@ -2132,6 +2158,16 @@ enabledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translat
disbledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器生成快捷方式")) disbledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器生成快捷方式"))
settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink) settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink)
settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink) settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink)
settingWineCrashDialog = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用指定 wine 容器崩溃提示窗口"))
disbledWineCrashDialog = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器崩溃提示窗口"))
enabledWineCrashDialog = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "启用指定 wine 容器崩溃提示窗口"))
settingWineCrashDialog.addAction(disbledWineCrashDialog)
settingWineCrashDialog.addAction(enabledWineCrashDialog)
settingHttpProxy = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "设置指定 Wine 容器代理"))
enabledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置指定 wine 容器的代理"))
disbledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器的代理"))
settingHttpProxy.addAction(enabledHttpProxy)
settingHttpProxy.addAction(disbledHttpProxy)
w1.triggered.connect(OpenWineBotton) w1.triggered.connect(OpenWineBotton)
w2.triggered.connect(InstallWineFont) w2.triggered.connect(InstallWineFont)
w3.triggered.connect(OpenWineFontPath) w3.triggered.connect(OpenWineFontPath)
@ -2167,6 +2203,10 @@ uninstallDxvk.triggered.connect(UninstallDXVK)
deleteDesktopIcon.triggered.connect(DeleteDesktopIcon) deleteDesktopIcon.triggered.connect(DeleteDesktopIcon)
enabledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f")) enabledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f"))
disbledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f")) disbledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f"))
disbledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000000 '/f"))
enabledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000001 '/f"))
enabledHttpProxy.triggered.connect(SetHttpProxy)
disbledHttpProxy.triggered.connect(DisbledHttpProxy)
virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)")) virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)"))
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用")) v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))

Binary file not shown.

View File

@ -1,3 +1,3 @@
{ {
"Version": "2.2.1" "Version": "2.3.0~alpha1"
} }

View File

@ -178,7 +178,7 @@ class DownloadThread(QtCore.QThread):
if self.downloadUnzip: if self.downloadUnzip:
path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}" path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
shellCommand += f"""mkdir -p \"{path}\" shellCommand += f"""mkdir -p \"{path}\"
7z x \"{savePath}\" -o\"{path}\" 7z x -y \"{savePath}\" -o\"{path}\"
""" """
if self.downloadDeleteZip: if self.downloadDeleteZip:
shellCommand += f"rm -rf \"{savePath}\"\n" shellCommand += f"rm -rf \"{savePath}\"\n"
@ -287,6 +287,7 @@ if __name__ == "__main__":
# 窗口构建 # 窗口构建
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
ui = Ui_MainWindow() ui = Ui_MainWindow()
window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
ui.setupUi(window) ui.setupUi(window)
window.show() window.show()
# 连接信号 # 连接信号