feat: 内置并统一使用项目 ADB (#149)
This commit is contained in:
@@ -34,6 +34,14 @@ def data_dir() -> Path:
|
||||
return directory
|
||||
|
||||
|
||||
def app_dir() -> Path:
|
||||
"""返回只读资源根目录;源码和打包运行使用同一相对结构。"""
|
||||
|
||||
if getattr(sys, "frozen", False):
|
||||
return Path(sys._MEIPASS).resolve()
|
||||
return Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def default_database_path() -> Path:
|
||||
"""返回默认数据库文件路径。"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user