launcher/launcher.py

19 lines
472 B
Python
Raw Permalink Normal View History

import mimetypes
import shutil
2024-09-23 16:12:34 +08:00
from pathlib import Path
2024-11-30 20:54:48 +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
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__':
# 如果当前路径存在临时文件夹,则删除
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()