👍[Update] Model : restart処理を追加
This commit is contained in:
@@ -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
|
||||
1
main.py
1
main.py
@@ -13,6 +13,7 @@ def callbackUpdateSoftware():
|
||||
def callbackRestartSoftware():
|
||||
print("callbackRestartSoftware")
|
||||
# model.updateSoftware(restart=True)
|
||||
model.reStartSoftware()
|
||||
|
||||
# func transcription send message
|
||||
def sendMicMessage(message):
|
||||
|
||||
8
model.py
8
model.py
@@ -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
4
restart.bat
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
|
||||
taskkill /im %1 /F
|
||||
START "" %1
|
||||
Reference in New Issue
Block a user