🐛[bugfix] installer : restart処理時にパスがおかしくなる問題を修正

This commit is contained in:
misyaguziya
2023-11-01 04:09:41 +09:00
parent 57a040f648
commit 9951398c36
3 changed files with 8 additions and 6 deletions

View File

@@ -1,7 +1,8 @@
@if not "%~0"=="%~dp0.\%~nx0" start /min cmd /c,"%~dp0.\%~nx0" %* & goto :eof
set name=%1
set path=%~dp0
taskkill /im %name% /F
START "" %name%
START "" %path%/%name%

View File

@@ -4,6 +4,7 @@ set exe_name=%1
set folder_name=%2
set folder_tmp=%3
set restart=%4
set path=%~dp0
taskkill /im %exe_name% /F
ping -n 2 127.0.0.1 > nul
@@ -13,7 +14,7 @@ move /Y %exe_tmp_name%\* .\
rmdir /s /q %exe_tmp_name%
if %restart% == True (
START "" %exe_name%
START "" %path%/%exe_name%
)
del /f "%~dp0%~nx0"

View File

@@ -268,9 +268,7 @@ class Model:
def updateSoftware(restart:bool=True):
filename = 'VRCT.zip'
program_name = 'VRCT.exe'
program_tmp_name = '_VRCT.exe'
folder_name = '_internal'
folder_tmp_name = '__internal'
tmp_directory_name = 'tmp'
batch_name = 'update.bat'
current_directory = config.LOCAL_PATH
@@ -296,9 +294,11 @@ class Model:
@staticmethod
def reStartSoftware():
program_name = 'VRCT.exe'
folder_name = '_internal'
batch_name = 'restart.bat'
program_directory = os_path.dirname(__file__)
command = [os_path.join(program_directory, "batch", batch_name), program_name]
current_directory = config.LOCAL_PATH
command = [os_path.join(current_directory, folder_name, "batch", batch_name), program_name]
Popen(command, cwd=current_directory)
@staticmethod