# cookiecutter-qt-app
![main](https://github.com/agateau/cookiecutter-qt-app/workflows/main/badge.svg)
## 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 dmg
But 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)
没有合适的资源?快使用搜索试试~ 我知道了~
cookiecutter-qt-app:创建和翻译和打包Qt应用程序的cookiecutter
共70个文件
md:12个
cpp:7个
txt:6个
需积分: 3 1 下载量 12 浏览量
2021-02-05
21:10:20
上传
评论
收藏 225KB ZIP 举报
温馨提示
cookiecutter-qt-app 这是什么? 是用于从项目模板创建项目的命令行工具。 该存储库包含用于构建Qt应用程序的模板。 用此模板创建的应用程序不是简单的“ Hello World”,目的是为“现实世界”应用程序提供有用的基础。 我所说的“真实世界”是指该应用程序附带: 翻译支持 安装数据文件,并在磁盘上查找代码 桌面快捷方式 使用单元测试 适用于Linux,macOS和Windows的软件包/安装程序(WIP,请参见下文) 使用clang格式(TODO)进行代码格式化 包装支持 目前,cookiecutter支持: Linux .deb软件包 Linux .rpm软件
资源详情
资源评论
资源推荐
收起资源包目录
cookiecutter-qt-app-master.zip (70个子文件)
cookiecutter-qt-app-master
cookiecutter.json 500B
.github
workflows
main.yml 1KB
ci
build-app 586B
{{cookiecutter.project_slug}}
packaging
CMakeLists.txt 3KB
macos
generate-ds-store 2KB
LICENSE.MIT 1KB
LICENSE.BSD 1KB
LICENSE.GPL 34KB
ci
apply-codingstyle 88B
lib
windows-dependencies.sh 635B
macos-dependencies.sh 109B
headless-test-helper 214B
common-dependencies.sh 3KB
common.sh 2KB
README.md 138B
run-clang-format.py 11KB
linux-dependencies.sh 783B
README.md 73B
build-app 3KB
.gitignore 17B
check-codingstyle 109B
third-party
catch2
catch.hpp 630KB
CMakeLists.txt 326B
README.md 164B
src
Resources.h 303B
Resources.cpp 1KB
SettingsDialog.ui 2KB
linux
{{cookiecutter.project_slug}}.desktop 262B
icons
application-exit.svg 421B
SettingsDialog.h 356B
CMakeLists.txt 2KB
macos
Info.plist.in 1021B
main.cpp 1KB
MainWindow.h 450B
app.qrc 178B
BuildConfig.h.in 482B
translations
{{cookiecutter.project_slug}}_en.ts 1KB
{{cookiecutter.project_slug}}_fr.ts 1KB
{{cookiecutter.project_slug}}_es.ts 1KB
appicon
CMakeLists.txt 148B
256-apps-{{cookiecutter.project_slug}}.png 4KB
sc-apps-{{cookiecutter.project_slug}}.svg 17KB
MainWindow.ui 1KB
MainWindow.cpp 793B
SettingsDialog.cpp 221B
CMakeLists.txt 2KB
cmake
translations.cmake 1KB
DeployQt.cmake 3KB
find_python_module.cmake 775B
screenshot.png 31KB
README.md 654B
tests
tests.cpp 247B
Catch2QtUtils.cpp 515B
CMakeLists.txt 390B
Catch2QtUtils.h 939B
ExampleTest.cpp 676B
LICENSE.Apache-2.0 11KB
.gitignore 34B
CHANGELOG.md 50B
.clang-format 2KB
LICENSE 1KB
README.md 3KB
docs
icons.md 853B
ci.md 4KB
translations.md 3KB
dependencies.md 1KB
tests.md 1KB
hooks
post_gen_project.py 606B
.gitignore 12B
CHANGELOG.md 1KB
共 70 条
- 1
九九长安
- 粉丝: 22
- 资源: 4534
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 数据库课程设计on-model-for-netwo开发笔记
- linux常用命令大全mage-processing-m开发笔记
- mysql安装配置教程droid-m开发笔记
- PWMmodel-for-network-ids-ma开发笔记
- apache-doris-build-env-for-2.0.c
- apache-doris-build-env-for-2.0.b
- apache-doris-build-env-for-2.0.a
- 1719422999141832_lls-release_cqfw.mobileconfig
- 数据库课程设计processing-m开发笔记
- pycharm安装教程ention-model-for-开发笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0