A minimal, opinionated template for building desktop applications with Vala and GTK. This repository provides a simple project structure, build scripts, and examples to get you started quickly.
Features
- Vala source layout
- Meson + Ninja build files
- Basic GTK application skeleton
Requirements
- Vala
- Vala compiler (>= 0.54)
- Meson build system
- Ninja
- GTK 3 or GTK 4 development packages (depending on template)
- GLib / GIO development packages (glib-2.0)
- Libadwaita development package (libadwaita-1, >= 1.6)
- Math library (libm) — usually provided by the system C library (optional)
Quick start
-
Install dependencies
Debian/Ubuntu:
sudo apt install valac meson ninja-build libgtk-4-dev
Fedora:
sudo dnf install valac meson ninja gtk4-devel blueprint-compiler
-
Configure and build: meson setup build meson compile -C build
Alternative (Makefile) If you prefer using the provided Makefile, the following targets are available:
- build: configure the meson build directory (meson setup build --prefix=/usr)
- run: build and run the application (invokes ninja then runs the built binary)
- build-run: clean, build, extract translations and run (shorthand for a full dev cycle)
- install: install the built files to the system (ninja install in build dir)
- uninstall: undo install (ninja uninstall in build dir)
- translations: generate/update POT/PO files (uses meson-generated targets)
- clean: remove the build directory
Usage example:
make build
make run
- Run the application: ./build/src/vala_application_template
Project structure
- src/ - Vala source files
- data/ - UI files, icons, resources
- meson.build - top-level build file
- README.md - this file
Development notes
- Use
meson setup --reconfigure buildafter changing build options - Use
valac --versionto check your Vala toolchain
License Specify your preferred license in the LICENSE file. This template does not include a license by default.
Contributing Feel free to open issues or submit pull requests to improve the template.
Enjoy building with Vala!