**librsvg2-dev** adds support for SVG images in Ge in the GTK version of ProviewR.
**libgstreamer1.0-dev** and **libgstreamer-plugins-base1.0-dev** adds support for network video cameras in the GTK version of ProviewR.
**OBS!** If you do not have a valid display when building ProviewR, or build ProviewR on a server, see section "Building without a display" below
## 2. Easy way
Unpack the source package
> tar -xzvf pwrsrc_4.8.0.tar.gz
Enter the sourcecode root directory
> cd pwr_4.8.0
Execute the makefile
> make
When the compilation is finished, follow the instructions to insert the three lines in your .bashrc file.
## 3. Thorough way
This is a more thorough way to install the development environment, which is recommended if you will make a lots of changes in the source code and handle different version of ProviewR.
### 3.1 Setting up the environment
The first thing to do is to set up your environment properly. Add the
Replace /home/robert/x5-6-1 with the directory where you unpacked the sources.
### 3.2 Creating the environment
Creating and handling your environment is done with the pwre-function (added by sourcing $pwre_bin/pwre_function). See section "Cross-compiling" below about compiling a 32-bit version of ProviewR on a 64-bit machine.
> pwre
shows all possibilites of the pwre build script.
Add an environment named 'x561x86' (choose any name you like).
> pwre add x561x86
> Source root [...] ? /home/robert/x5-6-1/src (where /home/robert/x5-6-1 is replaced with the directory where you unpacked the sources)
Now the environment is set up and we can start the build procedure.
### 3.3 Building ProviewR
ProviewR is divided into several modules which can be built separately. These modules are:
The ProviewR kernel module **rt**, the ProviewR workbench **wb**, and the ProviewR runtime interface **xtt**.
As well as a number of optional, vendor-specific libraries: **abb**, **bcomp**, **inor**, **java**, **klocknermoeller**, **misc**, **nmps**, **opc**, **otherio**, **othermanu**, **profibus**, **remote**, **sev**, **siemens**, **simul**, **ssabox**, **telemecanique**, **tlog**.
To build all modules from scratch and merge them:
> pwre build_all_modules
Otherwise, you can also build one module at a time. To "move" between the different modules
> pwre module wb (for example)
To build everything in the current module
> pwre build_all
To build parts of current module (for example lib/rt/src in kernel module)
> pwre build lib rt src
Each of the modules have their own build tree. When you are finished with a specific module it must be merged into the common build tree. This is done via:
> pwre merge
## 4. Start using ProviewR
When ProviewR has been built, there are a few final steps you have to do before you start using it.
Create directory that will keep track of your projects and volumes aswell as the different ProviewR-versions you have installed.
> mkdir /usr/pwrp/adm/db
Copy the default configuration files to this directory (if they do not already exist)
Create a file name pwr_projectlist.dat in this directory and add the following line to this file:
> %base X5.6.1 /home/robert/X5-6-1/rls_dbg
where /home/robert/X5-6-1/rls_dbg is replaced by your build-root (see section 3.2).
Add the following two lines to your .bashrc-file:
> export pwra_db="/usr/pwrp/adm/db"
> source $pwra_db/pwr_setup.sh
Voila, finished !
## Powerlink (optional)
Install the following packages:
> apt-get install libpcap-dev cmake cmake-qt-gui
unpack openPOWERLINK_V2.7.1.tar.gz
> tar xvzf openPOWERLINK_V2.7.1.tar.gz
Go to the /stack/build/linux folder
> cd openPOWERLINK_V2.7.1.tar.gz/stack/build/linux
Use cmake to generate makefiles
> cmake -DMAKE_BUILD_TYPE=Release ../..
Compile and install
> make
> make install
## Note on building the QT version
If you get the error "No such file "thread/file_qt.h", then the -pthread flag was passed to the moc compiler. Remove the -pthread flag from $cinc in src/tools/bld/src/os_linux/hw_xx/variables.mk."