launcher/launcher.py

19 lines
467 B
Python
Raw Normal View History

import mimetypes
import os
2024-09-23 16:12:34 +08:00
from pathlib import Path
2024-11-30 20:54:48 +08:00
2024-12-14 19:54:21 +08:00
from launcher.constants import upgrade_script_name
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__':
2024-12-14 19:54:21 +08:00
# 如果当前路径存在更新脚本,则删除
if Path(upgrade_script_name).exists():
os.remove(upgrade_script_name)
2024-09-23 16:12:34 +08:00
2024-12-14 19:54:21 +08:00
start_webview()