mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
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:
committed by
GitHub
parent
52441590a6
commit
22d241fa7c
23
.github/workflows/windows-arm64-msys2.yml
vendored
23
.github/workflows/windows-arm64-msys2.yml
vendored
@@ -34,7 +34,6 @@ jobs:
|
|||||||
mingw-w64-clang-aarch64-desktop-file-utils
|
mingw-w64-clang-aarch64-desktop-file-utils
|
||||||
mingw-w64-clang-aarch64-ntldd
|
mingw-w64-clang-aarch64-ntldd
|
||||||
|
|
||||||
# Configure + Build (MSYS2 shell)
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
@@ -44,15 +43,21 @@ jobs:
|
|||||||
rm -rf build dist
|
rm -rf build dist
|
||||||
mkdir -p 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"
|
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 \
|
meson setup build \
|
||||||
--prefix=/ \
|
--prefix=/ \
|
||||||
-Dtext-frontend=true \
|
-Dtext-frontend=true \
|
||||||
-Ddbus=disabled \
|
-Ddbus=disabled \
|
||||||
-Dwith-upd=false \
|
-Dwith-upd=false \
|
||||||
-Dwith-perl=false
|
-Dwith-perl=false \
|
||||||
|
-Dc_link_args=-lwinpthread \
|
||||||
|
-Dcpp_link_args=-lwinpthread
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
@@ -68,27 +73,20 @@ jobs:
|
|||||||
export PATH="/clangarm64/bin:$PATH"
|
export PATH="/clangarm64/bin:$PATH"
|
||||||
ninja -C build test || true
|
ninja -C build test || true
|
||||||
|
|
||||||
# Stage install into dist/ (portable tree)
|
|
||||||
- name: Stage install
|
- name: Stage install
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
export PATH="/clangarm64/bin:$PATH"
|
export PATH="/clangarm64/bin:$PATH"
|
||||||
|
|
||||||
DESTDIR="$PWD/dist" ninja -C build install
|
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
|
- name: Harvest runtime DLL dependencies
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
export PATH="/clangarm64/bin:$PATH"
|
export PATH="/clangarm64/bin:$PATH"
|
||||||
|
|
||||||
# Copy DLL deps for main EXE + plugins into dist/bin
|
# Copy DLL deps for EXEs + plugins into dist/bin
|
||||||
# ntldd prints deps; we then copy any deps that live in /clangarm64/bin
|
|
||||||
for f in dist/bin/zoitechat.exe dist/bin/zoitechat-text.exe dist/lib/zoitechat/plugins/*.dll; do
|
for f in dist/bin/zoitechat.exe dist/bin/zoitechat-text.exe dist/lib/zoitechat/plugins/*.dll; do
|
||||||
[ -e "$f" ] || continue
|
[ -e "$f" ] || continue
|
||||||
ntldd -R "$f" | tr '\\' '/' | grep -E '^/clangarm64/bin/.*\.dll$' | while read -r dll; do
|
ntldd -R "$f" | tr '\\' '/' | grep -E '^/clangarm64/bin/.*\.dll$' | while read -r dll; do
|
||||||
@@ -96,7 +94,6 @@ jobs:
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install Inno Setup (Windows-native)
|
|
||||||
- name: Install Inno Setup
|
- name: Install Inno Setup
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
@@ -106,12 +103,10 @@ jobs:
|
|||||||
}
|
}
|
||||||
iscc.exe /?
|
iscc.exe /?
|
||||||
|
|
||||||
# Build installer using an .iss file committed in your repo
|
|
||||||
- name: Build ARM64 installer
|
- name: Build ARM64 installer
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
# Expecting you add installer/zoitechat-arm64.iss (example below)
|
|
||||||
iscc.exe "installer\zoitechat-arm64.iss"
|
iscc.exe "installer\zoitechat-arm64.iss"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user