Refine ARM64 MSYS2 workflow and linker settings

Updated the MSYS2 workflow for ARM64 to ensure proper usage of CLANGARM64 tooling and added linker flags for winpthreads.
This commit is contained in:
deepend-tildeclub
2026-01-12 18:19:02 -07:00
committed by GitHub
parent 52441590a6
commit 22d241fa7c

View File

@@ -34,7 +34,6 @@ jobs:
mingw-w64-clang-aarch64-desktop-file-utils
mingw-w64-clang-aarch64-ntldd
# Configure + Build (MSYS2 shell)
- name: Configure
shell: msys2 {0}
run: |
@@ -44,15 +43,21 @@ jobs:
rm -rf build dist
mkdir -p dist
# Force Meson to use CLANGARM64 msgfmt (not /usr/bin/msgfmt lacking ITS rules)
# Ensure Meson uses the CLANGARM64 gettext tooling (has ITS data)
export MSGFMT="/clangarm64/bin/msgfmt"
# Belt + suspenders: make sure the linker sees winpthreads
export LIBRARY_PATH="/clangarm64/lib:${LIBRARY_PATH:-}"
export LDFLAGS="-lwinpthread ${LDFLAGS:-}"
meson setup build \
--prefix=/ \
-Dtext-frontend=true \
-Ddbus=disabled \
-Dwith-upd=false \
-Dwith-perl=false
-Dwith-perl=false \
-Dc_link_args=-lwinpthread \
-Dcpp_link_args=-lwinpthread
- name: Build
shell: msys2 {0}
@@ -68,27 +73,20 @@ jobs:
export PATH="/clangarm64/bin:$PATH"
ninja -C build test || true
# Stage install into dist/ (portable tree)
- name: Stage install
shell: msys2 {0}
run: |
set -euxo pipefail
export PATH="/clangarm64/bin:$PATH"
DESTDIR="$PWD/dist" ninja -C build install
# dist layout will be:
# dist/bin, dist/lib, dist/share, etc (because --prefix=/)
# OPTIONAL but recommended: harvest DLL deps into dist/bin so installer is self-contained
- name: Harvest runtime DLL dependencies
shell: msys2 {0}
run: |
set -euxo pipefail
export PATH="/clangarm64/bin:$PATH"
# Copy DLL deps for main EXE + plugins into dist/bin
# ntldd prints deps; we then copy any deps that live in /clangarm64/bin
# Copy DLL deps for EXEs + plugins into dist/bin
for f in dist/bin/zoitechat.exe dist/bin/zoitechat-text.exe dist/lib/zoitechat/plugins/*.dll; do
[ -e "$f" ] || continue
ntldd -R "$f" | tr '\\' '/' | grep -E '^/clangarm64/bin/.*\.dll$' | while read -r dll; do
@@ -96,7 +94,6 @@ jobs:
done
done
# Install Inno Setup (Windows-native)
- name: Install Inno Setup
shell: pwsh
run: |
@@ -106,12 +103,10 @@ jobs:
}
iscc.exe /?
# Build installer using an .iss file committed in your repo
- name: Build ARM64 installer
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
# Expecting you add installer/zoitechat-arm64.iss (example below)
iscc.exe "installer\zoitechat-arm64.iss"
- uses: actions/upload-artifact@v4