Finding apk file

This commit is contained in:
Eric Ratliff
2026-01-26 18:13:54 -06:00
parent eca488f703
commit 7420f8bda4

View File

@@ -337,10 +337,13 @@ setlocal enabledelayedexpansion
REM Read SDK path from config
for /f "tokens=2 delims==" %%a in ('findstr /c:"ftc_sdk_path" .weevil.toml') do (
set SDK_DIR=%%a
set SDK_DIR=!SDK_DIR:"=!
set SDK_DIR=!SDK_DIR: =!
)
REM Strip all quotes (both single and double)
set SDK_DIR=%SDK_DIR:"=%
set SDK_DIR=%SDK_DIR:'=%
set SDK_DIR=%SDK_DIR: =%
if not defined SDK_DIR (
echo Error: Could not read FTC SDK path from .weevil.toml
exit /b 1
@@ -351,15 +354,25 @@ call gradlew.bat buildApk
echo.
echo Deploying to Control Hub...
echo.
echo DEBUG: SDK_DIR = %SDK_DIR%
echo DEBUG: Searching for: %SDK_DIR%\TeamCode-debug.apk
echo.
REM Find APK - look for TeamCode-debug.apk
for /f "delims=" %%i in ('dir /s /b "%SDK_DIR%\TeamCode-debug.apk" 2^>nul') do set APK=%%i
if not defined APK (
echo Error: APK not found
echo.
echo DEBUG: Tried searching in: %SDK_DIR%
echo DEBUG: Let's see what APKs exist:
dir /s /b "%SDK_DIR%\*.apk" 2>nul
echo.
exit /b 1
)
echo Found APK: %APK%
echo Installing: %APK%
adb install -r "%APK%"