TheBrokenRail
31dc5ad2a7
Some checks failed
Minetest-For-Mobile/pipeline/head There was a failure building this commit
78 lines
1.7 KiB
Bash
Executable File
78 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Clone Minetest
|
|
rm -rf minetest
|
|
git clone https://github.com/TheBrokenRail/minetest.git -b desktop-touch
|
|
cd minetest
|
|
git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
|
|
|
|
# Get Version
|
|
DEB_VERSION="$(git describe --tags --dirty)"
|
|
|
|
# Clone Irrlicht
|
|
git clone --depth 1 https://github.com/TheBrokenRail/irrlicht.git -b desktop-touch lib/irrlichtmt
|
|
|
|
# Configure Irrlicht
|
|
cd lib/irrlichtmt
|
|
|
|
disable_feature() {
|
|
sed -i "s/^#define $1.*\$//g" include/IrrCompileConfig.h
|
|
}
|
|
enable_feature() {
|
|
sed -i "s/^#ifdef NO$1.*\$/#ifndef $1\n#define $1\n#endif\n#if 0/g" include/IrrCompileConfig.h
|
|
}
|
|
|
|
disable_feature _IRR_COMPILE_WITH_OPENGL_
|
|
disable_feature _IRR_COMPILE_WITH_OGLES1_
|
|
disable_feature _IRR_COMPILE_WITH_WEBGL1_
|
|
disable_feature _IRR_COMPILE_WITH_SOFTWARE_
|
|
disable_feature _IRR_COMPILE_WITH_BURNINGSVIDEO_
|
|
enable_feature _IRR_COMPILE_WITH_OGLES2_
|
|
enable_feature _IRR_LINUX_X11_XINPUT2_
|
|
|
|
cd ../../
|
|
|
|
# Copy Shaders
|
|
rm -rf client/shaders/Irrlicht
|
|
cp -r lib/irrlichtmt/media/Shaders client/shaders/Irrlicht
|
|
|
|
# Configure Minetest
|
|
mkdir build
|
|
cd build
|
|
cmake \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
|
|
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
|
|
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
|
|
-DENABLE_GLES=TRUE \
|
|
-DENABLE_TOUCH=TRUE \
|
|
-DRUN_IN_PLACE=FALSE \
|
|
-DBUILD_UNITTESTS=FALSE \
|
|
-DVERSION_EXTRA=mobile \
|
|
..
|
|
|
|
# Build
|
|
make -j$(nproc)
|
|
|
|
# Prepare
|
|
rm -rf tmp
|
|
mkdir tmp
|
|
rm -rf /out/*
|
|
mkdir -p /out
|
|
|
|
# Install Files
|
|
make install DESTDIR="$(pwd)/tmp"
|
|
|
|
# Prepare Debian
|
|
cp -r ../../DEBIAN tmp/DEBIAN
|
|
sed -i 's/${VERSION}/'"${DEB_VERSION}"'/g' tmp/DEBIAN/control
|
|
|
|
# Make DEB
|
|
dpkg -b tmp /out
|
|
|
|
# Clean Up
|
|
rm -rf tmp
|