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 @@ ...@@ -17,12 +17,18 @@
``` ```
./setup_macos.sh ./setup_macos.sh
echo "ndk.dir=$NDK_HOME" > android/local.properties
echo "sdk.dir=$ANDROID_HOME" >> android/local.properties
``` ```
- linux - linux
``` ```
./setup_linux.sh ./setup_linux.sh
echo "ndk.dir=$NDK_HOME" > android/local.properties
echo "sdk.dir=$ANDROID_HOME" >> android/local.properties
``` ```
### usage ### usage
...@@ -30,15 +36,13 @@ ...@@ -30,15 +36,13 @@
- iOS - iOS
``` ```
make -C rust/signer ios npm run ios
react-native run-ios
``` ```
- Android - Android
``` ```
make -C rust/signer android npm run android
react-native run-android
``` ```
### Example ### Example
......
#! /bin/sh #! /bin/bash
# based on https://github.com/kennytm/rust-ios-android # based on https://github.com/kennytm/rust-ios-android
...@@ -13,7 +13,7 @@ fi ...@@ -13,7 +13,7 @@ fi
MAKER="$NDK_HOME/build/tools/make_standalone_toolchain.py" MAKER="$NDK_HOME/build/tools/make_standalone_toolchain.py"
if [ -x "$MAKER" ]; then 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 fi
if [ -x "$MAKER" ]; then if [ -x "$MAKER" ]; then
......
...@@ -3,8 +3,12 @@ ...@@ -3,8 +3,12 @@
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"scripts": { "scripts": {
"build-rust": "cd rust/signer && make ios", "build-rust-ios": "cd rust/signer && make ios",
"start": "npm run build-rust && node node_modules/react-native/local-cli/cli.js run-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", "test": "jest",
"lint": "standard", "lint": "standard",
"commit": "commit-wizard" "commit": "commit-wizard"
......
#! /bin/bash #! /bin/bash
set -e
# android # android
multirust add-target stable aarch64-linux-android multirust add-target stable aarch64-linux-android
multirust add-target stable armv7-linux-androideabi multirust add-target stable armv7-linux-androideabi
......
#! /bin/bash #! /bin/bash
set -e
# ios # ios
multirust add-target stable i386-apple-ios multirust add-target stable i386-apple-ios
multirust add-target stable x86_64-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