修复打包问题
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
|
||||
# ===== Main.py 顶部放置(所有 import 之前)=====
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
if "IOSAI_PYTHON" not in os.environ:
|
||||
base_path = Path(sys.argv[0]).resolve()
|
||||
base_dir = base_path.parent if base_path.is_file() else base_path
|
||||
sidecar = base_dir / "python-rt" / ("python.exe" if os.name == "nt" else "python")
|
||||
if sidecar.exists():
|
||||
os.environ["IOSAI_PYTHON"] = str(sidecar)
|
||||
# ==============================================
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from Module.DeviceInfo import DeviceInfo
|
||||
from Module.FlaskSubprocessManager import FlaskSubprocessManager
|
||||
from Utils.DevDiskImageDeployer import DevDiskImageDeployer
|
||||
|
||||
Reference in New Issue
Block a user