fix: support isolated Python startup

This commit is contained in:
2026-06-15 16:44:33 +08:00
parent 24d43db434
commit b8801ec024
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
title run
cd /d "%~dp0src" && python main.py
pause
+5
View File
@@ -1,5 +1,10 @@
import logging import logging
import sys import sys
from pathlib import Path
SRC_DIR = Path(__file__).resolve().parent
if str(SRC_DIR) not in sys.path:
sys.path.insert(0, str(SRC_DIR))
from PySide6.QtWidgets import QApplication from PySide6.QtWidgets import QApplication