👍[Update] installer : データ移行の処理を変更
This commit is contained in:
@@ -1,17 +1,16 @@
|
|||||||
@if not "%~0"=="%~dp0.\%~nx0" start /min cmd /c,"%~dp0.\%~nx0" %* & goto :eof
|
@if not "%~0"=="%~dp0.\%~nx0" start /min cmd /c,"%~dp0.\%~nx0" %* & goto :eof
|
||||||
|
|
||||||
set exe_name=%1
|
set exe_name=%1
|
||||||
set exe_tmp_name=%2
|
set folder_name=%2
|
||||||
set folder_name=%3
|
set folder_tmp=%3
|
||||||
set folder_tmp_name=%4
|
set restart=%4
|
||||||
set restart=%5
|
|
||||||
|
|
||||||
taskkill /im %exe_name% /F
|
taskkill /im %exe_name% /F
|
||||||
ping -n 2 127.0.0.1 > nul
|
ping -n 2 127.0.0.1 > nul
|
||||||
del /f %exe_name%
|
del /f %exe_name%
|
||||||
rename %exe_tmp_name% %exe_name%
|
|
||||||
rmdir /s /q %folder_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 (
|
if %restart% == True (
|
||||||
START "" %exe_name%
|
START "" %exe_name%
|
||||||
|
|||||||
5
model.py
5
model.py
@@ -286,11 +286,8 @@ class Model:
|
|||||||
file.write(chunk)
|
file.write(chunk)
|
||||||
with ZipFile(os_path.join(current_directory, tmp_directory_name, filename)) as zf:
|
with ZipFile(os_path.join(current_directory, tmp_directory_name, filename)) as zf:
|
||||||
zf.extractall(os_path.join(current_directory, tmp_directory_name))
|
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))
|
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, folder_name, tmp_directory_name, str(restart)]
|
||||||
command = [os_path.join(current_directory, batch_name), program_name, program_tmp_name, folder_name, folder_tmp_name, str(restart)]
|
|
||||||
Popen(command, cwd=current_directory)
|
Popen(command, cwd=current_directory)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user