-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-linux.sh
More file actions
executable file
·28 lines (23 loc) · 906 Bytes
/
build-linux.sh
File metadata and controls
executable file
·28 lines (23 loc) · 906 Bytes
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
#!/usr/bin/env bash
# Linux build for Bloom Jump.
#
# Steps:
# 1. cargo build the bloom-linux native crate (produces libbloom_linux.a +
# cmake-built libbloom_jolt.a / libJolt.a under target/release/build/).
# 2. ./bundle-jolt.sh merges the three archives into libbloom_linux_bundled.a
# because perry only links the single staticlib named in package.json.
# 3. perry compile src/main.ts -o jump links against the bundled archive.
#
# Pass --run to launch the binary after a successful build.
set -euo pipefail
cd "$(dirname "$0")"
ENGINE_LINUX="../engine/native/linux"
echo "[1/3] cargo build bloom-linux"
( cd "$ENGINE_LINUX" && cargo build --release )
echo "[2/3] bundle Jolt static libs into libbloom_linux_bundled.a"
"$ENGINE_LINUX/bundle-jolt.sh"
echo "[3/3] perry compile src/main.ts -o jump"
perry compile src/main.ts -o jump
if [[ "${1-}" == "--run" ]]; then
exec ./jump
fi