fix: build script
parent
781f09d2f5
commit
fe9e617d99
22
build.sh
22
build.sh
|
@ -6,18 +6,24 @@ platform=$(uname)
|
||||||
|
|
||||||
echo Current platform: $platform
|
echo Current platform: $platform
|
||||||
|
|
||||||
mkdir -p out/x86_64
|
|
||||||
mkdir -p out/aarch64
|
|
||||||
mkdir -p out/i686
|
|
||||||
|
|
||||||
if [[ $platform == 'Linux' ]]; then
|
if [[ $platform == 'Linux' ]]; then
|
||||||
|
mkdir -p out/x86_64
|
||||||
|
mkdir -p out/i686
|
||||||
|
|
||||||
cargo build --release --target x86_64-unknown-linux-gnu
|
cargo build --release --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
cp target/x86_64-unknown-linux-gnu/release/libskyhook.so out/x86_64
|
cp target/x86_64-unknown-linux-gnu/release/libskyhook.so out/x86_64
|
||||||
elif [[ $platform == 'Darwin' ]]; then
|
elif [[ $platform == 'Darwin' ]]; then
|
||||||
cargo build --release --target x86_64-apple-darwin
|
TARGET_X86=x86_64-apple-darwin
|
||||||
cargo build --release --target aarch64-apple-darwin
|
TARGET_ARM=aarch64-apple-darwin
|
||||||
|
|
||||||
cp target/x86_64-apple-darwin/release/libskyhook.dylib out/x86_64
|
cargo build --release --target $TARGET_X86
|
||||||
cp target/aarch64-apple-darwin/release/libskyhook.dylib out/aarch64
|
cargo build --release --target $TARGET_ARM
|
||||||
|
|
||||||
|
lipo -create -output out/skyhook.bundle \
|
||||||
|
target/${TARGET_X86}/release/libskyhook.dylib \
|
||||||
|
target/${TARGET_ARM}/release/libskyhook.dylib
|
||||||
|
|
||||||
|
# cp target/x86_64-apple-darwin/release/libskyhook.dylib out/x86_64
|
||||||
|
# cp target/aarch64-apple-darwin/release/libskyhook.dylib out/aarch64
|
||||||
fi
|
fi
|
||||||
|
|
Reference in New Issue