👍[Update] Model : restart処理を追加

This commit is contained in:
misyaguziya
2023-10-09 13:49:22 +09:00
parent 776501b363
commit 0bc021cbe8
4 changed files with 14 additions and 1 deletions

View File

@@ -1 +1 @@
pyinstaller --onedir --onefile --windowed --clean --icon="./img/vrct_logo_mark_black.ico" --add-data "./img;img/" --add-data "./locales;locales/" --add-data "./update.bat;./" --name VRCT --exclude-module numpy --exclude-module pandas --exclude-module matplotlib --exclude-module PyQt5 main.py
pyinstaller --onedir --onefile --windowed --clean --icon="./img/vrct_logo_mark_black.ico" --add-data "./img;img/" --add-data "./locales;locales/" --add-data "./update.bat;./" --add-data "./restart.bat;./" --name VRCT --exclude-module numpy --exclude-module pandas --exclude-module matplotlib --exclude-module PyQt5 main.py

View File

@@ -13,6 +13,7 @@ def callbackUpdateSoftware():
def callbackRestartSoftware():
print("callbackRestartSoftware")
# model.updateSoftware(restart=True)
model.reStartSoftware()
# func transcription send message
def sendMicMessage(message):

View File

@@ -256,6 +256,14 @@ class Model:
command = [os_path.join(program_directory, batch_name), program_name, temporary_name, str(restart)]
Popen(command)
@staticmethod
def reStartSoftware():
program_name = 'VRCT.exe'
batch_name = 'restart.bat'
program_directory = os_path.dirname(__file__)
command = [os_path.join(program_directory, batch_name), program_name]
Popen(command)
@staticmethod
def getListInputHost():
return [host for host in getInputDevices().keys()]

4
restart.bat Normal file
View File

@@ -0,0 +1,4 @@
@echo off
taskkill /im %1 /F
START "" %1