发布包从tar修改为7z,自更新适配新发包方式
This commit is contained in:
parent
94009c8136
commit
04218f40f7
7 changed files with 42 additions and 18 deletions
10
launcher.py
10
launcher.py
|
@ -1,8 +1,8 @@
|
|||
import mimetypes
|
||||
import os
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
from launcher.constants import upgrade_script_name
|
||||
from launcher.constants import update_tmp_folder
|
||||
from launcher.webview import start_webview
|
||||
|
||||
mimetypes.add_type("text/html", ".html")
|
||||
|
@ -11,8 +11,8 @@ mimetypes.add_type("application/javascript", ".js")
|
|||
|
||||
if __name__ == '__main__':
|
||||
|
||||
# 如果当前路径存在更新脚本,则删除
|
||||
if Path(upgrade_script_name).exists():
|
||||
os.remove(upgrade_script_name)
|
||||
# 如果当前路径存在临时文件夹,则删除
|
||||
if Path(update_tmp_folder).exists():
|
||||
shutil.rmtree(update_tmp_folder)
|
||||
|
||||
start_webview()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue