launcher/launcher.py
2025-01-25 17:49:17 +08:00

17 lines
471 B
Python

import mimetypes
import shutil
from pathlib import Path
from launcher.constants import update_tmp_folder
from launcher.webview import start_webview
mimetypes.add_type("text/html", ".html")
mimetypes.add_type("text/css", ".css")
mimetypes.add_type("application/javascript", ".js")
if __name__ == "__main__":
# 如果当前路径存在临时文件夹,则删除
if Path(update_tmp_folder).exists():
shutil.rmtree(update_tmp_folder)
start_webview()