fix: v0.12.5 —— 修 Windows 链接器被 Git Bash 抢、macOS 只部署需要的插件
安装包 / Linux aarch64 (push) Canceled after 0s
安装包 / Linux x86_64 (push) Canceled after 0s
安装包 / Windows x86_64 (push) Canceled after 0s
安装包 / macOS arm64 (Apple Silicon) (push) Canceled after 0s
安装包 / macOS x86_64 (Intel) (push) Canceled after 0s
安装包 / 发布到 Release (push) Canceled after 0s
安装包 / Linux aarch64 (push) Canceled after 0s
安装包 / Linux x86_64 (push) Canceled after 0s
安装包 / Windows x86_64 (push) Canceled after 0s
安装包 / macOS arm64 (Apple Silicon) (push) Canceled after 0s
安装包 / macOS x86_64 (Intel) (push) Canceled after 0s
安装包 / 发布到 Release (push) Canceled after 0s
- Windows:Git Bash 的 /usr/bin/link.exe 会先于 MSVC 的 link.exe 被 nmake 找到, 把 cl.exe 所在目录放到 PATH 最前面;同时给 MSVC 加 /utf-8, 修掉 C4566 和潜在的中文串码 - macOS:macdeployqt 之后删掉 virtualkeyboard / platforminputcontexts / printsupport / iconengines / imageformats / tls / bearer 这些用不到的插件, 它们会把 /opt/homebrew 的一堆 dylib 拖进来 - bundle-libs.sh:改写失败不再静默吞掉,检查时跳过 otool 的文件名行, 失败时打印「文件 <- 依赖」方便定位
This commit is contained in:
@@ -135,6 +135,18 @@ jobs:
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
# Git Bash 的 /usr/bin 里也有个 link.exe(coreutils 的硬链接工具),
|
||||
# 必须把 MSVC 的 bin 放到 PATH 最前面,nmake 才会用真正的 link.exe
|
||||
cl_path=$(command -v cl.exe || command -v cl || true)
|
||||
if [ -z "$cl_path" ]; then
|
||||
echo "PATH 里找不到 cl.exe" >&2
|
||||
exit 1
|
||||
fi
|
||||
msvc_bin=$(dirname "$cl_path")
|
||||
export PATH="$msvc_bin:$PATH"
|
||||
echo "cl: $(command -v cl)"
|
||||
echo "link: $(command -v link)"
|
||||
|
||||
qmake ../VoiletMark.pro CONFIG+=release
|
||||
nmake release || nmake
|
||||
if [ -f release/VoiletMark.exe ]; then
|
||||
@@ -236,6 +248,18 @@ jobs:
|
||||
grep -q arm64 /tmp/arch.txt
|
||||
|
||||
"$QT_PREFIX/bin/macdeployqt" VoiletMark.app -always-overwrite
|
||||
|
||||
# 只留平台插件和样式插件;虚拟键盘 / 打印 / 图片格式这些用不到,
|
||||
# 留着只会把 Homebrew 的 dylib 拖进来
|
||||
rm -rf VoiletMark.app/Contents/PlugIns/virtualkeyboard \
|
||||
VoiletMark.app/Contents/PlugIns/platforminputcontexts \
|
||||
VoiletMark.app/Contents/PlugIns/printsupport \
|
||||
VoiletMark.app/Contents/PlugIns/iconengines \
|
||||
VoiletMark.app/Contents/PlugIns/imageformats \
|
||||
VoiletMark.app/Contents/PlugIns/networkinformation \
|
||||
VoiletMark.app/Contents/PlugIns/tls \
|
||||
VoiletMark.app/Contents/PlugIns/bearer
|
||||
|
||||
otool -L VoiletMark.app/Contents/MacOS/VoiletMark | head -30
|
||||
|
||||
- name: 收 Homebrew 依赖 + ad-hoc 签名
|
||||
@@ -292,6 +316,15 @@ jobs:
|
||||
|
||||
macdeployqt VoiletMark.app -always-overwrite
|
||||
|
||||
rm -rf VoiletMark.app/Contents/PlugIns/virtualkeyboard \
|
||||
VoiletMark.app/Contents/PlugIns/platforminputcontexts \
|
||||
VoiletMark.app/Contents/PlugIns/printsupport \
|
||||
VoiletMark.app/Contents/PlugIns/iconengines \
|
||||
VoiletMark.app/Contents/PlugIns/imageformats \
|
||||
VoiletMark.app/Contents/PlugIns/networkinformation \
|
||||
VoiletMark.app/Contents/PlugIns/tls \
|
||||
VoiletMark.app/Contents/PlugIns/bearer
|
||||
|
||||
- name: 收依赖 + ad-hoc 签名
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
Reference in New Issue
Block a user