mirror of
https://github.com/tribufu/sdk-rust
synced 2025-06-15 10:44:18 +00:00
Update Scripts
This commit is contained in:
38
Bootstrap.ps1
Normal file
38
Bootstrap.ps1
Normal file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
echo "Installing dependencies..."
|
||||
|
||||
cargo install cbindgen
|
||||
|
||||
echo "Generating bindings..."
|
||||
|
||||
cbindgen --config ./Config/Bindings.toml --crate tribufu --output ./Source/Header.h
|
||||
|
||||
# Windows
|
||||
|
||||
if ($IsWindows)
|
||||
{
|
||||
echo "Generating Visual Studio project..."
|
||||
|
||||
& "./Vendor/Premake/Windows/premake5.exe" "vs2019"
|
||||
}
|
||||
|
||||
# Mac
|
||||
|
||||
elseif ($IsMacOS)
|
||||
{
|
||||
echo "Generating XCode project..."
|
||||
|
||||
sudo chmod +x ./Vendor/Premake/Mac/premake5
|
||||
& "./Vendor/Premake/Mac/premake5" "xcode4"
|
||||
}
|
||||
|
||||
# Linux
|
||||
|
||||
elseif ($IsLinux)
|
||||
{
|
||||
echo "Generating GMake project..."
|
||||
|
||||
sudo chmod +x ./Vendor/Premake/Linux/premake5
|
||||
& "./Vendor/Premake/Linux/premake5" "gmake2"
|
||||
}
|
28
Bootstrap.sh
Normal file
28
Bootstrap.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/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
|
@ -1,2 +0,0 @@
|
||||
cbindgen --config .\Config\Bindings.toml --crate tribufu --output Source\Header.h
|
||||
call .\Vendor\Premake\Windows\premake5.exe vs2019
|
@ -1,4 +0,0 @@
|
||||
#!/bin/zsh
|
||||
|
||||
cbindgen --config ./Config/Bindings.toml --crate tribufu --output Source/Header.h
|
||||
sudo ./Vendor/Premake/Mac/premake5 xcode4
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cbindgen --config ./Config/Bindings.toml --crate tribufu --output Source/Header.h
|
||||
sudo ./Vendor/Premake/Linux/premake5 gmake2
|
Reference in New Issue
Block a user