2020-07-13 06:14:30 +02:00
|
|
|
#! /usr/bin/env nix-shell
|
|
|
|
#! nix-shell -i bash --pure -p binutils.bintools cmake scons
|
2020-09-17 11:23:01 +02:00
|
|
|
set -e
|
2020-07-13 06:14:30 +02:00
|
|
|
|
2020-09-17 10:14:04 +02:00
|
|
|
# Make sure we are in the addons/godot_xterm directory
|
2020-07-13 06:14:30 +02:00
|
|
|
cd ${BASH_SOURCE%/*}
|
|
|
|
|
|
|
|
# Initialize godot-cpp
|
2020-09-23 12:29:33 +02:00
|
|
|
if [ ! -d "external/godot-cpp/bin" ]
|
2020-07-13 06:14:30 +02:00
|
|
|
then
|
2020-09-23 12:29:33 +02:00
|
|
|
cd external/godot-cpp
|
2020-07-13 06:14:30 +02:00
|
|
|
scons platform=linux generate_bindings=yes -j12
|
2020-09-17 11:23:01 +02:00
|
|
|
cd ../..
|
2020-07-13 06:14:30 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Build libtsm
|
2020-09-23 12:29:33 +02:00
|
|
|
if [ ! -f "external/libtsm/build/src/tsm/libtsm.a" ]
|
2020-07-13 06:14:30 +02:00
|
|
|
then
|
2020-09-23 12:29:33 +02:00
|
|
|
cd external/libtsm
|
2020-07-13 06:14:30 +02:00
|
|
|
mkdir -p build
|
|
|
|
cd build
|
|
|
|
cmake -DBUILD_SHARED_LIBS=n ..
|
|
|
|
make
|
2020-09-17 11:23:01 +02:00
|
|
|
cd ../../..
|
2020-07-13 06:14:30 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Build godotxtermnative
|
|
|
|
scons platform=linux
|