It’s became increasingly difficult to support HiFi compiling on Ubuntu 14.04, so, much as I prefer to stick with long term support releases, I’ve converted to 14.10 and now using QT at version = to HiFi builds vs one behind as on old setup.
Here’s the quick and dirty steps to setup Ubuntu 14.10 Desktop leading to compiling assignment-client, domain-server and interface. This was tested on a clean install with an ancient Dell Laptop leading to a fully functional stack and Interface (albeit with interface running at a staggering 2 frames/second).
Start with dependency install
sudo apt-get install qt5-default build-essential git cmake qtscript5-dev libglm-dev libssl-dev qttools5-dev qtmultimedia5-dev libqt5svg5-dev libqt5webkit5-dev freeglut3-dev libxmu-dev libxi-dev libxrender-dev libsdl2-dev libquazip-qt5-dev screen
Make a directory if you like to help keep things organized. I use $HOME/build
Pull in HiFi source, gverb and qxmpp
git clone https://github.com/highfidelity/hifi.git
git clone https://github.com/highfidelity/gverb.git
git clone https://github.com/qxmpp-project/qxmpp.git
sudo make install
If you want to clean up some space run
The install will generate an error at end when it tries to generate HTML documentation - harmless, ignore it, don’t panic - carry on.
Create symlinks for gverb
ln -s $HOME/build/gverb/include $HOME/build/hifi/interface/external/gverb/include
ln -s $HOME/build/gverb/src $HOME/build/hifi/interface/external/gverb/src
Next we have to obtain a new dependency about to be introduced - Intel Threaded Building Blocks. I’m going to go with a binary install downloaded from Intel’s project site. I also did it from source - so if you want that, have at it.
tar zxvf tbb43_20141204oss_lin.tgz
sudo mv tbb43_20141204oss /opt
Next we need to define an environment variable
It’s probably a good idea to add that to your shell config as it’s going to stop you building HiFi if not defined. It you want to do this do;
Go to end of file and add the line;
Hit Control O then Control X to save and exit.
Now create a directory to compile in so we don’t pollute HiFi’s source tree
You should see no errors at this point, other than missing bits for leapmotion, vissage etc. Again - ignore those and carry on.
If that all goes well you’re ready to setup a run area for your newly compiled bits. The following is based on my way of doing things.
cp $HOME/build/compile/assignment-client/assignment-client $HOME/run
cp $HOME/build/compile/domain-server/domain-server $HOME/run
cp $HOME/build/compile/interface/interface $HOME/run
Next it’s important to populate resources with bits both domain-server and interface need to run proper. My choice is to symlink the resources from HiFi’s source tree - this keeps it automatically up to date.
ln -s $HOME/build/hifi/domain-server/resources/web $HOME/run/resources/web
ln -s $HOME/build/hifi/domain-server/resources/describe-settings.json $HOME/run/resources/describe-settings.json
ln -s $HOME/build/hifi/interface/resources/config $HOME/run/resources/config
ln -s $HOME/build/hifi/interface/resources/html $HOME/run/resources/html
ln -s $HOME/build/hifi/interface/resources/icons $HOME/run/resources/icons
ln -s $HOME/build/hifi/interface/resources/images $HOME/run/resources/images
ln -s $HOME/build/hifi/interface/resources/info $HOME/run/resources/info
ln -s $HOME/build/hifi/interface/resources/mention-sounds $HOME/run/resources/mention-sounds
ln -s $HOME/build/hifi/interface/resources/meshes $HOME/run/resources/meshes
ln -s $HOME/build/hifi/interface/resources/shaders $HOME/run/resources/shaders
ln -s $HOME/build/hifi/interface/resources/sounds $HOME/run/resources/sounds
ln -s $HOME/build/hifi/interface/resources/styles $HOME/run/resources/styles
ln -s $HOME/build/hifi/interface/resources/visage $HOME/run/resources/visage
$HOME/resources is where your voxel, metavoxel and entity data will be saved.
To run stack (your own domain) execute the following;
screen -dmS d ./domain-server
screen -dmS a ./assignment-client -n 5
To run interface execute the following;
To terminate stack do this;
screen -r d
type a single Control C
screen -r a
WAIT about 30 seconds or more before you terminate assignment-client, this can avoid some unpredictable nastiness with models being lost from build.
type a single Control C
Done. Good luck and happy HiFing
If you want to see what assignment or domain is doing but not terminate after screen -r d (or a) then instead of Control C type Control A D which will detach the screen session leaving the server running.
Some of the lines seem to wrap no matter what I do - the longer lines creating the sym links especially, watch for that.