Skip to content

Move Qt and runtime dependency deployment into CMake POST_BUILD steps#3506

Merged
shlzxjp merged 4 commits into
mainfrom
feature/markffan_cmake_deploy
Jun 16, 2026
Merged

Move Qt and runtime dependency deployment into CMake POST_BUILD steps#3506
shlzxjp merged 4 commits into
mainfrom
feature/markffan_cmake_deploy

Conversation

@CodeJhF

@CodeJhF CodeJhF commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

概述

将 Qt、ffmovie、Sparkle 等运行时依赖的部署从打包脚本移入 CMake POST_BUILD 步骤,使开发者在本地构建后即可直接运行/调试,无需手动执行打包脚本。

主要变更

CMake 部署自动化

  • exporter/CMakeLists.txt: PAGExporter 构建后自动部署 Qt frameworks、libffmovie.dylib 并设置 rpath
  • viewer/CMakeLists.txt: PAGViewer 构建后自动打包为 macOS app bundle,部署 Qt、Sparkle、ffmovie 等依赖;Windows 平台同步支持 windeployqt

打包脚本重构 (build_mac.sh)

  • 新增 mergeUniversalBundle 函数,统一处理 app/plugin bundle 的 universal binary 合并
  • cleanAbsoluteRpaths 改用临时文件避免子 shell 问题
  • Qt 依赖统一收敛到 PAGExporter plugin bundle 内,PAGViewer 通过 qt.conf 的相对路径引用
  • 移除了对已删除脚本 (copy_qt_resource.sh / replace_qt_path.sh) 的依赖

PAGExporter QML 路径改进

  • 使用 dladdr 动态获取插件自身路径,推导出相对 Resources/qml 路径
  • 不再依赖全局共享目录 /Library/Application Support/PAGExporter/

清理

  • 删除 copy_qt_resource.shreplace_qt_path.sh(不再需要)
  • 移除 PluginInstaller::CopyQtResource 方法及其调用

@codecov-commenter

codecov-commenter commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.57%. Comparing base (f1599bd) to head (7e51bdd).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3506      +/-   ##
==========================================
+ Coverage   80.33%   80.57%   +0.23%     
==========================================
  Files         590      620      +30     
  Lines       63768    67021    +3253     
  Branches    19261    19885     +624     
==========================================
+ Hits        51231    54005    +2774     
- Misses       8786     9082     +296     
- Partials     3751     3934     +183     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@CodeJhF CodeJhF marked this pull request as draft June 12, 2026 08:38
@CodeJhF CodeJhF marked this pull request as ready for review June 15, 2026 06:57
Comment thread exporter/src/platform/mac/PlatformHelper.mm Outdated
@shlzxjp shlzxjp merged commit a41875f into main Jun 16, 2026
9 checks passed
@shlzxjp shlzxjp deleted the feature/markffan_cmake_deploy branch June 16, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants