Skip to content

Commit ae195d5

Browse files
pazosFrenzie
authored andcommitted
remove standalone example, simplify readme
1 parent 48701b2 commit ae195d5

File tree

5 files changed

+1
-154
lines changed

5 files changed

+1
-154
lines changed

Makefile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@ release: update build-luajit
9191
@echo "Application $(APPNAME) was built, type: release (unsigned), flavor: $(FLAVOR), version: $(NAME), release $(VERSION)"
9292
@echo "WARNING: You'll need to sign this application to be able to install it"
9393

94-
example: update clean build-luajit
95-
@echo "Building HelloWorld example"
96-
mkdir -p assets/module/
97-
cp -pv examples/helloWorld/*.lua assets/module/
98-
./gradlew -q -PversName=1.0 -PversCode=1 -PprojectName=HelloFromLua \
99-
-PndkCustomPath=$(ANDROID_NDK_FULLPATH) app:$(BUILD_TASK)Debug
100-
mkdir -p bin/
101-
find app/build/outputs/apk/ -type f -name '*.apk' -exec mv -v {} bin/ \;
102-
10394
lint:
10495
./gradlew -PndkCustomPath=$(ANDROID_NDK_FULLPATH) $(LINT_TASK)Release
10596

README.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ NativeActivity is available starting with platform android-9.
99

1010
Have a look at the Android NDK's "native-plasma" sample activity to get an idea what it does - or rather, is theoretically able to do. While the sample from NDK implements everything in C, in our case, we create a LuaJIT instance and hand off control to it instead. LuaJIT then handles the main loop. In this programming model, we have a thread which presents us with a "main" entry point and allow us to follow our own program flow as long as we poll for and react to events.
1111

12-
A good number of Android native API headers are readily presented via FFI already. I'll probably add more along the way.
13-
14-
For now - and probably ever, since Mike Pall recommends strongly to do so - the compilation of LuaJIT is not integrated into the Android build framework and has to be run separately.
15-
16-
A wrapper script for building LuaJIT is provided. It **relies on NDK r15c**
12+
A good number of Android native API headers are readily presented via FFI already.
1713

1814
Have a look at KOReader's [llapp_main.lua](https://github.com/koreader/koreader/blob/master/platform/android/llapp_main.lua) file. You can use it as a starting point for your own app.
1915

@@ -22,30 +18,3 @@ The real starting point, called from JNI/C, is the run() function in android.lua
2218
## Disclaimer
2319

2420
This repo is used as glue code to run KOReader on Android.
25-
26-
Usage on its own doesn't make much sense since you're expected to write your own drawing routines in Lua!
27-
A standalone example is attached (with no drawing routines!) in case you're curious what you'll get.
28-
29-
30-
## Building the example app
31-
32-
### Export `ANDROID_NDK_HOME`
33-
34-
```sh
35-
export ANDROID_NDK_HOME=/path/to/your/ndk/folder
36-
```
37-
38-
### Build example APK for arm 32 bits
39-
40-
```sh
41-
make example
42-
```
43-
44-
45-
### Build example APK for any other arch
46-
47-
```sh
48-
ANDROID_ARCH=MY_ARCH make example
49-
```
50-
51-
where `MY_ARCH` is either `x86`, `x86_64` or `arm64`

examples/helloWorld/llapp_main.lua

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/helloWorld/main_loop.lua

Lines changed: 0 additions & 89 deletions
This file was deleted.

examples/helloWorld/utils.lua

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)