From 5cb05e99563aff7e079e6fa30c0c5ee44eb8bbfe Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 11 Jul 2023 15:25:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E5=AE=89=E8=A3=85ex?= =?UTF-8?q?agear=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA=E4=BD=BF=E7=94=A8=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E5=99=A8=E5=B8=A6=E7=9A=84=E8=BF=90=E8=A1=8C=E5=BA=93?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E7=A8=8B=E5=BA=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mainwindow.py b/mainwindow.py index 75ce4be..73346be 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -2242,8 +2242,8 @@ def CheckWine(): canUseWine.append("基于 UOS box86 的 deepin-wine6-stable") if os.path.exists("/opt/exagear/bin/ubt_x64a64_al") and os.path.exists("/opt/deepin-wine6-stable/bin/wine"): canUseWine.append("基于 UOS exagear 的 deepin-wine6-stable") - if not os.system("which exagear") and os.path.exists("/opt/deepin-wine6-stable/bin/wine"): - canUseWine.append("基于 exagear 的 deepin-wine6-stable") + #if not os.system("which exagear") and os.path.exists("/opt/deepin-wine6-stable/bin/wine"): + #canUseWine.append("基于 exagear 的 deepin-wine6-stable") for i in wine.keys(): if not os.system(f"which '{wine[i]}'"): canUseWine.append(i) @@ -2391,13 +2391,9 @@ def CheckWine(): wine[f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-x86_64"] = f"{k[1]}{chrootProgramPath}/wine/{i}/bin/wine-x86_64" canUseWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-x86_64") untipsWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-x86_64") - for i in canUseWine[:]: - if os.path.exists(f"{programPath}/WineLib/usr/lib/ld-linux-x86-64.so.2"): - wine[f"使用运行器的运行库运行 {i}"] = f"bash '{programPath}/WineLib/run.sh' {wine[i]}" - canUseWine.append(f"使用运行器的运行库运行 {i}") - untipsWine.append(f"使用运行器的运行库运行 {i}") + except: - pass + traceback.print_exc() try: for i in os.listdir(f"{get_home()}/.deepinwine/"): if os.path.exists(f"{get_home()}/.deepinwine/{i}/bin/wine"): @@ -2407,7 +2403,12 @@ def CheckWine(): wine[f"{get_home()}/.deepinwine/{i}/bin/wine64"] = f"{get_home()}/.deepinwine/{i}/bin/wine64" canUseWine.append(f"{get_home()}/.deepinwine/{i}/bin/wine64") except: - pass + traceback.print_exc() + for i in canUseWine[:]: + if os.path.exists(f"{programPath}/WineLib/usr/lib/ld-linux-x86-64.so.2"): + wine[f"使用运行器的运行库运行 {i}"] = f"bash '{programPath}/WineLib/run.sh' {wine[i]}" + canUseWine.append(f"使用运行器的运行库运行 {i}") + untipsWine.append(f"使用运行器的运行库运行 {i}") except: traceback.print_exc() app = QtWidgets.QApplication(sys.argv)