https://github.com/agateau/cookiecutter-qt-app
A cookiecutter to create Qt applications, with translations and packaging
https://github.com/agateau/cookiecutter-qt-app
cmake cookiecutter cookiecutter-qt cookiecutter-template qt
Last synced: 3 months ago
JSON representation
A cookiecutter to create Qt applications, with translations and packaging
- Host: GitHub
- URL: https://github.com/agateau/cookiecutter-qt-app
- Owner: agateau
- License: other
- Created: 2020-05-03T15:22:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-06T14:50:34.000Z (over 4 years ago)
- Last Synced: 2025-02-28T16:08:24.768Z (3 months ago)
- Topics: cmake, cookiecutter, cookiecutter-qt, cookiecutter-template, qt
- Language: Python
- Homepage:
- Size: 281 KB
- Stars: 38
- Watchers: 4
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cookiecutter-qt-app

## What is this?
[Cookiecutter][cookiecutter] is a command-line tool to create projects from project templates. This repository contains a template to build a Qt application.
[cookiecutter]: https://github.com/audreyr/cookiecutter
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)[Catch2]: https://github.com/catchorg/Catch2
### Packaging support
Right now the cookiecutter supports:
- Linux .deb packages
- Linux .rpm packages
- Windows installers
- macOS dmgBut the goal is to add:
- Linux AppImage
- Linux Snaps
- Linux FlatPak## Getting started
Install cookiecutter:
```
pip install cookiecutter
```Create your app by running:
```
cookiecutter https://github.com/agateau/cookiecutter-qt-app
```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
```Look in `/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:
```
make check
```You are all set, time to turn this skeleton into a real app!
## Creating packages
To generate a package (or an installer, depending on your OS), build the `package` target:
```
make package
```This will generate a package or installer for your app.
You can also generate a source archive using the `package_source` target.
## 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](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.
## Documentation
- Dependencies: [docs/dependencies.md](docs/dependencies.md)
- CI: [docs/ci.md](docs/ci.md)
- Unit-tests: [docs/tests.md](docs/tests.md)
- Icons: [docs/icons.md](docs/icons.md)
- Translations: [docs/translations.md](docs/translations.md)