2024-11-03 19:03:22 +08:00
|
|
|
import mimetypes
|
2024-12-14 22:14:10 +08:00
|
|
|
import shutil
|
2024-09-23 16:12:34 +08:00
|
|
|
from pathlib import Path
|
2024-11-30 20:54:48 +08:00
|
|
|
|
2024-12-14 22:14:10 +08:00
|
|
|
from launcher.constants import update_tmp_folder
|
2024-12-14 19:54:21 +08:00
|
|
|
from launcher.webview import start_webview
|
2024-11-30 20:54:48 +08:00
|
|
|
|
2024-11-03 19:03:22 +08:00
|
|
|
mimetypes.add_type("text/html", ".html")
|
|
|
|
mimetypes.add_type("text/css", ".css")
|
|
|
|
mimetypes.add_type("application/javascript", ".js")
|
|
|
|
|
2024-12-14 19:54:21 +08:00
|
|
|
if __name__ == '__main__':
|
2024-12-01 17:54:09 +08:00
|
|
|
|
2024-12-14 22:14:10 +08:00
|
|
|
# 如果当前路径存在临时文件夹,则删除
|
|
|
|
if Path(update_tmp_folder).exists():
|
|
|
|
shutil.rmtree(update_tmp_folder)
|
2024-09-23 16:12:34 +08:00
|
|
|
|
2024-12-14 19:54:21 +08:00
|
|
|
start_webview()
|