👍[Update] installer : データ移行の処理を変更

This commit is contained in:
misyaguziya
2023-10-31 17:24:46 +09:00
parent 033a64a725
commit 57a040f648
2 changed files with 6 additions and 10 deletions

View File

@@ -1,17 +1,16 @@
@if not "%~0"=="%~dp0.\%~nx0" start /min cmd /c,"%~dp0.\%~nx0" %* & goto :eof
set exe_name=%1
set exe_tmp_name=%2
set folder_name=%3
set folder_tmp_name=%4
set restart=%5
set folder_name=%2
set folder_tmp=%3
set restart=%4
taskkill /im %exe_name% /F
ping -n 2 127.0.0.1 > nul
del /f %exe_name%
rename %exe_tmp_name% %exe_name%
rmdir /s /q %folder_name%
rename %folder_tmp_name% %folder_name%
move /Y %exe_tmp_name%\* .\
rmdir /s /q %exe_tmp_name%
if %restart% == True (
START "" %exe_name%

View File

@@ -286,11 +286,8 @@ class Model:
file.write(chunk)
with ZipFile(os_path.join(current_directory, tmp_directory_name, filename)) as zf:
zf.extractall(os_path.join(current_directory, tmp_directory_name))
move(os_path.join(current_directory, tmp_directory_name, program_name), os_path.join(current_directory, program_tmp_name))
move(os_path.join(current_directory, tmp_directory_name, folder_name), os_path.join(current_directory, folder_tmp_name))
move(os_path.join(current_directory, folder_name, "batch", batch_name), os_path.join(current_directory, batch_name))
rmtree(os_path.join(current_directory, tmp_directory_name))
command = [os_path.join(current_directory, batch_name), program_name, program_tmp_name, folder_name, folder_tmp_name, str(restart)]
command = [os_path.join(current_directory, batch_name), program_name, folder_name, tmp_directory_name, str(restart)]
Popen(command, cwd=current_directory)
except Exception as e:
print(e)