@echo off
setlocal
for %%I in ("%~dp0..") do set "PROJECT_DIR=%%~fI"
cd /d "%PROJECT_DIR%"

if not exist ".venv\Scripts\python.exe" (
  echo Dang tao virtual environment...
  python -m venv .venv
)

echo Dang mo app...
if exist ".venv\Scripts\pythonw.exe" (
  start "" ".venv\Scripts\pythonw.exe" main.py
) else (
  start "" ".venv\Scripts\python.exe" main.py
)
