ioq3quest/android/run.bat
Simon 326ddd1764 Squashed commit of the following:
commit b10fb5aae4
Author: Simon <simonbrown77@googlemail.com>
Date:   Sat Apr 2 23:40:44 2022 +0100

    Update pakQ3Q.pk3

commit ffc5546f0c
Merge: 5a6a7cfd 67016999
Author: Simon <simonbrown77@googlemail.com>
Date:   Sat Apr 2 23:36:00 2022 +0100

    Merge branch 'master' into multiview

commit 5a6a7cfd66
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 3639fc6d6a
Author: Simon <simonbrown77@googlemail.com>
Date:   Wed Mar 30 23:27:55 2022 +0100

    Update tr_glsl.c

commit 3cc8918328
Merge: 3bb87ecb fe180129
Author: Simon <simonbrown77@googlemail.com>
Date:   Wed Mar 30 22:10:54 2022 +0100

    Merge branch 'master' into multiview

commit 3bb87ecbe6
Author: Simon <simonbrown77@googlemail.com>
Date:   Wed Mar 30 20:05:14 2022 +0100

    Some small tweaks to shaders following trunk merge

commit 2b2748b9f9
Merge: aeb45adc a750c2e5
Author: Simon <simonbrown77@googlemail.com>
Date:   Wed Mar 30 19:17:00 2022 +0100

    Merge branch 'master' into multiview

commit aeb45adcd8
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 3f5226aa85
Merge: e8da7431 bcf9287a
Author: Simon <simonbrown77@googlemail.com>
Date:   Tue Mar 29 23:05:01 2022 +0100

    Merge branch 'master' into multiview

commit e8da743153
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 e1a16cbeb2
Author: Simon <simonbrown77@googlemail.com>
Date:   Tue Mar 29 19:53:00 2022 +0100

    Correct pointer offset

commit 12987c20b9
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 e06ba21101
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 e2a5472667
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 71708ee91e
Author: Simon <simonbrown77@googlemail.com>
Date:   Sun Mar 27 18:08:51 2022 +0100

    Restored missing matrix

commit 6506c96194
Author: Simon <simonbrown77@googlemail.com>
Date:   Sun Mar 27 17:46:42 2022 +0100

    Still ongoing (with little improvement)

commit 170f32709b
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 d6ade0215f
Author: Simon <simonbrown77@googlemail.com>
Date:   Sat Mar 26 19:02:03 2022 +0000

    Ensure multiview is only applied to vertex shaders

commit eec5efe237
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 b2fece761e
Author: Simon <simonbrown77@googlemail.com>
Date:   Fri Mar 25 19:34:44 2022 +0000

    Make context create correctly

commit e1a04d2200
Author: Simon <simonbrown77@googlemail.com>
Date:   Fri Mar 25 00:05:11 2022 +0000

    Not working yet
2022-04-02 23:42:56 +01:00

126 lines
2.9 KiB
Batchfile

@echo off
setlocal
set BUILD_TYPE=release
set VERSION=0.29.1-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
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
)
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%
)
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
)
)
@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
:END
endlocal