-
Notifications
You must be signed in to change notification settings - Fork 51
/
test_android.sh
executable file
·50 lines (36 loc) · 1.16 KB
/
test_android.sh
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
#!/bin/bash
set -ex
PY=$(python -c 'import sys; print(sys.version[0])')
ROOT="$(dirname $(readlink -f $0))"
pushd "$ROOT"
./build.py --python $PY --platform android rebuild rapt rapt-sdl2
popd
rm "$ROOT/renpy/rapt"
ln -s "rapt$PY" "$ROOT/renpy/rapt"
export PYTHONPATH="$ROOT/renpy:$ROOT/renpy/launcher/game"
rm -Rf "$ROOT/renpy/rapt/Sdk"
ln -s "/home/tom/ab/android/Sdk" "$ROOT/renpy/rapt/Sdk"
mkdir -p "$ROOT/renpy/rapt/project"
cp -a /home/tom/ab/keys/local.properties "$ROOT/renpy/rapt/project"
cp -a /home/tom/ab/keys/bundle.properties "$ROOT/renpy/rapt/project"
pushd "$ROOT/renpy/rapt"
export RAPT_NO_TERMS=1
python android.py installsdk
popd
# adb shell input keyevent KEYCODE_HOME || true
if [ "$1" != "" ]; then
$ROOT/renpy/renpy3.sh $ROOT/renpy/launcher android_build "$1" --bundle --launch
fi
## This tests app switching.
# sleep 6
# adb shell input keyevent KEYCODE_HOME || true
# sleep 6
# adb shell input keyevent KEYCODE_APP_SWITCH || true
# sleep 1
# adb shell input tap 500 500 || true
# sleep 6
# adb shell input keyevent KEYCODE_HOME || true
# sleep 6
# adb shell input keyevent KEYCODE_APP_SWITCH || true
# sleep 1
# adb shell input tap 500 500 || true