@echo off
chcp 65001 >nul
cd /d "%~dp0"
if "%~1"=="" (
    powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0tools\PatchManager.ps1" -Action Launch
) else (
    powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0tools\PatchManager.ps1" -Action Launch -GamePath "%~1"
)
set "RESULT=%ERRORLEVEL%"
if not "%RESULT%"=="0" (
    echo.
    echo 게임을 실행하지 못했습니다.
    pause
)
exit /b %RESULT%
