Merge branch 'autoUpdate' into UI_2.0

This commit is contained in:
misyaguziya
2023-10-08 23:45:59 +09:00
2 changed files with 7 additions and 3 deletions

View File

@@ -233,7 +233,7 @@ class Model:
return update_flag
@staticmethod
def updateSoftware():
def updateSoftware(restart:bool=True):
filename = 'download.zip'
program_name = 'VRCT.exe'
temporary_name = '_VRCT.exe'
@@ -253,7 +253,7 @@ class Model:
zf.extract(program_name, os_path.join(current_directory, tmp_directory_name))
os_rename(os_path.join(current_directory, tmp_directory_name, program_name), os_path.join(current_directory, temporary_name))
rmtree(os_path.join(current_directory, tmp_directory_name))
command = [os_path.join(program_directory, batch_name), program_name, temporary_name]
command = [os_path.join(program_directory, batch_name), program_name, temporary_name, str(restart)]
Popen(command)
@staticmethod

View File

@@ -3,4 +3,8 @@ timeout 2
del /f %1
timeout 2
rename %2 %1
START "" %1
echo %3
timeout 2
if %3 == True (
START "" %1
)