完善初始化

This commit is contained in:
moyanj 2024-09-09 13:29:53 +08:00
parent 203ce3300a
commit 9ca8ababf2
5 changed files with 18 additions and 13 deletions

13
Pipfile
View File

@ -1,13 +0,0 @@
[[source]]
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
verify_ssl = true
name = "pip_conf_index_global"
[packages]
pyqt5 = "*"
pyqt-fluent-widgets = {extras = ["full"], version = "*"}
[dev-packages]
[requires]
python_version = "3.11"

14
app/env.py Normal file
View File

@ -0,0 +1,14 @@
import platformdirs
import os
dirs = platformdirs.PlatformDirs("HoYoCenter")
def init_dirs():
os.makedirs(dirs.user_config_path, exist_ok=True)
os.makedirs(dirs.user_log_path, exist_ok=True)
os.makedirs(dirs.user_data_path, exist_ok=True)
def init():
init_dirs()
init()

0
env.py
View File

View File

@ -5,6 +5,7 @@ from qfluentwidgets import FluentIcon as FIF
from interface.main import MainWidget
from interface.setting import SettingWidget
from interface.init import InitWindow
import app.env as env
import sys
# 主窗口类

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
pyqt5==5.15.11
PyQt-Fluent-Widgets[full]==1.6.3
platformdirs==4.3.1