Compare commits

..

3 Commits

Author SHA1 Message Date
paring 538fffdf18 chore: add darwin aarch64 target 2022-11-03 23:51:14 +09:00
paring 7a985633e4 chore: add .DS_Store to gitignore 2022-11-03 23:51:04 +09:00
paring a958d789c1 feat: detect platform 2022-11-03 23:50:50 +09:00
3 changed files with 23 additions and 11 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
/target
/Cargo.lock
out
out
.DS_Store

View File

@ -2,19 +2,27 @@
set -x
platform=$(uname)
echo Current platform: $platform
mkdir -p out/x86_64
mkdir -p out/aarch64
mkdir -p out/i686
# x86_64
cargo build --release --target x86_64-unknown-linux-gnu
# cargo build --release --target x86_64-apple-darwin
cargo build --release --target x86_64-pc-windows-gnu
if [[ $platform == 'Linux' ]]; then
cargo build --release --target x86_64-unknown-linux-gnu
cargo build --release --target x86_64-pc-windows-gnu
cargo build --release --target i686-pc-windows-gnu
cp target/x86_64-unknown-linux-gnu/release/libskyhook.so out/x86_64
cp target/x86_64-pc-windows-gnu/release/skyhook.dll out/x86_64
# i686
cargo build --release --target i686-pc-windows-gnu
cp target/i686-pc-windows-gnu/release/skyhook.dll out/i686
elif [[ $platform == 'Darwin' ]]; then
cargo build --release --target x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin
cp target/x86_64-unknown-linux-gnu/release/libskyhook.so out/x86_64
cp target/x86_64-pc-windows-gnu/release/skyhook.dll out/x86_64
cp target/i686-pc-windows-gnu/release/skyhook.dll out/i686
cp target/x86_64-apple-darwin/release/libskyhook.dylib out/x86_64
cp target/aarch64-apple-darwin/release/libskyhook.dylib out/aarch64
fi

View File

@ -9,5 +9,8 @@ rustup target add x86_64-pc-windows-gnu
rustup target add i686-unknown-linux-gnu
rustup target add i686-pc-windows-gnu
# ARM
rustup target add aarch64-apple-darwin
# sudo pacman -S mingw-w64-binutils mingw-w64-gcc mingw-w64-headers \
# clang gcc zlib libmpc mpfr gmp