-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[优化Qt项目构建和依赖管理]: 对Qt项目的构建系统和依赖管理进行了重要优化
- 引入基于vcpkg的依赖管理,简化了第三方库的集成和管理过程 - 重构了项目结构,将关键组件移动到`src`目录下,提高了项目的组织性 - 更新了CMakeLists和相关项目文件,确保它们与新的依赖管理方式兼容 - 新增了自动化安装项目依赖的`install-dependencies`动作 - 调整了GitHub Actions工作流,以适应新的项目结构和构建系统 - 新增了Crashpad支持,用于更有效地处理和报告应用崩溃信息 - 更新了`utils`目录下的文件,增加了实用的系统信息和日志功能 - 移除了不再需要的代码和配置,简化了项目的复杂度
- Loading branch information
Showing
209 changed files
with
1,710 additions
and
1,240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: 'Install Dependencies' | ||
description: 'Install vcpkg libraries and qt environment' | ||
inputs: | ||
os_name: | ||
description: 'os name' | ||
required: true | ||
type: string | ||
vcpkg_libs: | ||
description: 'vcpkg libraries' | ||
required: false | ||
default: 'breakpad crashpad' | ||
type: string | ||
vcpkg_ffmpeg_features: | ||
description: 'vcpkg ffmpeg features' | ||
required: false | ||
default: 'opengl,ass,bzip2,freetype,fribidi,zlib,gpl,ffmpeg,ffplay,ffprobe' | ||
type: string | ||
qt_modules: | ||
description: 'qt modules' | ||
required: false | ||
default: 'qt5compat qtnetworkauth qtmultimedia qtimageformats' | ||
type: string | ||
qt_ver: | ||
description: 'qt version' | ||
required: false | ||
default: '6.7.0' | ||
type: string | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Install Custom VCPKG | ||
uses: RealChuan/install-vcpkg@main | ||
with: | ||
repo: 'https://github.com/RealChuan/vcpkg.git' | ||
branch: 'dev' | ||
|
||
- name: Delete vcpkg.json | ||
shell: bash | ||
run: | | ||
rm vcpkg.json | ||
- name: Cache windows vcpkg | ||
if: startsWith(runner.os, 'Windows') | ||
uses: actions/cache@v4 | ||
with: | ||
path: C:\vcpkg\installed | ||
key: ${{ inputs.os_name }}-vcpkg-installed-${{ runner.os }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ inputs.os_name }}-vcpkg-installed-${{ runner.os_name }}- | ||
${{ inputs.os_name }}-vcpkg-installed- | ||
${{ inputs.os_name }}- | ||
save-always: true | ||
|
||
- name: Cache macos or linux vcpkg | ||
if: startsWith(runner.os, 'macOS') || startsWith(runner.os, 'Linux') | ||
uses: actions/cache@v4 | ||
with: | ||
path: /usr/local/share/vcpkg/installed | ||
key: ${{ inputs.os_name }}-vcpkg-installed-${{ runner.os }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ inputs.os_name }}-vcpkg-installed-${{ runner.os_name }}- | ||
${{ inputs.os_name }}-vcpkg-installed- | ||
${{ inputs.os_name }}- | ||
save-always: true | ||
|
||
- name: Install dependencies on windows | ||
if: startsWith(runner.os, 'Windows') | ||
shell: bash | ||
run: | | ||
choco install ninja | ||
ninja --version | ||
cmake --version | ||
vcpkg install ${{ inputs.vcpkg_libs }} \ | ||
ffmpeg[${{ inputs.vcpkg_ffmpeg_features }},amf,nvcodec,qsv] --triplet x64-windows \ | ||
|| (cat C:/vcpkg/installed/vcpkg/issue_body.md && exit 1) | ||
- name: Install dependencies on macos | ||
if: startsWith(runner.os, 'macOS') | ||
shell: bash | ||
run: | | ||
brew install ninja nasm pkg-config python-setuptools | ||
ninja --version | ||
cmake --version | ||
clang --version | ||
vcpkg install ${{ inputs.vcpkg_libs }} \ | ||
ffmpeg[${{ inputs.vcpkg_ffmpeg_features }}] --triplet x64-osx \ | ||
|| (cat /usr/local/share/vcpkg/installed/vcpkg/issue_body.md && exit 1) | ||
vcpkg install ${{ inputs.vcpkg_libs }} \ | ||
ffmpeg[${{ inputs.vcpkg_ffmpeg_features }}] --triplet arm64-osx \ | ||
|| (cat /usr/local/share/vcpkg/installed/vcpkg/issue_body.md && exit 1) | ||
- name: Install dependencies on linux | ||
if: startsWith(runner.os, 'Linux') | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build nasm autopoint gperf libgl1-mesa-dev \ | ||
libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev | ||
ninja --version | ||
cmake --version | ||
gcc --version | ||
vcpkg install ${{ inputs.vcpkg_libs }} \ | ||
ffmpeg[${{ inputs.vcpkg_ffmpeg_features }},amf,nvcodec] --triplet x64-linux \ | ||
|| (cat /usr/local/share/vcpkg/installed/vcpkg/issue_body.md && exit 1) | ||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v4 | ||
with: | ||
version: ${{ inputs.qt_ver }} | ||
modules: ${{ inputs.qt_modules }} | ||
cache: 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.