From e42a29ab11ff4102fdb2388a6b3237f65aa2ed4f Mon Sep 17 00:00:00 2001 From: chenxudong Date: Thu, 19 Jun 2025 15:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.txt | 2 +- src/install/InstallComacDB.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.txt b/build.txt index d5d3aba..6738c4f 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ cd src pyinstaller --onefile --add-data "install/Common.py:install" --add-data "datas/init.sql:datas" .\install\InstallMariaDB.py -pyinstaller --onefile --add-data "install/Common.py:install" --add-data "datas/nssm.exe:datas" --add-data "datas/electromagnetic.jar:datas" .\install\InstallMariaDB.py +pyinstaller --onefile --add-data "install/Common.py:install" --add-data "datas/nssm.exe:datas" --add-data "datas/electromagnetic.jar:datas" .\install\InstallComacDB.py diff --git a/src/install/InstallComacDB.py b/src/install/InstallComacDB.py index ca1752b..f0dd1fd 100644 --- a/src/install/InstallComacDB.py +++ b/src/install/InstallComacDB.py @@ -101,8 +101,10 @@ class InstallComacDb: logger.info("清理历史服务") stop_command = ["sc", "stop", self.service_name] delete_command = ["sc", "delete", self.service_name] - subprocess.run(stop_command, capture_output=True, text=True) - subprocess.run(delete_command, capture_output=True, text=True) + res1 = subprocess.run(stop_command, capture_output=True, text=True) + logger.info(res1.stdout) + res2 = subprocess.run(delete_command, capture_output=True, text=True) + logger.info(res2.stdout) time.sleep(5) pass