2022-06-15 15:20:52 +02:00
|
|
|
#!/usr/bin/env zsh
|
|
|
|
|
2021-12-04 09:02:57 +01:00
|
|
|
set -e +x
|
|
|
|
|
2022-06-15 15:20:52 +02:00
|
|
|
ROOT="$(git rev-parse --show-toplevel)"
|
|
|
|
|
|
|
|
cd ${ROOT}
|
|
|
|
|
|
|
|
rm -Rf ${ROOT}/tmp
|
|
|
|
mkdir ${ROOT}/tmp
|
2021-12-04 09:02:57 +01:00
|
|
|
|
|
|
|
./scripts/compile.sh
|
|
|
|
|
|
|
|
strip target/x86_64-unknown-linux-musl/release/amdfand
|
|
|
|
strip target/x86_64-unknown-linux-musl/release/amdvold
|
|
|
|
strip target/x86_64-unknown-linux-musl/release/amdmond
|
|
|
|
|
2022-02-10 09:51:53 +01:00
|
|
|
#upx --best --lzma target/x86_64-unknown-linux-musl/release/amdfand
|
|
|
|
#upx --best --lzma target/x86_64-unknown-linux-musl/release/amdvold
|
|
|
|
#upx --best --lzma target/x86_64-unknown-linux-musl/release/amdmond
|
2021-12-04 09:02:57 +01:00
|
|
|
|
2022-06-15 15:20:52 +02:00
|
|
|
function build_and_zip() {
|
|
|
|
feature=$1
|
|
|
|
zip_name=$2
|
2021-12-04 09:02:57 +01:00
|
|
|
|
2022-06-15 15:20:52 +02:00
|
|
|
cd ${ROOT}
|
|
|
|
cargo build --release --target x86_64-unknown-linux-gnu --bin amdguid --no-default-features --features ${feature}
|
|
|
|
strip target/x86_64-unknown-linux-gnu/release/amdguid
|
|
|
|
#upx --best --lzma target/x86_64-unknown-linux-gnu/release/amdguid
|
|
|
|
cp ./target/x86_64-unknown-linux-gnu/release/amdguid ./tmp
|
|
|
|
cd ${ROOT}/tmp
|
|
|
|
zip ${zip_name}.zip ./amdguid
|
|
|
|
cd ${ROOT}
|
|
|
|
}
|
2022-02-10 09:51:53 +01:00
|
|
|
|
2022-06-15 15:20:52 +02:00
|
|
|
build_and_zip xorg-glium amdguid-glium
|
|
|
|
build_and_zip xorg-glow amdguid-glow
|
|
|
|
build_and_zip wayland amdguid-wayland
|