Qt-App

所属分类:其他
开发工具:C++
文件大小:0KB
下载次数:1
上传日期:2024-02-22 11:08:36
上 传 者sh-1993
说明:  QT APP 插件式开发模版
(QT APP plug-in development template)

文件列表:
3rdparty/
aggregation/
apps/
cmake/
core/
doc/
extensionsystem/
gui/
packaging/
plugins/
resource/
utils/
.clang-format
.clang-tidy
CMakeLists.txt
LICENSE
Qt-App.pro
common.pri
libs.pri

# Qt-App - [简体中文](https://github.com/RealChuan/Qt-App/blob/master/README.md) - [English](https://github.com/RealChuan/Qt-App/blob/master/README.en.md) 图片资源等来自于互联网。 本代码仓库,仅供学习,若被他人用于商业用途 与本人无关! 请遵守许可证! ## Qt-App - 基于插件是开发的桌面应用程序框架,可以用于快速开发桌面应用程序; [qt-creator/src/libs/extensionsystem at master · qt-creator/qt-creator (github.com)](https://github.com/RealChuan/Qt-App/blob/master/https://github.com/qt-creator/qt-creator/tree/master/src/libs/extensionsystem); - 配合[vcpkg](https://github.com/RealChuan/Qt-App/blob/master/https://github.com/microsoft/vcpkg)进行使用; - 同时支持[cmake](https://github.com/RealChuan/Qt-App/blob/master/.github/workflows/cmake.yml)和[qmake](https://github.com/RealChuan/Qt-App/blob/master/.github/workflows/qmake.yml)编译; - [支持Apple Silicon原生编译;](https://github.com/RealChuan/Qt-App/blob/master/#问题和备注) - 支持[actions](https://github.com/RealChuan/Qt-App/blob/master/.github/workflows/cmake.yml)编译,打包、发布;
## CrashReport 崩溃报告程序;
## 代码结构 1. [3rdparty](https://github.com/RealChuan/Qt-App/blob/master/3rdparty):第三方库; 1. [qtlockedfile](https://github.com/RealChuan/Qt-App/blob/master/3rdparty/qtlockedfile):Qt文件锁; 2. [qtsingleapplication](https://github.com/RealChuan/Qt-App/blob/master/3rdparty/qtsingleapplication):Qt单实例; 3. [breakpad](https://github.com/RealChuan/Qt-App/blob/master/3rdparty/breakpad.hpp):基于Google Breakpad封装的崩溃捕捉; 2. [aggregate](https://github.com/RealChuan/Qt-App/blob/master/aggregate):聚合; 3. [apps](https://github.com/RealChuan/Qt-App/blob/master/apps):应用程序; 1. [app](https://github.com/RealChuan/Qt-App/blob/master/apps/app):Qt-App; 2. [crashreport](https://github.com/RealChuan/Qt-App/blob/master/apps/crashreport):CrashReport; 4. [cmake](https://github.com/RealChuan/Qt-App/blob/master/cmake):封装的CMake实用函数; 1. [utils](https://github.com/RealChuan/Qt-App/blob/master/cmake/utils.cmake):实用函数; 5. [core](https://github.com/RealChuan/Qt-App/blob/master/core):插件都继承于此; 6. [extensionsystem](https://github.com/RealChuan/Qt-App/blob/master/extensionsystem):插件系统,代码来自于Qt-Creator,做了一些修改; 7. [gui](https://github.com/RealChuan/Qt-App/blob/master/gui):封装的界面组件; 8. [plugins](https://github.com/RealChuan/Qt-App/blob/master/plugins):插件; 1. [coreplugin](https://github.com/RealChuan/Qt-App/blob/master/plugins/coreplugin):核心插件,主界面、菜单、工具栏、状态栏、设置、插件管理器等; 2. [hashplugin](https://github.com/RealChuan/Qt-App/blob/master/plugins/hashplugin):哈希插件,QT提供的哈希算法; 3. [serialplugin](https://github.com/RealChuan/Qt-App/blob/master/plugins/serialplugin):串口插件; 4. [tcpplugin](https://github.com/RealChuan/Qt-App/blob/master/plugins/tcpplugin):TCP插件; 9. [resource](https://github.com/RealChuan/Qt-App/blob/master/resource):图片和QSS文件; 10. [utils](https://github.com/RealChuan/Qt-App/blob/master/utils):工具函数封装; ## 问题和备注 - MacOS,cmake生成的bundle,在.app/Contents/文件夹下没有生成`PkgInfo`文件; 1. [app/CMakeLists](https://github.com/RealChuan/Qt-App/blob/master//apps/app/CMakeLists.txt),使用这个CMakeLists.txt可以在MacOS上生成bundle,也可以正常显示图标,但是没有PkgInfo文件; 2. cmake该怎么生成PkgInfo文件? 1. WireShark使用`set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/PkgInfo PROPERTIES MACOSX_PACKAGE_LOCATION .)`类似这种方式,拷贝到bundle中; 3. qmake默认会生成PkgInfo文件,只需要指定`TARGET=app`或者`CONFIG+=bundle`即可; - Unix 系统下,需要尽量使用静态库,避免动态库的依赖问题; 1. 本项目有几个模块是动态库,因为是plugin,需要动态加载; 2. 然后需要对这几个动态库进行打包,然后在运行时加载,还需要对rpath`"-Wl,-rpath,\'\$$ORIGIN\':\'\$$ORIGIN/lib\':'\$$ORIGIN/../lib'")`,进行设置,否则会找不到动态库; 3. 或者使用install_name_tool(macos)、patchelf/chrpath(linux)修改动态库的依赖路径,非常麻烦; 4. 还要考虑到这些库都是可以共享的,所以不要重复打包; 5. 具体可以看[workflows](https://github.com/RealChuan/Qt-App/blob/master/.github/workflows/cmake.yml); - MacOS,[vcpkg](https://github.com/RealChuan/Qt-App/blob/master/https://github.com/microsoft/vcpkg)编译第三方库问题; 1. 由于[vcpkg](https://github.com/RealChuan/Qt-App/blob/master/https://github.com/microsoft/vcpkg)目前[只支持单独编译x64-osx和arm64-osx](https://github.com/RealChuan/Qt-App/blob/master/https://github.com/microsoft/vcpkg/discussions/19454); 2. 在使用[cmake](https://github.com/RealChuan/Qt-App/blob/master/.github/workflows/cmake.yml)时,需要指定`CMAKE_OSX_ARCHITECTURES=x86_64`或者`CMAKE_OSX_ARCHITECTURES=arm64`; 3. 在使用[qmake](https://github.com/RealChuan/Qt-App/blob/master/.github/workflows/qmake.yml)时,需要指定`QMAKE_APPLE_DEVICE_ARCHS=x86_64`或者`QMAKE_APPLE_DEVICE_ARCHS=arm64`;

近期下载者

相关文件


收藏者