Skip to content

Building under Windows (qt creator 12.x)

academay edited this page Mar 18, 2024 · 1 revision

Building QOwnNotes

Building from GitHub

You can also build QOwnNotes yourself from the source code.
cd QOwnNotes
git submodule update --init

If you build under Windows, you want to stick to MinGw 64-bit. Then download* Qt Creator. You'll need 3 additional components, which can be installed from QT installer / Creator:

  • qtwebsockets.
  • If you build on Qt6, then also qt5compat.
  • Under Windows: MinGw 64-bit.

Qt Installation under Windows:

  • Note: the QT Creator 12.x offline installer does NOT install websockets nor mingw64;

To install & set everything I had to:

  1. register a QT account (mandatory? for package selection; can be done inside the installer)
  2. during installation wizard, choose Custom Installation.
    Or, it can be done later via Tools -> qt maintenance -> start maintenance...
  3. choose a QT release (e.g. 6.6.2, or "preview"), inside the QT release folder, select (check) these items: [X] MingW [X] Qt Websockets [X] Qt5 Compatibility module (only for qt6+ builds)

image

run QT Creator. Menu -> Edit -> Preferences -> Kits:

In the Kits tab:

  • Select the MingW kit (and click "Apply")
  • it might be useful to delete other kits that you don't need.

image

in the Qt Versions tab:

  • select a Qt version, and then apply.

image

Open the project file src/QOwnNotes.pro.

Select debug or release on the bottom left of QC Creator's screen (where it says: "releases"), here:

image

Compile: Build -> Build Project QOwnNotes

Or you can build it directly in your terminal:

qmake
make

The executable file will be found under a subfolder similar to "build-QOwnNotes-Desktop_Qt_6_6_2_MinGW_64_bit-Release", Under Windows, the required DLLs can be found at <qt-installation>\6.*.*\mingw_64\bin\*.dll. Other variation will not work.

That's it (took me 3 days! to figure out)

Please feel free to contribute source code to this project, make suggestions or report troubles on the QOwnNotes issues page.