Skip to content

Commit

Permalink
Better builder
Browse files Browse the repository at this point in the history
  • Loading branch information
proller committed Aug 30, 2023
1 parent 1b6a0b5 commit 12dd797
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions build_tools/debian_ogles.sh → build_tools/build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# script for fast installing on raspberry pi, odroid and other arm boards with debian

set -e
set -x

# There's no package available, you have to compile it from source.
# you can place this text to freeminer.sh file and run it

# or
# curl https://raw.githubusercontent.com/freeminer/freeminer/master/build_tools/debian_ogles.sh | sh
# curl https://raw.githubusercontent.com/freeminer/freeminer/master/build_tools/build.sh | sh

#1. To compile need to install packages:
sudo apt install -y git subversion build-essential cmake ninja-build ccache libbz2-dev libzstd-dev "libpng12-dev|libpng-dev" libjpeg-dev libfreetype6-dev libxxf86vm-dev libsqlite3-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev libleveldb-dev libsnappy-dev libgettextpo0 libmsgpack-dev libgl1-mesa-dev "libgles1-mesa-dev|libgles2-mesa-dev" libgles2-mesa-dev libboost-system-dev libunwind-dev libc++-dev libc++abi-dev
DIST_ID=`lsb_release --short --id`
if [ "$DIST_ID" = "Debian" ] || [ "$DIST_ID" = "Ubuntu" ]; then
sudo apt install -y git subversion build-essential cmake ninja-build ccache libbz2-dev libzstd-dev libjpeg-dev libfreetype6-dev libxxf86vm-dev libxi-dev libsqlite3-dev libhiredis-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev libleveldb-dev libsnappy-dev libgettextpo0 libmsgpack-dev libboost-system-dev clang lld llvm libc++-dev libc++abi-dev
for PACKAGE in libpng12-dev libpng-dev libgles1-mesa-dev libgles2-mesa-dev libgl1-mesa-dev libunwind-dev ; do
sudo apt install -y $PACKAGE ||:
done
else
echo Todo
fi



if [ -n "" ]; then
#2. get and compile irrlicht with oppengl es support:
Expand All @@ -29,10 +40,10 @@ fi
[ -s ../src/CMakeLists.txt ] && mkdir -p ../build && cd ../build

#update if second+ run
git pull
git pull --rebase

#compile
cmake .. -GNinja -DENABLE_GLES=1 # -DIRRLICHT_INCLUDE_DIR=../irrlicht/include -DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlicht.a
cmake .. -GNinja -DENABLE_GLES=1 -DCMAKE_C_COMPILER=`which clang` -DCMAKE_CXX_COMPILER=`which clang++` # -DIRRLICHT_INCLUDE_DIR=../irrlicht/include -DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlicht.a
nice cmake --build .

# link dir with /Shaders/
Expand Down

0 comments on commit 12dd797

Please sign in to comment.