Files
oc_session/oc.bat

22 lines
556 B
Batchfile

@echo off
rem OC toolbox single entry: menu mode when no args, passthrough otherwise.
rem UTF-8 console codepage so the Python menu (Chinese) prints correctly.
chcp 65001 >nul
setlocal
cd /d "%~dp0"
set "PY="
where py >nul 2>nul && set "PY=py -3"
if not defined PY where python >nul 2>nul && set "PY=python"
if not defined PY where python3 >nul 2>nul && set "PY=python3"
if not defined PY (
echo [ERROR] Python not found in PATH. Install Python 3.10+ first.
pause
exit /b 1
)
%PY% oc.py %*
set "RC=%ERRORLEVEL%"
if not "%~1"=="" pause
exit /b %RC%