mirror of
https://github.com/tribufu/sdk-rust
synced 2025-06-15 10:44:18 +00:00
29 lines
567 B
Bash
29 lines
567 B
Bash
#!/usr/bin/env sh
|
|
|
|
echo "Installing dependencies..."
|
|
|
|
cargo install cbindgen
|
|
|
|
echo "Generating bindings..."
|
|
|
|
cbindgen --config ./Config/Bindings.toml --crate tribufu --output ./Source/Header.h
|
|
|
|
# Linux
|
|
|
|
if [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]
|
|
then
|
|
echo "Generating GMake project..."
|
|
|
|
sudo chmod +x ./Vendor/Premake/Linux/premake5
|
|
./Vendor/Premake/Linux/premake5 gmake2
|
|
|
|
# Mac
|
|
|
|
elif [ "$(uname)" = "Darwin" ]
|
|
then
|
|
echo "Generating XCode project..."
|
|
|
|
sudo chmod +x ./Vendor/Premake/Mac/premake5
|
|
./Vendor/Premake/Mac/premake5 xcode4
|
|
fi
|