Skip to content

Build OpenBoard on MacOS

kaamui edited this page Jun 30, 2023 · 10 revisions

⚠️ Disclaimer ⚠️

These instructions work only for the coming version : OpenBoard 1.7. At the time you are reading, you need to place yourself on the dev branch (explained below). If you want to build OpenBoard 1.6.4, you'll need to install QtWebKit instead of QtWebEngine, but we strongly recommend you to use the QtWebEngine library and the dev branch instead.

Prepare your environment

Install XCode

Install Xcode via Apple Store. Then, open a terminal and run the following command :

xcode-select --install

sudo xcodebuild -license

Install MacPorts

Go to https://www.macports.org/install.php and pick the package corresponding to the version of your OS.

Once downloaded, double click on it and follow the instructions to install it. Then, go to your terminal and run :

sudo port -v selfupdate
sudo port upgrade outdated

Install Qt

sudo port install qt5
sudo port install qt5-qtwebengine

Add qmake to environment variables

Open /etc/paths in a text editor with administrator rights :

sudo nano /etc/paths

And add the following line (the location of the qmake binary, when installed with macports) :

/opt/local/libexec/qt5/bin

Install OpenBoard dependencies

sudo port install poppler 
sudo port install quazip 
sudo port install ffmpeg

Install Iceberg

click on this link and install Iceberg => http://s.sudre.free.fr/Software/files/Iceberg.dmg

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

# place yourself on the dev branch
cd OpenBoard
git checkout dev

Compile OpenBoard

Then, go to OpenBard's directory

cd <path_to_openboard>
cd Openboard

You can compile OpenBoard

qmake OpenBoard.pro
make

Package OpenBoard

Go the the release_scripts directory :

cd release_scripts/osx

Edit qmake path in build.sh and package.sh

Now, we need to edit the scripts to define where qmake is located. Open build.sh and package.sh and change the value of BASE_QT_DIR to :

BASE_QT_DIR=/opt/local/libexec/qt5

Execute the scripts

When you want to package a new version of OpenBoard, you have 4 scripts to execute, to create a fully built, packaged, signed and notarized application. Note that you need an Apple developer account to sign and notarize your app. :

sudo ./build.sh
sudo ./codesign.sh "Developer ID Application : ..." # <= you need to replace the parameter by your own certificate
sudo ./package.sh
sudo ./notarize.sh "[email protected]"

Now, you should see your OpenBoard installer in <path_to_openboard>/Openboard/install/macos>

Clone this wiki locally