From c87f26a0ec812d811356a0c4bea0bc44604b53fa Mon Sep 17 00:00:00 2001 From: Hector <2055590199@qq.com> Date: Thu, 11 Sep 2025 09:27:39 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=8A=A0=E5=90=AF=E5=8A=A8=E9=A1=B5?= =?UTF-8?q?=E6=89=93=E5=BC=80=E9=A1=B9=E7=9B=AE=E7=9B=B8=E5=85=B3=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=88=E6=B7=BB=E5=8A=A0=E5=90=AF=E5=8A=A8=E9=A1=B5?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E5=85=A5=E5=8F=A3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Start_Run.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Start_Run.py diff --git a/Start_Run.py b/Start_Run.py new file mode 100644 index 00000000..fa515efa --- /dev/null +++ b/Start_Run.py @@ -0,0 +1,28 @@ +import os +import sys + +# 添加项目根目录到 Python 路径 +project_root = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, project_root) + +# 添加 RenderPipeline 到路径(注意路径名称应与实际目录一致) +render_pipeline_path = os.path.join(project_root, "RenderPipeline") +sys.path.insert(0, render_pipeline_path) + +# 添加 RenderPipelineFile 路径 +render_pipeline_file_path = os.path.join(project_root, "RenderPipelineFile") +sys.path.insert(0, render_pipeline_file_path) + +# 添加 icons 目录到路径 +icons_path = os.path.join(project_root, "icons") +sys.path.insert(0, icons_path) + +# 现在可以导入并运行主程序 +if __name__ == "__main__": + args = sys.argv[1:] + # args = "/home/tiger/桌面/Test1" + from main import run + if args: + run(args[0]) + else: + run() \ No newline at end of file