Skip to content

Commit

Permalink
Improve build script, and support windows in it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Icelk committed Feb 26, 2023
1 parent 63a2c77 commit 37ebd8f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 19 additions & 4 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,48 @@ cb() {
cb_mac() {
CC=o64-clang cb --target x86_64-apple-darwin $@
}
cb_win() {
cb --target x86_64-pc-windows-gnu $@
}

cb_all() {
cb_unix() {
cb $@ &
cb_mac $@ &
wait
}
cb_all() {
cb_unix $@ &
cb_win $@ &
}

wd=$PWD

cb_all -F bin --bin moella &

cd ../kvarn/ctl
cb_all &
cb_mac --no-default-features &
cb &

cd ../chute
cb_all &
cb_mac --no-default-features -F date,bin &
cb_win &
cb &

wait

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-darwin14-strip $wd/moella-macos
cp ./target/distribution/moella moella-linux

cd ../kvarn/ctl
cp ../target/x86_64-apple-darwin/distribution/kvarnctl $wd/kvarnctl-macos
x86_64-apple-darwin14-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-darwin14-strip $wd/chute-macos
cp ../target/distribution/chute $wd/chute-linux

0 comments on commit 37ebd8f

Please sign in to comment.