修复路径
This commit is contained in:
parent
cbb1cc4767
commit
bf621f2e87
@ -30,20 +30,16 @@ class IntegratedPipeline:
|
||||
self.docs_path = "" # Docs 项目路径
|
||||
self.main_project_path = "" # Unity 主项目路径
|
||||
|
||||
# 获取当前工具所在的项目根目录(自动检测:IntegratedTool -> PythonWorkSpace -> 项目根目录)
|
||||
if getattr(sys, 'frozen', False):
|
||||
# exe 模式
|
||||
self.tool_root = Path(sys.executable).parent.parent.parent.resolve()
|
||||
else:
|
||||
# 开发模式 - 当前文件在 PythonWorkSpace/IntegratedTool/
|
||||
self.tool_root = Path(__file__).parent.parent.parent.resolve()
|
||||
|
||||
# 获取配置文件路径(支持exe模式)
|
||||
if getattr(sys, 'frozen', False):
|
||||
app_dir = Path(os.path.dirname(sys.executable))
|
||||
else:
|
||||
app_dir = Path(__file__).parent
|
||||
|
||||
# 获取当前工具所在的项目根目录(自动检测:IntegratedTool -> PythonWorkSpace -> 项目根目录)
|
||||
# app_dir 是 IntegratedTool 目录,根目录在其两层上级
|
||||
self.tool_root = app_dir.parent.parent.resolve()
|
||||
|
||||
self.config_file = app_dir / "pipeline_config.json"
|
||||
self.gen_py_dir = app_dir / "gen-py" # 临时Python代码目录
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user