What is this?
Cookiecutter is a command-line tool to create projects from project templates. This repository contains a template to build a Qt application.
The application created with this template is not a simple "Hello World", the goal is to produce a useful base for a "real world" application.
By "real world" I mean the application comes with:
- Translation support
- Installing data files, and code to find them on the disk
- Desktop shortcuts
- Unit-testing, using Catch2
- Packages/installers for Linux, macOS and Windows (WIP, see below)
- Code formatting, using clang-format (TODO)
Right now the cookiecutter supports:
- Linux .deb packages
- Linux .rpm packages
- Windows installers
- macOS dmg
But the goal is to add:
- Linux AppImage
- Linux Snaps
- Linux FlatPak
pip install cookiecutter
Create your app by running:
and answering the questions.
Your app skeleton is now ready, time to build it:
cd your_app_name mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/where/to/install .. make make install
/where/to/install. Your app should be there, ready to be started. Give it a try!
Your app source code comes with some unit-tests. You can run them with:
You are all set, time to turn this skeleton into a real app!
To generate a package (or an installer, depending on your OS), build the
This will generate a package or installer for your app.
You can also generate a source archive using the
Continuous Integration support
The created app comes with a
ci directory containing scripts to help you setup continuous integration. You can learn more about it in docs/ci.md.
CI for the cookiecutter itself
This cookiecutter has a CI setup itself. It works by first running
cookiecutter to produce the app, then running the scripts from the produced app to build it. This way the app CI scripts are tested in a setup closer to the real use case.