Skip to content

Commit

Permalink
#23 修复
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorReid committed Jul 28, 2024
1 parent 29e4f55 commit 4cf5fea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
14 changes: 5 additions & 9 deletions app.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,26 @@ echo PYTHONPATH=%PYTHONPATH% >> "%LOGFILE%"

rem 检查 Python 可执行文件路径
if not exist "%PYTHON%" (
echo Python executable not found at %PYTHON%
echo "Python executable not found at %PYTHON%" >> "%LOGFILE%"
echo "未配置Python.exe"
exit /b 1
)

rem 检查 PythonPath 目录
if not exist "%PYTHONPATH%" (
echo Python path not found at %PYTHONPATH%
echo "Python path not found at %PYTHONPATH%" >> "%LOGFILE%"
echo "PYTHONPATH 未设置"
exit /b 1
)

rem 检查应用程序脚本路径
if not exist "%PYTHONPATH%\zzz_od\gui\app.py" (
echo Application script not found at %PYTHONPATH%\zzz_od\gui\app.py
echo "Application script not found at %PYTHONPATH%\zzz_od\gui\app.py" >> "%LOGFILE%"
echo "PYTHONPATH 设置错误 无法找到 %PYTHONPATH%\zzz_od\gui\app.py"
exit /b 1
)

echo 启动中...大约需要10+秒
echo "启动中...大约需要10+秒"
"%PYTHON%" "%PYTHONPATH%\zzz_od\gui\app.py" >> "%LOGFILE%" 2>&1
if %errorlevel% neq 0 (
echo An error occurred while running the application. Check the debug.log for details.
echo An error occurred while running the application. >> "%LOGFILE%"
echo "运行出错 请查看 %LOGFILE%"
)
timeout /t 10
exit 0
2 changes: 1 addition & 1 deletion src/one_dragon/base/screen/screen_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from cv2.typing import MatLike
from typing import List, Optional

from one_dragon.base.config.yaml_operator import YamlOperator
from one_dragon.base.geometry.rectangle import Rect
from one_dragon.base.screen.screen_area import ScreenArea
from one_dragon.base.yaml_operator import YamlOperator
from one_dragon.utils import os_utils, cv2_utils


Expand Down
2 changes: 1 addition & 1 deletion src/one_dragon/base/screen/template_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from typing import List, Optional

from one_dragon.base.config.config_item import ConfigItem
from one_dragon.base.config.yaml_operator import YamlOperator
from one_dragon.base.geometry.point import Point
from one_dragon.base.geometry.rectangle import Rect
from one_dragon.base.yaml_operator import YamlOperator
from one_dragon.utils import os_utils, cal_utils, cv2_utils

TEMPLATE_RAW_FILE_NAME = 'raw.png'
Expand Down

0 comments on commit 4cf5fea

Please sign in to comment.