The software is built using the meson build system. It is similar to Cmake but better. There are several ways to get meson on your system: Installing Meson Guide
Element uses meson subprojects. Initialize them to avoid errors later. Make sure
to run the update
command every time new code is pulled.
On Mac and Windows, most dependencies are pulled in by Meson. You’ll need to manually install boost headers and other SDKs.
1meson subprojects download
2meson subprojects update --reset
This will attempt creating a universal binary for Mac OS.
1meson setup --native-file=meson/subs.ini --native-file=meson/osx.
2meson compile -C build
This will create build/deploy/osx/Element.app
In order to target a single architecture, modify the setup command by appending an additional config e.g. to target M1 only do…
1meson setup --native-file=meson/subs.ini \
2 --native-file=meson/osx.ini \
3 --native-file=meson/osx-m1.ini build
You will need to install Python3 and possibly other tools. Ninja can be used directly, but vcvars
must be set beforehand. Unless performing a release build, using meson compile
will set them automatically.
1meson setup --native-file=meson/subs.ini --native-file=meson/msvc.ini build
2meson compile -C build
Ths will create build/element.exe
. No install step necessary
Should compile like above but works better without using *.ini
files.