readme: description, build instructions

This commit is contained in:
ardocrat 2024-04-14 12:53:58 +03:00
parent 61cba2dba6
commit f366487a33

View file

@ -1,17 +1,38 @@
This is a minimal test application based on `GameActivity` that just
runs a mainloop based on android_activity::poll_events() and traces
the events received without doing any rendering. It also saves and
restores some minimal application state.
# Grim
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.
## 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"
export ANDROID_HOME="path/to/sdk"
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
cargo build release
./target/release/grim
```
### 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.