-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-release.sh
68 lines (54 loc) · 1.71 KB
/
build-release.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh
echo "You need to have osxcross installed and built at ~/dev/Rust/osxcross"
# You have to have the following in your ~/.cargo/config.toml
# and have installed osxcross!
# [target.x86_64-apple-darwin]
# linker = "x86_64-apple-darwin14-clang"
# ar = "x86_64-apple-darwin14-ar"
cb() {
echo "Run in $PWD" cargo build --profile distribution $@
cargo build --profile distribution $@
}
cb_mac() {
CC=x86_64-apple-darwin23-clang LD_LIBRARY_PATH="$HOME/dev/Rust/osxcross/target/lib" RUST_FLAGS="-L $HOME/dev/Rust/osxcross/target/lib" cb --target x86_64-apple-darwin $@
}
cb_win() {
cb --target x86_64-pc-windows-gnu $@
}
cb_unix() {
cb $@
cb_mac $@
}
cb_all() {
cb_unix $@
cb_win $@
}
wd=$PWD
cb_all --no-default-features -F bin
cd ../kvarn/ctl
cb_mac --no-default-features
cb
cd ../chute
cb_mac --no-default-features -F date,bin
cb_win
cb
wait
echo "All builds complete (except uring)"
cd $wd
cp ./target/x86_64-pc-windows-gnu/distribution/moella.exe $wd/
cp ./target/x86_64-apple-darwin/distribution/moella moella-macos
# we don't need to strip the win binaries (cargo actually handles that)
x86_64-apple-darwin23-strip $wd/moella-macos
cp ./target/distribution/moella moella-linux-posix
echo "Starting uring build"
cb -F bin
cp ./target/distribution/moella moella-linux
cd ../kvarn/ctl
cp ../target/x86_64-apple-darwin/distribution/kvarnctl $wd/kvarnctl-macos
x86_64-apple-darwin23-strip $wd/kvarnctl-macos
cp ../target/distribution/kvarnctl $wd/kvarnctl-linux
cd ../chute
cp ../target/x86_64-pc-windows-gnu/distribution/chute.exe $wd/
cp ../target/x86_64-apple-darwin/distribution/chute $wd/chute-macos
x86_64-apple-darwin23-strip $wd/chute-macos
cp ../target/distribution/chute $wd/chute-linux