@echo off
title Segyric VPN - Android APK Bundler
echo ==================================================
echo   Segyric VPN - NativePHP Android APK Bundler
echo ==================================================
echo.

echo [1/3] Verifying PHP and NativePHP environment...
if exist "C:\xampp\php\php.exe" (
    set PHP_BIN=C:\xampp\php\php.exe
) else (
    set PHP_BIN=php
)

echo [2/3] Building Native Android Release APK...
%PHP_BIN% artisan native:build --target=android --release

echo.
echo [3/3] Build Output:
if exist "nativephp\android\app\build\outputs\apk\release\app-release.apk" (
    echo ==================================================
    echo SUCCESS! APK Bundled Successfully at:
    echo nativephp\android\app\build\outputs\apk\release\app-release.apk
    echo ==================================================
) else (
    echo [!] Check terminal logs above for build status.
)

pause
