Commit d739e3dc authored by Tomasz Drwięga's avatar Tomasz Drwięga Committed by GitHub
Browse files

Updating readme and CLI options to support linux+android development. (#24)

parent c4aa9b8e
......@@ -17,12 +17,18 @@
```
./setup_macos.sh
echo "ndk.dir=$NDK_HOME" > android/local.properties
echo "sdk.dir=$ANDROID_HOME" >> android/local.properties
```
- linux
```
./setup_linux.sh
echo "ndk.dir=$NDK_HOME" > android/local.properties
echo "sdk.dir=$ANDROID_HOME" >> android/local.properties
```
### usage
......@@ -30,15 +36,13 @@
- iOS
```
make -C rust/signer ios
react-native run-ios
npm run ios
```
- Android
```
make -C rust/signer android
react-native run-android
npm run android
```
### Example
......
#! /bin/sh
#! /bin/bash
# based on https://github.com/kennytm/rust-ios-android
......@@ -13,7 +13,7 @@ fi
MAKER="$NDK_HOME/build/tools/make_standalone_toolchain.py"
if [ -x "$MAKER" ]; then
MAKER="$(brew --prefix android-ndk)/build/tools/make_standalone_toolchain.py"
MAKER="$NDK_HOME/build/tools/make_standalone_toolchain.py"
fi
if [ -x "$MAKER" ]; then
......
......@@ -3,8 +3,12 @@
"version": "0.0.1",
"private": true,
"scripts": {
"build-rust": "cd rust/signer && make ios",
"start": "npm run build-rust && node node_modules/react-native/local-cli/cli.js run-ios",
"build-rust-ios": "cd rust/signer && make ios",
"ios": "npm run build-rust-ios && npm run cli run-ios",
"build-rust-android": "cd rust/signer && make android",
"android": "npm run build-rust-android && npm run cli run-android",
"cli": "node node_modules/react-native/local-cli/cli.js",
"start": "npm run ios",
"test": "jest",
"lint": "standard",
"commit": "commit-wizard"
......
#! /bin/bash
set -e
# android
multirust add-target stable aarch64-linux-android
multirust add-target stable armv7-linux-androideabi
......
#! /bin/bash
set -e
# ios
multirust add-target stable i386-apple-ios
multirust add-target stable x86_64-apple-ios
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment