File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ cd $BASEDIR/../
55BASEDIR=` pwd`
66echo Entered Base directory $BASEDIR
77
8+ # Add cargo to the path
9+ CARGO_HOME=$BASEDIR /tools/.cargo
10+ RUSTUP_HOME=$BASEDIR /tools/.rustup
11+ PATH=$PATH :$CARGO_HOME /bin
12+
813ANDROID_RUST=" $BASEDIR /rust"
914ANDROID_RUST_KEYLOCK_LIB=" $ANDROID_RUST /target/arm-linux-androideabi/release/librustkeylockandroid.so"
1015ANDROID_JAVA_NATIVE=" $BASEDIR /java/libs/armeabi/"
@@ -15,4 +20,4 @@ xargo build --target=arm-linux-androideabi --release
1520echo " Copying $ANDROID_RUST_KEYLOCK_LIB to $ANDROID_JAVA_NATIVE "
1621cp $ANDROID_RUST_KEYLOCK_LIB $ANDROID_JAVA_NATIVE
1722
18- echo " Rust build for rust-keylock-android completed."
23+ echo " Rust build for rust-keylock-android completed."
Original file line number Diff line number Diff line change @@ -5,14 +5,18 @@ cd $BASEDIR/../
55BASEDIR=` pwd`
66echo Base directory is $BASEDIR
77
8- # Save the current HOME variable and override it with a subdirectory
9- mkdir home
10- HOME_BAK=$HOME
11- HOME=$BASEDIR /home
8+ # Set the home directories for cargo and rustup
9+ mkdir -p tools/.cargo
10+ mkdir -p tools/.rustup
11+ CARGO_HOME=$BASEDIR /tools/.cargo
12+ RUSTUP_HOME=$BASEDIR /tools/.rustup
1213
1314# Install the latest rust stable and cargo
14- ` curl https://sh.rustup.rs -sSf | sh -s -- -y`
15- PATH=$PATH :$HOME /.cargo/bin
15+ ` curl https://sh.rustup.rs -sSf | CARGO_HOME=$BASEDIR /tools/.cargo RUSTUP_HOME=$BASEDIR /tools/.rustup sh -s -- -y`
16+ PATH=$PATH :$CARGO_HOME /bin
17+
18+ rustup default stable
19+ rustup target add arm-linux-androideabi
1620
1721# Install xargo
1822cargo install xargo --force
You can’t perform that action at this time.
0 commit comments