From 56eaff9dfbc8df5f6982a18fe221e94ae82c43d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B3=A8=E6=84=8F=E7=94=A8=E6=88=B7?= <2915289604@qq.com> Date: Tue, 30 Aug 2022 22:06:56 +0800 Subject: [PATCH] =?UTF-8?q?Bail=E4=BF=AE=E6=94=B9=EF=BC=9A=20=E5=B0=86?= =?UTF-8?q?=E4=BB=A5=E4=B8=8B5=E4=B8=AA=E5=87=BD=E6=95=B0=E7=9A=84deepin-t?= =?UTF-8?q?erminal=E7=9A=84"-C"=E5=8F=82=E6=95=B0=E6=94=B9=E4=B8=BA"-e"?= =?UTF-8?q?=EF=BC=8C=20=E8=A7=A3=E5=86=B3=E4=BA=86BuildRootUengineImage()?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E6=9C=AA=E8=BE=93=E5=85=A5=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=9B=9E=E8=BD=A6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/mainwindow.py b/mainwindow.py index fcd01b7..4287809 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -411,24 +411,30 @@ def GetApkPackageName(apkFilePath: "apk 所在路径")->"获取 apk 包名": line = line.replace(" ", "") return line +''' +Bail修改: +将以下5个函数的deepin-terminal的"-C"参数改为"-e", +解决了BuildRootUengineImage()函数未输入密码自动回车的bug +''' def InstallRootUengineImage(): if not os.path.exists: os.mkdir("/tmp/uengine-runner") write_txt("/tmp/uengine-runner/install.sh", "sudo dpkg -i /tmp/uengine-runner/u*.deb\nsudo apt install -f") - threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C \"wget -P '/tmp/uengine-runner' 'https://hub.fastgit.xyz/gfdgd-xi/uengine-runner/releases/download/U1.2.15/uengine-android-image_1.2.15_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'\""]).start() + threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e \"wget -P '/tmp/uengine-runner' 'https://hub.fastgit.xyz/gfdgd-xi/uengine-runner/releases/download/U1.2.15/uengine-android-image_1.2.15_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'\""]).start() def UengineUbuntuInstall(): - threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C \"bash '{programPath + '/uengine-installer'}'\""]).start() + threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e \"bash '{programPath + '/uengine-installer'}'\""]).start() def UbuntuInstallUengine(): - threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C \"bash '{programPath + '/uengine-installer'}'\""]).start() + threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e \"bash '{programPath + '/uengine-installer'}'\""]).start() def BuildRootUengineImage(): - threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -C \"bash '{programPath}/root-uengine.sh'\""]).start() + threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e \"bash '{programPath}/root-uengine.sh'\""]).start() def ReinstallUengineImage(): threading.Thread(target=os.system, args=[f"'{programPath}/launch.sh' deepin-terminal -e ''pkexec apt reinstall uengine-android-image -y"]).start() + # 生成 uengine 启动文件到桌面 def BuildUengineDesktop(packageName: "软件包名", activityName: "activity", showName: "显示名称", iconPath: "程序图标所在目录", savePath:".desktop 文件保存路径", choose="")->"生成 uengine 启动文件到桌面": if showName == "" or showName == None: @@ -1932,4 +1938,4 @@ window.setWindowTitle(title) window.show() window.setWindowIcon(QtGui.QIcon(iconPath)) window.setFixedSize(window.frameSize().width(), window.frameSize().height()) -sys.exit(app.exec_()) \ No newline at end of file +sys.exit(app.exec_())