This repository was archived by the owner on Mar 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroid_build.bat
More file actions
51 lines (42 loc) · 1.4 KB
/
android_build.bat
File metadata and controls
51 lines (42 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@echo off
setlocal enabledelayedexpansion
:: --- Meteid: Raylib Edition - Android Build Setup ---
:: Author: Fyrd.dev_
:: ---------------------------------------------------
echo [INFO] Starting Android Build Environment Setup...
:: 1. Ask user for NDK Path if not set in environment variables
set /p NDK_PATH="Enter your Android NDK Path (e.g., C:/Android/ndk/27.x.x): "
:: 2. Validate NDK Path
if not exist "%NDK_PATH%/build/cmake/android.toolchain.cmake" (
echo [ERROR] Invalid NDK Path! Could not find android.toolchain.cmake.
pause
exit /b 1
)
:: 3. Create build directory if it doesn't exist
if not exist build_android (
echo [INFO] Creating build_android directory...
mkdir build_android
)
cd build_android
:: 4. Run CMake Configuration
echo [INFO] Running CMake Configuration...
cmake -G "Ninja" ^
-DPLATFORM=Android ^
-DCMAKE_TOOLCHAIN_FILE="%NDK_PATH%/build/cmake/android.toolchain.cmake" ^
-DANDROID_ABI="arm64-v8a" ^
-DANDROID_PLATFORM=android-34 ^
-DANDROID_NDK="%NDK_PATH%" ^
-DCMAKE_BUILD_TYPE=Release ..
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] CMake configuration failed!
pause
exit /b 1
)
echo.
echo ---------------------------------------------------
echo [SUCCESS] Setup Complete!
echo [NEXT STEP] To compile the APK, run:
echo [NEXT STEP] cd build_android
echo [NEXT STEP] cmake --build .
echo ---------------------------------------------------
pause