75 lines
2.1 KiB
Batchfile
75 lines
2.1 KiB
Batchfile
@echo off
|
|
echo Building VP9 Orchestra Android Library...
|
|
|
|
echo.
|
|
echo Checking prerequisites...
|
|
|
|
where java >nul 2>&1
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo Error: Java not found in PATH. Please install Java 8 or higher.
|
|
echo You can download it from: https://adoptium.net/
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo Java found:
|
|
java -version
|
|
|
|
echo.
|
|
echo Checking Android SDK...
|
|
if "%ANDROID_HOME%" == "" (
|
|
echo Warning: ANDROID_HOME not set. This may cause build issues.
|
|
echo Please install Android SDK and set ANDROID_HOME environment variable.
|
|
echo.
|
|
)
|
|
|
|
cd android\gradle
|
|
|
|
echo.
|
|
echo Building Android AAR with Gradle...
|
|
call gradlew.bat clean build
|
|
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo.
|
|
echo Build failed. This is normal if Android SDK/NDK is not configured.
|
|
echo.
|
|
echo To complete the setup, you need:
|
|
echo 1. Android SDK with Build Tools 34.0.0
|
|
echo 2. Set ANDROID_HOME environment variable
|
|
echo 3. For native VP9 decoding: Android NDK r21 or higher
|
|
echo.
|
|
echo Current build creates Java-only library without native VP9 decoder.
|
|
echo You can still work with the Godot project structure.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo Copying AAR to Godot plugin directory...
|
|
if exist "build\outputs\aar\gradle-release.aar" (
|
|
copy "build\outputs\aar\gradle-release.aar" "..\..\godot-project\android\plugins\vp9orchestra\vp9orchestra-release.aar"
|
|
echo AAR file copied successfully!
|
|
) else (
|
|
echo AAR file not found. Checking for debug version...
|
|
if exist "build\outputs\aar\gradle-debug.aar" (
|
|
copy "build\outputs\aar\gradle-debug.aar" "..\..\godot-project\android\plugins\vp9orchestra\vp9orchestra-release.aar"
|
|
echo Debug AAR file copied as release version.
|
|
) else (
|
|
echo No AAR file found. Build may have failed.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
echo.
|
|
echo Build completed successfully!
|
|
echo AAR file copied to: godot-project\android\plugins\vp9orchestra\vp9orchestra-release.aar
|
|
echo.
|
|
echo Next steps:
|
|
echo 1. Open the Godot project: godot-project\project.godot
|
|
echo 2. Build C# solution in Godot
|
|
echo 3. Configure Android export settings
|
|
echo 4. Enable VP9 Orchestra plugin
|
|
echo 5. Export to Android for testing
|
|
|
|
pause |