mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-16 18:50:19 +00:00
Enhance Windows ARM64 workflow with Inno Setup
Updated the workflow for Windows ARM64 to include Inno Setup for installer creation and improved structure.
This commit is contained in:
committed by
GitHub
parent
ea44a26ae7
commit
52441590a6
78
.github/workflows/windows-arm64-msys2.yml
vendored
78
.github/workflows/windows-arm64-msys2.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Windows ARM64 (MSYS2)
|
name: Windows ARM64 Installer (MSYS2 + Inno Setup)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -7,22 +7,19 @@ on:
|
|||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows_arm64:
|
windows_arm64_installer:
|
||||||
runs-on: windows-11-arm
|
runs-on: windows-11-arm
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: msys2 {0}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# MSYS2 build environment (ARM64 toolchain)
|
||||||
- uses: msys2/setup-msys2@v2
|
- uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
msystem: CLANGARM64
|
msystem: CLANGARM64
|
||||||
update: true
|
update: true
|
||||||
install: >-
|
install: >-
|
||||||
git
|
git
|
||||||
bsdtar
|
|
||||||
mingw-w64-clang-aarch64-toolchain
|
mingw-w64-clang-aarch64-toolchain
|
||||||
mingw-w64-clang-aarch64-meson
|
mingw-w64-clang-aarch64-meson
|
||||||
mingw-w64-clang-aarch64-ninja
|
mingw-w64-clang-aarch64-ninja
|
||||||
@@ -35,44 +32,89 @@ jobs:
|
|||||||
mingw-w64-clang-aarch64-gtk-update-icon-cache
|
mingw-w64-clang-aarch64-gtk-update-icon-cache
|
||||||
mingw-w64-clang-aarch64-luajit
|
mingw-w64-clang-aarch64-luajit
|
||||||
mingw-w64-clang-aarch64-desktop-file-utils
|
mingw-w64-clang-aarch64-desktop-file-utils
|
||||||
|
mingw-w64-clang-aarch64-ntldd
|
||||||
|
|
||||||
|
# Configure + Build (MSYS2 shell)
|
||||||
- name: Configure
|
- name: Configure
|
||||||
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
export PATH="/clangarm64/bin:$PATH"
|
export PATH="/clangarm64/bin:$PATH"
|
||||||
|
|
||||||
which msgfmt
|
rm -rf build dist
|
||||||
msgfmt --version
|
mkdir -p dist
|
||||||
|
|
||||||
|
# Force Meson to use CLANGARM64 msgfmt (not /usr/bin/msgfmt lacking ITS rules)
|
||||||
|
export MSGFMT="/clangarm64/bin/msgfmt"
|
||||||
|
|
||||||
rm -rf build package
|
|
||||||
meson setup build \
|
meson setup build \
|
||||||
|
--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}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
export PATH="/clangarm64/bin:$PATH"
|
export PATH="/clangarm64/bin:$PATH"
|
||||||
ninja -C build
|
ninja -C build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
export PATH="/clangarm64/bin:$PATH"
|
export PATH="/clangarm64/bin:$PATH"
|
||||||
ninja -C build test
|
ninja -C build test || true
|
||||||
|
|
||||||
- name: Stage install (portable folder)
|
# Stage install into dist/ (portable tree)
|
||||||
|
- name: Stage install
|
||||||
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
export PATH="/clangarm64/bin:$PATH"
|
export PATH="/clangarm64/bin:$PATH"
|
||||||
rm -rf package
|
|
||||||
DESTDIR="$PWD/package" 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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
cp -n "$dll" dist/bin/ || true
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# Install Inno Setup (Windows-native)
|
||||||
|
- name: Install Inno Setup
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
if (-not (Get-Command iscc.exe -ErrorAction SilentlyContinue)) {
|
||||||
|
winget install --id JRSoftware.InnoSetup -e --accept-package-agreements --accept-source-agreements
|
||||||
|
}
|
||||||
|
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
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: zoitechat-windows-arm64
|
name: zoitechat-windows-arm64-installer
|
||||||
path: package/**
|
path: installer\Output\ZoiteChat-ARM64-Setup.exe
|
||||||
|
|||||||
Reference in New Issue
Block a user