-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathship.sh
42 lines (27 loc) · 1013 Bytes
/
ship.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Create directories
mkdir production-builds -p
mkdir production-builds/desktop -p
mkdir production-builds/mobile -p
# Create environment variable to `OPENSSL_DIR`
export OPENSSL_DIR=$(realpath "dependencies/openssl/openssl-android-arm64-v8a")
# This is very important so that we dont have to specify any features
cd mobile
echo "Compile android application"
# Compile the application
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build --release
echo "Building android application"
# Build APK
./gradlew build
echo "Assembling release android build"
# Install APK to running emulator
./gradlew assembleRelease
echo "Copying release files to release folder"
# Copy release files
cp app/build/outputs/apk/release/app-release-unsigned.apk ../production-builds/mobile
# Go to the desktop folder
cd ../desktop
echo Compiling desktop application into production-builds/desktop
# Build project
cargo b --release --target-dir ../production-builds/desktop
echo "Finished building all the projects."
read