调整路径

This commit is contained in:
zw
2025-08-15 22:24:41 +08:00
parent 26fc6bb8e6
commit f15bfede6f
95 changed files with 4830 additions and 57 deletions

View File

@@ -155,12 +155,21 @@ class Deviceinfo(object):
def _iproxy_dir(self) -> Path:
"""返回打包后的 iproxy 目录(你现在放在 Module/iproxy/"""
return self._base_dir() / "Module" / "iproxy"
return self._base_dir() / "resources" / "iproxy"
def _iproxy_path(self) -> Path:
"""返回 iproxy 可执行文件路径Windows 为 iproxy.exe"""
exe_name = "iproxy.exe" if os.name == "nt" else "iproxy"
return self._iproxy_dir() / exe_name
base = self._base_dir()
candidates = [
base / "resources" / "iproxy", # 新推荐resources/iproxy/
]
for p in candidates:
if p.exists():
print("iproxy 路径为 ", p)
return p
# 打一条清晰的错误便于排查
tried = [str(c) for c in candidates]
raise FileNotFoundError(f"iproxy not found, tried: {tried}")
# ----------------------------
# 端口映射:启动 iproxy设置 cwd 和 PATH隐藏窗口
@@ -181,7 +190,7 @@ class Deviceinfo(object):
CREATE_NO_WINDOW = 0x08000000 if os.name == "nt" else 0
p = subprocess.Popen(
[str(iproxy), "-u", udid, str(self.screenProxy), "9100"],
["iproxy", "-u", udid, str(self.screenProxy), "9100"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
creationflags=CREATE_NO_WINDOW,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.