ioq3quest/android/run.bat

127 lines
2.9 KiB
Batchfile
Raw Normal View History

@echo off
setlocal
set BUILD_TYPE=release
2022-04-07 21:56:35 +00:00
set VERSION=0.31.0-multiview
@REM Define the following environment variables to sign a release build
@REM set KEYSTORE=
@REM set KEYSTORE_PASS=
set ANDROID_SDK_ROOT=%AppData%\..\Local\Android\Sdk
set adb="%ANDROID_SDK_ROOT%\platform-tools\adb.exe"
set make="%ANDROID_SDK_ROOT%\ndk\21.1.6352462\prebuilt\windows-x86_64\bin\make.exe"
set apksigner="%ANDROID_SDK_ROOT%\build-tools\29.0.2\apksigner.bat"
set JAVA_HOME=C:\Program Files\Android\Android Studio\jre\jre
if "%1"=="clean" (
rm -rf .\build
rm -rf .\android\build
2022-02-15 23:25:28 +00:00
rm -rf .\android\app\src\main\jniLibs\arm64-v8a
)
if %BUILD_TYPE%==release (
set GRADLE_BUILD_TYPE=:app:assembleRelease
)
if %BUILD_TYPE%==debug (
set GRADLE_BUILD_TYPE=:app:assembleDebug
)
Squashed commit of the following: commit b10fb5aae47bd185c538d461d8ad699513978074 Author: Simon <simonbrown77@googlemail.com> Date: Sat Apr 2 23:40:44 2022 +0100 Update pakQ3Q.pk3 commit ffc5546f0cdd4c1208df5ab6ec52f4df5204c4e8 Merge: 5a6a7cfd 67016999 Author: Simon <simonbrown77@googlemail.com> Date: Sat Apr 2 23:36:00 2022 +0100 Merge branch 'master' into multiview commit 5a6a7cfd66604a7c5850fb5dff43b3da4c464420 Author: Simon <simonbrown77@googlemail.com> Date: Sat Apr 2 23:34:11 2022 +0100 Lots of changes - Hacky fix for weird "out-of-body" issue when not drawing hud - HUD is now drawn as a world sprite (this has its own issues, but is mostly there) - Package the pk3 as part of the build commit 3639fc6d6a471f0c9fa0422814b1fe15d4a61aa4 Author: Simon <simonbrown77@googlemail.com> Date: Wed Mar 30 23:27:55 2022 +0100 Update tr_glsl.c commit 3cc8918328bd4dc5dcbdd1c6362c79d85d29e772 Merge: 3bb87ecb fe180129 Author: Simon <simonbrown77@googlemail.com> Date: Wed Mar 30 22:10:54 2022 +0100 Merge branch 'master' into multiview commit 3bb87ecbe6fead9dd4aa758122dbfaa34ff1550f Author: Simon <simonbrown77@googlemail.com> Date: Wed Mar 30 20:05:14 2022 +0100 Some small tweaks to shaders following trunk merge commit 2b2748b9f95ad0e8368c77a8ffecf2f6af66ede4 Merge: aeb45adc a750c2e5 Author: Simon <simonbrown77@googlemail.com> Date: Wed Mar 30 19:17:00 2022 +0100 Merge branch 'master' into multiview commit aeb45adcd82e6d06aa0c9d64aaff5fa365d1e595 Author: Simon <simonbrown77@googlemail.com> Date: Tue Mar 29 23:23:33 2022 +0100 Small changes following the merge from master - and also removed a couple of bits of my hacking commit 3f5226aa853d69f43bebcaead7d9e4545266b0a7 Merge: e8da7431 bcf9287a Author: Simon <simonbrown77@googlemail.com> Date: Tue Mar 29 23:05:01 2022 +0100 Merge branch 'master' into multiview commit e8da743153e4283271ec0073a73810ea6b0df811 Author: Simon <simonbrown77@googlemail.com> Date: Tue Mar 29 22:41:36 2022 +0100 Orthographic projection now working the main fix is in tr_glsl.c, the other changes are peripheral and probably contribute nothing commit e1a16cbeb23287c89d27db33e8cf54e1743473c3 Author: Simon <simonbrown77@googlemail.com> Date: Tue Mar 29 19:53:00 2022 +0100 Correct pointer offset commit 12987c20b95d575b15d7ffe69431a9a945659b55 Author: Simon <simonbrown77@googlemail.com> Date: Mon Mar 28 23:16:19 2022 +0100 Few small changes might add slight perf improvements as there was some buffer swap stuff not needed commit e06ba21101233af89ce7be5784b0982f606595ac Author: Simon <simonbrown77@googlemail.com> Date: Mon Mar 28 19:30:55 2022 +0100 World entities now drawing in the right places ..next up is the 2D stuff commit e2a54726675ea9e22e31c5aa0ac340730250a4e4 Author: Simon <simonbrown77@googlemail.com> Date: Sun Mar 27 23:19:16 2022 +0100 Small progress world is now rendering correctly, but.. - All items in world are rendering in the wrong place - no 2D still commit 71708ee91e581ad3e2176407d388ca2017df8d5a Author: Simon <simonbrown77@googlemail.com> Date: Sun Mar 27 18:08:51 2022 +0100 Restored missing matrix commit 6506c961944f49965f0ef6379e0bf74a325796eb Author: Simon <simonbrown77@googlemail.com> Date: Sun Mar 27 17:46:42 2022 +0100 Still ongoing (with little improvement) commit 170f32709bd8815d61e0a67d66629bd4a7edecd8 Author: Simon <simonbrown77@googlemail.com> Date: Sat Mar 26 23:31:03 2022 +0000 Now rendering! 2D stuff doesn't draw, and 3D is all wonky, but this is progress! commit d6ade0215f0ff49ed3ef928eacea0e8de6ec33b6 Author: Simon <simonbrown77@googlemail.com> Date: Sat Mar 26 19:02:03 2022 +0000 Ensure multiview is only applied to vertex shaders commit eec5efe23788b557c83118ad4db2481f8ac2ce0f Author: Simon <simonbrown77@googlemail.com> Date: Sat Mar 26 12:11:55 2022 +0000 Make main a C file in prep for the next step commit b2fece761e8a055edf947ed83f2e0d4a90dbe2d7 Author: Simon <simonbrown77@googlemail.com> Date: Fri Mar 25 19:34:44 2022 +0000 Make context create correctly commit e1a04d2200043f30fe33732ca45432fcf773c1e2 Author: Simon <simonbrown77@googlemail.com> Date: Fri Mar 25 00:05:11 2022 +0000 Not working yet
2022-04-02 22:42:56 +00:00
REM package our special pk3
pushd android\app\src\main
call make_pakQ3Q.bat
popd
echo #define Q3QVERSION "%VERSION%" > .\android\app\src\main\cpp\code\vr\vr_version.h
pushd %~dp0\..
%make% -j %NUMBER_OF_PROCESSORS% %BUILD_TYPE%
if %ERRORLEVEL% NEQ 0 (
popd
echo "Failed to build ioq3"
exit /b 1
)
pushd android
set GRADLE_EXIT_CONSOLE=1
call gradlew.bat %GRADLE_BUILD_TYPE%
if %ERRORLEVEL% NEQ 0 (
popd
popd
echo "Failed to build android project"
exit /b 1
)
set PACKAGE_NAME=com.drbeef.ioq3quest
set ANDROID_STORAGE_LOCATION=/sdcard/ioquake3quest/
set APK_LOCATION=.\app\build\outputs\apk\%BUILD_TYPE%\ioq3quest-%BUILD_TYPE%-%VERSION%.apk
if %BUILD_TYPE%==release (
echo "Signing Release APK"
call %apksigner% sign --ks ../%KEYSTORE% --out %APK_LOCATION% --v2-signing-enabled true --ks-pass pass:%KEYSTORE_PASS% .\app\build\outputs\apk\%BUILD_TYPE%\app-%BUILD_TYPE%-unsigned.apk
)
if %BUILD_TYPE%==debug (
echo "Copying Debug APK"
copy .\app\build\outputs\apk\%BUILD_TYPE%\app-%BUILD_TYPE%.apk %APK_LOCATION%
)
2022-02-15 23:25:28 +00:00
if "%1"=="nodeploy" (
goto :END
)
%adb% install -r %APK_LOCATION%
if %ERRORLEVEL% NEQ 0 (
%adb% uninstall %PACKAGE_NAME%
%adb% install %APK_LOCATION%
if %ERRORLEVEL% NEQ 0 (
popd
popd
echo "Failed to install apk."
exit /b 1
)
)
2022-02-15 23:25:28 +00:00
@REM %adb% shell mkdir -p %ANDROID_STORAGE_LOCATION%
@REM %adb% push --sync "D:\Program Files (x86)\Steam\steamapps\common\Quake 3 Arena\baseq3" %ANDROID_STORAGE_LOCATION%
@REM if %ERRORLEVEL% NEQ 0 (
@REM popd
@REM popd
@REM echo "Failed to transfer files."
@REM exit /b 1
@REM )
@REM %adb% push --sync ..\code\renderergl2\glsl %ANDROID_STORAGE_LOCATION%/baseq3/
@REM if %ERRORLEVEL% NEQ 0 (
@REM popd
@REM popd
@REM echo "Failed to transfer shaders."
@REM exit /b 1
@REM )
@REM %adb% push --sync autoexec.cfg %ANDROID_STORAGE_LOCATION%/baseq3/
@REM if %ERRORLEVEL% NEQ 0 (
@REM popd
@REM popd
@REM echo "Failed to transfer autoexec."
@REM exit /b 1
@REM )
%adb% logcat -c
%adb% shell am start -n %PACKAGE_NAME%/.MainActivity
if %ERRORLEVEL% NEQ 0 (
popd
popd
echo "Failed to start application."
exit 1
)
%adb% logcat *:S Quake3:V SDL:V DEBUG:V
2022-02-15 23:25:28 +00:00
:END
endlocal