readme: description, build instructions
This commit is contained in:
parent
61cba2dba6
commit
f366487a33
1 changed files with 35 additions and 14 deletions
49
README.md
49
README.md
|
@ -1,17 +1,38 @@
|
||||||
This is a minimal test application based on `GameActivity` that just
|
# Grim
|
||||||
runs a mainloop based on android_activity::poll_events() and traces
|
|
||||||
the events received without doing any rendering. It also saves and
|
Cross-platform GUI for [Grin](https://github.com/mimblewimble/grin) on [Rust](https://stackoverflow.blog/2020/01/20/what-is-rust-and-why-is-it-so-popular/) with focus on usability and availability to be used by anyone, anywhere. Named by character [Grim](https://harrypotter.fandom.com/wiki/Grim) - giant, spectral dog that haunts churchyards.
|
||||||
restores some minimal application state.
|
## Build instructions
|
||||||
|
### Install Rust
|
||||||
|
`curl https://sh.rustup.rs -sSf | sh`
|
||||||
|
|
||||||
|
### Desktop
|
||||||
|
|
||||||
|
To build and run application go to project directory and run:
|
||||||
|
|
||||||
```
|
```
|
||||||
export ANDROID_NDK_HOME="path/to/ndk"
|
cargo build release
|
||||||
export ANDROID_HOME="path/to/sdk"
|
./target/release/grim
|
||||||
|
|
||||||
rustup target add aarch64-linux-android
|
|
||||||
cargo install cargo-ndk
|
|
||||||
|
|
||||||
export CPPFLAGS="-DMDB_USE_ROBUST=0" && export CFLAGS="-DMDB_USE_ROBUST=0" && cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
|
|
||||||
./gradlew build
|
|
||||||
./gradlew installDebug
|
|
||||||
adb shell am start -n mw.gri.android/.MainActivity
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Android
|
||||||
|
#### Set up the environment
|
||||||
|
|
||||||
|
Install Android SDK / NDK / Platform Tools
|
||||||
|
```
|
||||||
|
brew cask install android-sdk android-ndk android-platform-tools
|
||||||
|
```
|
||||||
|
|
||||||
|
Add to your `.bashprofile` or `.zshrc`:
|
||||||
|
```
|
||||||
|
export ANDROID_HOME="$(brew --prefix)/share/android-sdk"
|
||||||
|
export PATH=$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
|
||||||
|
export ANDROID_NDK_HOME="$(brew --prefix)/share/android-ndk"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Build the project
|
||||||
|
Run Android emulator or connect a real device. Command `adb devices` should show at least one device.
|
||||||
|
In the root of the repo run `./build_run_android.sh release {arch}`, where is `arch` is `v7` or `v8` based on device CPU architecture.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Apache License v2.0.
|
Loading…
Reference in a new issue