@echo off
chcp 65001 >nul
setlocal
set "TOOL=%~dp0ONE.ChromeExtensionSetup.exe"
set "DEV_TOOL=%~dp0ChromeExtensionSetup\bin\Release\net8.0-windows\ONE.ChromeExtensionSetup.exe"
set "PROJECT=%~dp0ChromeExtensionSetup\ONE.ChromeExtensionSetup.csproj"
if exist "%TOOL%" (
    "%TOOL%" %*
) else if exist "%DEV_TOOL%" (
    "%DEV_TOOL%" %*
) else (
    dotnet run --project "%PROJECT%" -c Release -- %*
)
exit /b %ERRORLEVEL%
