Last active
June 30, 2019 23:12
-
-
Save Koncord/19f6339b1cee9484b82ba73b6a61f95d to your computer and use it in GitHub Desktop.
RPI v3 build scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source build_env.sh | |
| ./clone-or-rebase.sh https://github.com/TES3MP/RakNet RakNet | |
| mkdir ./RakNet/build | |
| cd ./RakNet/build | |
| cmake CMAKE_INSTALL_PREFIX=$RPI_ROOT/libs -DRAKNET_ENABLE_SAMPLES=False -DRAKNET_ENABLE_DLL=False .. | |
| make -j4 install | |
| cd ../.. | |
| ./clone-or-rebase.sh https://github.com/TES3MP/openmw-tes3mp openmw-tes3mp | |
| mkdir ./openmw-tes3mp/build | |
| cd ./openmw-tes3mp/build | |
| cmake .. -DCMAKE_SYSROOT=$SYSROOT -DCMAKE_BUILD_TYPE=Release -DBOOST_STATIC=True -DBUILD_OPENMW=False -DBUILD_BSATOOL=False \ | |
| -DBUILD_ESMTOOL=False -DBUILD_LAUNCHER=False -DBUILD_MWINIIMPORTER=False -DBUILD_ESSIMPORTER=False \ | |
| -DBUILD_OPENCS=False -DBUILD_WIZARD=False -DBUILD_MYGUI_PLUGIN=False -DBUILD_BROWSER=False -DFORCE_LUA=True \ | |
| -DOPENSCENEGRAPH_INCLUDE_DIRS=$OSG_DIR/include | |
| make -j4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source build_env.sh | |
| mkdir $RPI_ROOT/libs | |
| ./clone-or-rebase.sh https://github.com/raspberrypi/tools tools | |
| wget -c https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz | |
| tar xzf boost_1_63_0.tar.gz | |
| cd boost_1_63_0 | |
| ./bootstrap.sh --with-libraries=program_options,filesystem,system | |
| sed -i -- 's/using gcc/using gcc : arm : arm-linux-gnueabihf-g++/g' ./project-config.jam | |
| ./b2 toolset=gcc-arm target-os=linux --disable-long-double -sNO_ZLIB=1 -sNO_BZIP2=1 --prefix=$RPI_ROOT/libs install | |
| cd .. | |
| wget -c https://www.lua.org/ftp/lua-5.1.5.tar.gz | |
| tar xzf ./lua-5.1.5.tar.gz | |
| cd lua-5.1.5 | |
| make CC=$CC posix INSTALL_TOP=$RPI_ROOT/libs install | |
| cd .. | |
| wget -c https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.4.0.tar.gz | |
| tar xzf ./OpenSceneGraph-3.4.0.tar.gz | |
| wget -c https://www.dropbox.com/s/z7ohci7tsmrxw4i/osg-workaround.tar.gz | |
| tar xzf ./osg-workaround.tar.gz -C ./OpenSceneGraph-OpenSceneGraph-3.4.0/include |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export RASPBERRY_GCC="$PWD/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin" | |
| PATH="$RASPBERRY_GCC:$PATH" | |
| export SYSROOT=$PWD/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot | |
| export CROSS=arm-linux-gnueabihf | |
| export CXX=${CROSS}-g++ | |
| export CC=${CROSS}-gcc | |
| export LD=${CROSS}-ld | |
| export AS=${CROSS}-as | |
| export RPI_ROOT=$PWD | |
| export BOOST_ROOT=$RPI_ROOT/libs | |
| export RAKNET_ROOT=$RPI_ROOT/RakNet | |
| export OSG_DIR=$RPI_ROOT/OpenSceneGraph-OpenSceneGraph-3.4.0 | |
| export LUA_DIR=$RPI_ROOT/libs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| REPOSRC=$1 | |
| LOCALREPO=$2 | |
| # We do it this way so that we can abstract if from just git later on | |
| LOCALREPO_VC_DIR=$LOCALREPO/.git | |
| if [ ! -d $LOCALREPO_VC_DIR ] | |
| then | |
| git clone --depth=1 $REPOSRC $LOCALREPO | |
| else | |
| cd $LOCALREPO | |
| git checkout | |
| git rebase $REPOSRC | |
| fi | |
| # End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment