Skip to content

Build OpenBoard on Windows

Clément Fauconnier edited this page Aug 16, 2024 · 3 revisions

Prepare your environment

Install git bash

Install VS 2019 Community

  1. Download https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16
  2. Choose Desktop Development in C++

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 Windows (64-bit)")
  • click on the "Download" button

Follow the instructions (for this example, Qt is installed in C:\ and pick the <Qt_version> you want (for example 5.15.2).

Important Note : The Qt WebEngine binary provided by Qt does not come with proprietary codecs enabled, which means that you won't be able to play videos using a proprietary codec for sound or video. Some major video platforms like Vimeo and PeerTube won't work. If you need proprietary-codecs to be enabled, please follow these instructions, instead of picking Qt Webengine in the following lines.

In the Qt version you'll select, you'll need to pick :

  • Desktop msvc2019
  • Qt WebEngine (if not building Qt WebEngine with proprietary codecs)
  • Qt Debug Information Files (recommended, but not mandatory)

For the rest of this tutorial, we supposed Qt is installed at "C:\Qt"

Add qmake to environment variables

  • Add qmake folder to environment variables :

    • search for "Environment Variables" on Windows searchbar, click on it.
    • click on the last button at the bottom of the page, called "environment variables"
    • on the "system variables" window, add the Qt bin folder - where qmake.exe, using msvc 2019, is located - to the Path variable (for example "C:\Qt\5.14.2\msvc2019_64\bin")
  • search for "x86_x64 Cross Tools Command Prompt for VS 2019" on Windwos searchbar, click on it

You can verify that you correctly configured qmake and nmake by respectively taping qmake -v and nmake/? these commands should show something like following :

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>qmake -v
QMake version x.y
Using Qt version <Qt_version> in <path_to_your_Qt_folder>/<Qt_version>/msvc2019_64/lib

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>nmake /?
Microsoft (R) Program Maintenance Utility Version 14.26.27034.0
Copyright (C) Microsoft Corporation. Tous droits réservés.

Download OpenBoard sources

  • Open git bash
# 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-ThirdParty.git

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

Compile OpenBoard

First, you need to compile the third-party libraries that OpenBoard is going to need.

Still in this Command Prompt, go to Openboard-ThirdParty's directory

cd <path_to_openboard>
cd Openboard-ThirdParty

freetype

cd freetype
qmake freetype.pro
nmake

quazip

cd quazip
qmake quazip.pro
nmake

xpdf

cd xpdf
qmake xpdf.pro
nmake

OpenBoard

Now, you can go back to OpenBard's directory

cd <path_to_openboard>
cd Openboard

You can now compile OpenBoard

qmake OpenBoard.pro
nmake

Package OpenBoard

Install Inno Setup

Configure the packaging script

Go to :

cd release_scripts\windows

Open release.win7.vc9.bat in your favourite text editor, and modify these lines to point to the correct locations :

#In our example
set QT_DIR=C:\Qt\5.15.2\msvc2019_64
 
#...
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 6\iscc.exe
 

Launch the packaging

release.win7.vc9.bat

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

Clone this wiki locally