File tree 2 files changed +16
-7
lines changed
2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ cd $BASEDIR/../
5
5
BASEDIR=` pwd`
6
6
echo Entered Base directory $BASEDIR
7
7
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
+
8
13
ANDROID_RUST=" $BASEDIR /rust"
9
14
ANDROID_RUST_KEYLOCK_LIB=" $ANDROID_RUST /target/arm-linux-androideabi/release/librustkeylockandroid.so"
10
15
ANDROID_JAVA_NATIVE=" $BASEDIR /java/libs/armeabi/"
@@ -15,4 +20,4 @@ xargo build --target=arm-linux-androideabi --release
15
20
echo " Copying $ANDROID_RUST_KEYLOCK_LIB to $ANDROID_JAVA_NATIVE "
16
21
cp $ANDROID_RUST_KEYLOCK_LIB $ANDROID_JAVA_NATIVE
17
22
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/../
5
5
BASEDIR=` pwd`
6
6
echo Base directory is $BASEDIR
7
7
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
12
13
13
14
# 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
16
20
17
21
# Install xargo
18
22
cargo install xargo --force
You can’t perform that action at this time.
0 commit comments