1. polymorph-team
  2. engine
  3. PE.2.0

Wiki

Clone wiki

PE.2.0 / sdk-setup-linux-debian

SDK setup, for linux (debian based)

Requirements

  • Verify that you have at least 5GB of free space on your drive.
  • CISC architecture CPU (intel/amd)

Having a recent multicore processor and graphic card will speed up a lot the compilation time...

Automated installation

For the lazy ones (like me), download and run the polymorph-install.sh script. It has a CPU core detection that will speed up compilation.

sudo chmod +x polymorph-install.sh && ./polymorph-install.sh

warning: make sure to use a correct internet connection > if your bandwidth is too low, the retrieval of repositories might fail, rollback and screw up the installtion

Basics

Get compilation libs.

sudo apt update
sudo apt install build-essential mercurial git make cmake automake libtool libboost-chrono-dev libboost-thread-dev libboost-date-time-dev mesa-common-dev libxt-dev libxaw7-dev libxrandr-dev libxxf86vm-dev libglu-dev libglu1-mesa-dev alsa-tools alsa-utils alsa-source libasound2-dev libcppunit-dev doxygen pkg-config libgtk2.0-dev

Visual tools

sudo apt install cmake-qt-gui tortoisehg

CG toolkit for nvidia cards, optional but strongly recommended

sudo apt-get install nvidia-cg-toolkit

AMD & Intel cards, tbd.

Workspace

Creation a workspace, basically in your home folder.

mkdir ~/forge.polymorph
cd ~/forge.polymorph\

Creation of folder's structure

mkdir sdk && mkdir repositories && mkdir polymorph

Getting source code

Getting Ogre 2.0

hg clone https://bitbucket.org/sinbad/ogre repositories/ogre
cd repositories/ogre && hg pull -b v2-0 && hg update -C -r v2-0 && cd ../../

Getting Ogre dependencies

hg clone https://bitbucket.org/cabalistic/ogredeps repositories/ogredeps

Getting Bullet

git clone https://github.com/bulletphysics/bullet3.git repositories/bullet

Getting Puredata

git clone git://git.code.sf.net/p/pure-data/pure-data repositories/pd
git clone https://github.com/libpd/libpd.git repositories/libpd && cd repositories/libpd && git checkout 0.8.3 && git submodule init && git submodule update && cd ../../

Getting polymorph

hg clone https://bitbucket.org/polymorphteam/pe.2.0 repositories/polymorphengine

Compiling dependencies

FreeImage, FreeType, zlib, zziplib, OIS & rapidjson

cd repositories && mkdir build && cd build && cmake -D CMAKE_INSTALL_PREFIX:PATH=../../sdk ../ogredeps && make install && cd ../ && rm -R build && cd ../

SDL2

cd repositories && mkdir build && cd build && cmake -D CMAKE_INSTALL_PREFIX:PATH=../../sdk ../ogredeps/src/SDL2 && make install && cd ../ && rm -R build && cd ../

Bullet

cd repositories && mkdir build && cd build && cmake -D BUILD_BULLET2_DEMO:BOOL=0 -D BUILD_BULLET2_DEMOS:BOOL=0 -D BUILD_SHARED_LIBS:BOOL=1 -D BUILD_UNIT_TESTS:BOOL=0 -D BUILD_CPU_DEMOS:BOOL=0 -D INSTALL_EXTRA_LIBS:BOOL=1 -D CMAKE_INSTALL_PREFIX:PATH=../../sdk ../bullet && make install && cd ../ && rm -R build && cd ../

PureData (system wide)

cd repositories/pd/ && ./autogen.sh && ./configure && sudo make install && cd ../../

puredata is installed in /usr/local/bin/, launch with cd /usr/local/bin/ && ./pd if no shortcut appeared in your application menu

LibPD

cd repositories/libpd/ && make UTIL=true EXTRA=true && make UTIL=true EXTRA=true cpplib && make prefix=../../sdk install && cd ../../

Compiling Ogre

Installing patches

mkdir -p sdk/lib/OGRE/cmake/ && cp repositories/ogredeps/cmake/FindPkgMacros.cmake sdk/lib/OGRE/cmake/FindPkgMacros.cmake
cp repositories/polymorphengine/custom/repository/OgreMain/src/GLX/GLX_backdrop.h repositories/ogre/OgreMain/src/GLX/GLX_backdrop.h
cp repositories/polymorphengine/custom/repository/OgreMain/src/GLX/OgreConfigDialog.cpp repositories/ogre/OgreMain/src/GLX/OgreConfigDialog.cpp

compilation, will take some time

cd repositories && mkdir build && cd build && cmake -D OGRE_BUILD_SAMPLES:BOOL=0 -D OGRE_INSTALL_SAMPLES:BOOL=0 -D OGRE_DEPENDENCIES_DIR:PATH=../../sdk -D CMAKE_INSTALL_PREFIX:PATH=../../sdk ../ogre && make install && cd ../ && rm -R build && cd ../

Compiling Polymorph

cd repositories && mkdir -p polymorphengine/package/build/ && cd polymorphengine/package/build/ && cmake -D OGRE_HOME:PATH=../../../../sdk ../dev && make install && cd ../../../../

Installation and compilation of Empty example

cp -R repositories/polymorphengine/empty.2.0 polymorph/empty.2.0 && cd polymorph/empty.2.0/ && mkdir build && cd build && cmake -D EXEC_NAME:STRING=Empty.2.0 -D OGRE_HOME:PATH=../../../sdk ../app && make install
cd build/dist/bin/ && ./Empty.2.0

Updated