mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-04 12:14:24 +02:00
parent
54cb343b3c
commit
7b42b97610
10 changed files with 71 additions and 44 deletions
|
@ -1 +1 @@
|
|||
1dcc20e0ef6e62c4371e3345e33bef19229c471a
|
||||
a17dbf3cdfca56910de1517e42a39770c19aef81
|
|
@ -1,28 +1,37 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash --pure -p binutils.bintools cmake scons
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Make sure we are in the addons/godot_xterm directory
|
||||
cd ${BASH_SOURCE%/*}
|
||||
# Get the absolute path to the directory this script is in.
|
||||
NATIVE_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
|
||||
# Initialize godot-cpp
|
||||
if [ ! -d "external/godot-cpp/bin" ]
|
||||
then
|
||||
cd external/godot-cpp
|
||||
scons platform=linux generate_bindings=yes -j12
|
||||
cd ../..
|
||||
# Run script inside a nix shell if it is available.
|
||||
if command -v nix-shell && [ $NIX_PATH ] && [ -z $IN_NIX_SHELL ]; then
|
||||
cd ${NATIVE_DIR}
|
||||
nix-shell shell.nix --pure --run "./build.sh"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Build libtsm
|
||||
if [ ! -f "external/libtsm/build/src/tsm/libtsm.a" ]
|
||||
then
|
||||
cd external/libtsm
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -DBUILD_SHARED_LIBS=n ..
|
||||
make
|
||||
cd ../../..
|
||||
# Build libtsm.
|
||||
LIBTSM_DIR=${NATIVE_DIR}/external/libtsm
|
||||
if [ ! -d "$LIBTSM_DIR" ]; then
|
||||
cd ${NATIVE_DIR}
|
||||
git submodule update --init --recursive -- $LIBTSM_DIR
|
||||
fi
|
||||
cd $LIBTSM_DIR
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -DBUILD_SHARED_LIBS=n ..
|
||||
make
|
||||
|
||||
# Build godotxtermnative
|
||||
# Build godot-cpp.
|
||||
GODOT_CPP_DIR=${NATIVE_DIR}/external/godot-cpp
|
||||
if [ ! -d "${GODOT_CPP_DIR}" ]; then
|
||||
cd ${NATIVE_DIR}
|
||||
git submodule update --init --recursive -- $GODOT_CPP_DIR
|
||||
fi
|
||||
cd $GODOT_CPP_DIR
|
||||
scons platform=linux generate_bindings=yes -j12
|
||||
|
||||
# Build godotxtermnative.
|
||||
cd ${NATIVE_DIR}
|
||||
scons platform=linux
|
||||
|
|
11
addons/godot_xterm/native/shell.nix
Normal file
11
addons/godot_xterm/native/shell.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
with (import <nixpkgs> {});
|
||||
mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
binutils.bintools
|
||||
cmake
|
||||
git
|
||||
libxkbcommon
|
||||
pkg-config
|
||||
scons
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue