Raspberry Pi - BUILDING.txt - Update

popcorn

New Member
#1
Well... Not really a bug.

Another package needs to be added to the raspberry pi instructions.

I was trying httprequests using GLFW target and I was getting build issues with curl so I added libcurl4-openssl-dev and all seems to work fine.
 

dawlane

Active Member
CX Code Contributor
#3
@dawlane is this a linux issue or a PI issue?
It would be both.

There are three versions of libcurl4 development packages, one OpenSSL (under an Apache licence), Network Security Services (aka nss, under an Mozilla Public licence) and GnuTLS (a LGPL library if I remember). Libcurl can use any of these back-end TLS's, it's just a case of which licence the end user wan'ts to use.

It's pretty much standard that all three core libraries are installed (the list below should be current).
Core libraries:
OpenSSL: libssl1.0, libssl1.1​
NSS: libnss3​
GnTLS: libgnutls30​
Development libraries for libcurl4: Note you should only be able to install only one of these.
OpenSSL: libcurl4-openssl-dev​
NSS: libcurl4-nss-dev​
GnTLS: libcurl4-gnutls-dev​
As these are not essential for actually building Cerberus, not unless someone makes a Cerberus tool that uses the httprequest module. Then the only place as I see it, is that it should be mentioned in the Cerberus documentation or as a side note in the BUILDING.TXT
 

dawlane

Active Member
CX Code Contributor
#4
This should do for now:

Building instructions

The Cerberus IDE Ted can now be built against later version of the Qt SDK see BUILDING TED WITH Qt

======= LINUX =======
NOTE: You need to install a graphics driver that supports harware acceleration.

You should find all the developer packages in your distributions online repository.

E.G. for Ubuntu/Linux Mint
sudo apt-get -y install g++ libglu1-mesa-dev libopenal-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev libxxf86vm-dev libx11-dev libgl1-mesa-dev

Raspbery Pi:
Open Terminal window:
sudo raspi-config

Navigate to:
7 - Advanced options
A7 - GL Driver
G1 - GL (Full KMS) OpenGL desktop driver with full KMS

sudo apt-get -y install g++ libglu1-mesa-dev libopenal-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev libxxf86vm-dev libx11-dev libgl1-mesa-dev
sudo apt-get -y install libqt5webkit5-dev libqt5sensors5-dev qtlocation5-dev libxslt1-dev libsqlite3-dev libgstreamer-plugins-base0.10-dev qt5-default libicu-dev

Qt4
sudo apt-get install libqt4-dev libqtwebkit-dev qt4-default

Qt5
sudo apt-get -y install libqt5webkit5-dev qtlocation5-dev qtsensors5-dev libxslt-dev libsqlite3-dev libgstreamer-plugins-base0.10-dev qt5-default libicu-dev

Special not for 64 bit users of Debian/Ubuntu and their derivatives:
Please be aware that you will of course need the g++-multilib package installed to do the following.
It is posible to cross compile and test for 32 bit builds by linking the required development libraries like so

Debian
sudo ln -s /usr/lib/i386-linux-gnu/libGL.so.1 /usr/lib32/libGL.so

Ubuntu
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib32/libGL.so

All
sudo ln -s /usr/lib/i386-linux-gnu/libopenal.so.1 /usr/lib32/libopenal.so
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib32/libX11.so
sudo ln -s /usr/lib/i386-linux-gnu/libXxf86vm.so.1 /usr/lib32/libXxf86vm.so
sudo ln -s /usr/lib/i386-linux-gnu/libXi.so.6 /usr/lib32/libXi.so
sudo ln -s /usr/lib/i386-linux-gnu/libXrandr.so.2 /usr/lib32/libXrandr.so
sudo ln -s /usr/lib/i386-linux-gnu/libXinerama.so.1 /usr/lib32/libXinerama.so
sudo ln -s /usr/lib/i386-linux-gnu/libXcursor.so.1 /usr/lib32/libXcursor.so

Optional: libcurl4-xxxx-dev
There are three versions of libcurl4 development packages, one OpenSSL (under an Apache licence), Network Security Services (aka nss, under an Mozilla Public licence)
and GnuTLS (a LGPL library if I remember). libcurl can use any of these back-end TLS's, it's just a case of which licence the end user wan'ts to use.

It's pretty much standard that all three core libraries are installed.
Core libraries:
OpenSSL: libssl1.0, libssl1.1
NSS: libnss3
GnTLS: libgnutls30

Development libraries for libcurl4: Note you should only be able to install only one of these.
OpenSSL: libcurl4-openssl-dev
NSS: libcurl4-nss-dev
GnTLS: libcurl4-gnutls-dev

These libraris are not essential for building Cerberus, but they are if you intend to use the httprequester module.

Once you have installed the libraries you just need to run the rebuildall.sh in the src folder.

======= WINDOWS VISTA/WIN7/8/X =======
You will require the Window version of GCC, either MinGW (http://www.mingw.org/) or TDM (http://tdm-gcc.tdragon.net/)
You will need Visual Studio 2013 and the corresponding Qt 5.5.1 SDK for Visual Studio 2013 to build Ted

You will find a power-shell script called rebuildall.ps1 that should work on Win7+.
To use it open a power shell (not the noraml command shell) and type
.\rebuildall.ps1 -mingw "path_to_mingw_root_directory" -qtsdk "path_to_qtsdk_root_directory" -qtspec "qtspec_directory_for_compiler"

NOTE: This script requires that the execution policy for the current user be set to unrestricted.
to do this open a power shell as administrator and use:
get-executionpolicy -list
set-executionpolicy -scope currentuser unrestricted
If the file is still blocked use:
unblock-file -path "full_path_to_this_script"
You should reset the execution policy back to it's original state e.g.:
set-executionpolicy -scope currentuser undefined

ALSO NOTE:
The parameters -mingw and -qtsdk are optional if you already have both paths set correctly in your system paths.
The defaults are shown
'path_to_mingw_root_directory' would be for example:
C:\MinGW

'path_to_qtsdk_root_directory' would be for example:
C:\Qt5\5.5\msvc2013_64

If you are using a different compiler, you need to tell qmake which pre-built binaries you wish to use.
These are located in the Qt SDK under the mkspecs directory
'qtspec_directory_for_compiler' would be for example
win32-msvc2013 for Visual Studio 2013

To build a debug version of Ted add -qtdbg 1

======= MAC OSX =======
TO DO


====== BUILDING TED WITH Qt ======
Ted can now be built against later versions of the Qt SDK.
The source code supplied was tested against Qt5.9.2 as that supported both Visual Studio 2015 and Visual Studio 2017.
To build successfully you need to install the QtWebEngine module. In those Qt releases where QtWebKit is still available,
you shoud not install QtWebKit as there was a transistion period where the module webenginewidges were not part of the Qt SDK.

==== LINUX ====
It's recommened that the QtSDK should be downloaded via the online installer from the Qt Company's website https://www.qt.io/download.
If the distribution has QtSDK 5.6+ onwards, then you should be able to install that.
The only major change was Qt Webkit being replaced with QtWebEngine.

To buiild from the downloaded QtSDK:
Open a terminal and type (replace qt_path with the path for the Qt binary install e.g. /home/user_name/Qt/5.9.2/gcc_64):
export PATH="qt_path:qt_path/bin:$PATH"
cd path_to_cerberus/src
mkdir build-ted-Desktop && cd build-ted-Desktop
qmake CONFIG+=release ../ted/ted.pro
make
makemake install

==== Windows ====
Install Visual Studio 2015/2017
Run QtCreator and make sure that the Qt 5.9.2 is set as a Qt Kit. Search google on how to do this.
Open the ted.pro file in the ted source directory.
Select the Release configuration (bottom left) and click the build button (hammer bottom left)
In the cerberus bin directory, delete the directories; audio, bearer, imageformats, mediaservice, playlistformats, position, printsupport,
sensors, sensorgestures, sqldrivers, opengl32sw.dll from the cerberus bin, bin\platform, bin\resources, bin\translations directory.

==== Mac OSX ====
Install xcode and the xcode build tools.
Open a terminal and type (replace qt_path with the path for the Qt binary install e.g. /Users/user_name/Qt/5.9.2/clang_64 and bundle_id e.g. com.krautapps):
export PATH="qt_path:qt_path/bin:$PATH"
cd path_to_cerberus/src
mkdir build-ted-Desktop && cd build-ted-Desktop
qmake CONFIG+=release ../ted/ted.pro QMAKE_TARGET_BUNDLE_PREFIX=bunble_id
make
 
Top Bottom