Skip to content

Build OpenBoard on Ubuntu 20.04 (1.6.4 and before)

kaamui edited this page Jan 2, 2024 · 1 revision

⚠️ Disclaimer ⚠️

These instructions work only for OpenBoard 1.6.4, and no longer work for the current version. We recommend you to compile the 1.7.0 version, by following the instructions for Ubuntu 22.04 instead, with the option "Install another version of Qt". To do so, please follow this link

Prepare your environment

Install git

sudo apt install git

Install Qt

Go to Qt downloads page and follow the instructions to download the opensource version of Qt

  • https://www.qt.io/download-open-source
  • at the bottom of the page, click on the "Download the Qt Online Installer" button
  • on the next page, Qt chose automatically the version corresponding to your current OS, so be sure it is the version you want to download (for this example, "Qt Online Installer for Linux (64-bit)")
  • click on the "Download" button

You need to add the right to your user to execute this file :

#for this example, I had to execute the followings commands
cd
cd Downloads
chmod u+x qt-unified-linux-x64-3.1.1-online.run
# launch the installer (and follow the instructions) by executing this command :
./qt-unified-linux-x64-3.1.1-online.run

Follow the instructions and pick the <Qt_version> you want (for example 5.15.2), regarding that :

  • no need for Web Assembly, Android compilers and sources though so you can deactivate them to reduce the amount of data installed
  • QtWebkit only provides packages for Qt 5.15 in their latest release. If you use another version of Qt, you'll have to compile QtWebkit by yourself.

Install QtWebKit

Download QtWebKit :

For this example, we choose the qtwebkit-Linux-RHEL_7_6-GCC-Linux-RHEL_7_6-X86_64.7z binary

  • Uncompress it. And copy the folders in your Qt path (for example /home/dev/Qt/5.15.2/gcc_64/)
  • Accept to merge the folders.

Configure qtchooser/qmake

sudo apt install qtchooser

#replace the <path_to_your_Qt_folder> by the correct value (for example, "/home/dev/Qt")
#replace the <Qt_version> by the correct value (for example, "5.15.2")
echo "<path_to_your_Qt_folder>/<Qt_version>/gcc_64/bin/" >> default.conf
echo "<path_to_your_Qt_folder>/<Qt_version>/gcc_64/lib/" >> default.conf

sudo mv default.conf /usr/lib/x86_64-linux-gnu/qtchooser/

After this, you can verify that you correctly configured qmake by taping qmake -v this command should result on :

QMake version x.y
Using Qt version <Qt_version> in <path_to_your_Qt_folder>/<Qt_version>/gcc_64/lib

Install OpenBoard dependencies

# Informational list of build-essential packages
sudo apt install build-essential

# free implementation of the OpenGL API -- GLX development files
sudo apt install libgl1-mesa-dev

# generic font configuration library - runtime
sudo apt install libfontconfig1 

# Secure Sockets Layer toolkit - development files
sudo apt install libssl-dev

# PDF rendering library -- development files
sudo apt install libpoppler-dev

# PDF rendering library -- development files (CPP interface)
sudo apt install libpoppler-cpp-dev

# PDF rendering library -- private development files
sudo apt install  libpoppler-private-dev

# ffmpeg libraries and associated dependencies
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libpaper-dev libva-dev libxcb-shm0-dev libasound2-dev libx264-dev libvpx-dev libvorbis-dev  libtheora-dev li
bmp3lame-dev libsdl1.2-dev libopus-dev  libfdk-aac-dev libass-dev liblzma-dev libbz2-dev

# C++ wrapper for ZIP/UNZIP (development files)
sudo apt install libquazip5-dev

# X C Binding, shape extension, development files
sudo apt install libxcb-shape0-dev

# X C Binding, xfixes extension, development files
sudo apt install libxcb-xfixes0-dev

Download OpenBoard sources

# place yourself in the directory you want 
# (in this example at user's home directory)
cd

# create the folder
mkdir openboard

# enter in it
cd openboard

# download openboard sources
git clone https://github.com/OpenBoard-org/OpenBoard.git
git clone https://github.com/OpenBoard-org/OpenBoard-Importer.git

Compile OpenBoard

cd <path_to_openboard>
cd Openboard

Then, you can compile OpenBoard

qmake OpenBoard.pro
make

Package OpenBoard

cd release_scripts
cd linux

First, open build.sh and package.sh in your favorite text editor, and modify this line to point to the correct Qt path :

 QT_PATH="<path_to_your_Qt_folder>/<Qt_version>/gcc_64"

Then, launch the build

sudo ./build.sh

Finally, launch the packaging

sudo ./package.sh

Now, you should see your OpenBoard package in <path_to_openboard>/Openboard/install/linux>

Well done !