@echo off
title Netfick

set "TARGET_DIR=%~dp0"
set "PYTHON_EXE=%TARGET_DIR%python314\python.exe"

:: Debug Check
echo ============================================================
echo [DEBUG] Checking Python Environment...
echo Path: "%PYTHON_EXE%"
echo.

if not exist "%PYTHON_EXE%" (
    echo [ERROR] python314 folder missing!
    pause
    exit /b 1
)

echo Active Python Version:
"%PYTHON_EXE%" --version
echo ============================================================
echo.

echo Starting application...
echo.
"%PYTHON_EXE%" "%TARGET_DIR%netfick.pyc" %*

if %ERRORLEVEL% NEQ 0 (
    echo.
    echo [NOTICE] Application closed with error code %ERRORLEVEL%.
    pause
)