GNOME Calendar Setup
I was quite lost when I first cloned the gnome-calendar repo. There were many errors and I wasn’t sure how to get all the dependencies. Hopefully this helps people out who want to work on GNOME projects.
Note: I’m currently using Zed as my editor so the configs will differ if you’re using something else.
Install the dependencies Link to heading
Install the dependencies for building gnome-calendar.
sudo dnf builddep gnome-calendar
Configure the build directory Link to heading
Meson makes the build directory with stuff in there to compile it.
meson setup _build
Meson generates a compile_commands.json file in the build directory.
Pointing the clangd config to it will allow Zed work well with all the code.
Add this to your .zed/settings.json.
{
"lsp": {
"clangd": {
"initialization_options": {
"compilationDatabasePath": "_build",
},
},
},
}
Build and run Link to heading
Compile the project and run it.
meson compile -C _build
./_build/src/gnome-calendar
Enable debug builds Link to heading
Build it again with the debug symbols. Meson ignores the command if the build directory already exists so you need to pass the --reconfigure flag.
meson setup _build --buildtype=debug --reconfigure
Debugging with Zed Link to heading
Create a debug configuration in .zed/debug.json.
[
{
"label": "Debug GNOME Calendar",
"build": {
"command": "meson",
"args": ["compile", "-C", "_build"],
},
"program": "$ZED_WORKTREE_ROOT/_build/src/gnome-calendar",
"request": "launch",
"adapter": "CodeLLDB",
},
]
I had issues with the debug build not starting because there was already an instance running. So kill the current instance before starting the debug build.
killall gnome-calendar