feat: add windows runner CI and release jobs
This commit is contained in:
parent
e2795cfef9
commit
4360e45233
4 changed files with 131 additions and 26 deletions
|
|
@ -5,6 +5,8 @@
|
|||
# GTK runtime into dist/ and carrier-windows.zip.
|
||||
#
|
||||
# If MSYS2 updates its own core mid-run the shell may die — just rerun.
|
||||
# Building and bundling live in windows/bundle.sh, shared with the
|
||||
# forgejo Windows release job.
|
||||
set -euo pipefail
|
||||
|
||||
say() { printf '\n==> %s\n' "$*"; }
|
||||
|
|
@ -31,31 +33,6 @@ pacman -S --noconfirm --needed \
|
|||
pkg-config --exists gtk4 libadwaita-1 \
|
||||
|| die "gtk4/libadwaita invisible to pkg-config — are you in the MINGW64 shell?"
|
||||
|
||||
say "building carrier (release; the first build takes a while)"
|
||||
cargo build --release --locked || die "cargo build failed"
|
||||
|
||||
say "bundling the runtime"
|
||||
rm -rf dist
|
||||
mkdir -p dist/share/glib-2.0/schemas \
|
||||
dist/share/icons/hicolor/512x512/apps \
|
||||
dist/share/icons/hicolor/256x256/apps \
|
||||
dist/share/icons/hicolor/128x128/apps
|
||||
cp target/release/carrier.exe dist/
|
||||
for dll in $(ldd target/release/carrier.exe | awk '/mingw64/ {print $3}'); do
|
||||
cp "$dll" dist/ || die "copying $dll failed"
|
||||
done
|
||||
[ "$(ls dist/*.dll | wc -l)" -gt 0 ] || die "no DLLs collected — ldd found none under /mingw64"
|
||||
cp /mingw64/share/glib-2.0/schemas/* dist/share/glib-2.0/schemas/
|
||||
glib-compile-schemas dist/share/glib-2.0/schemas/
|
||||
cp -r /mingw64/share/icons/Adwaita dist/share/icons/
|
||||
cp -r /mingw64/share/icons/hicolor dist/share/icons/
|
||||
cp data/icons/com.randogoth.carrier.png dist/share/icons/hicolor/512x512/apps/
|
||||
cp data/icons/com.randogoth.carrier-256.png dist/share/icons/hicolor/256x256/apps/
|
||||
cp data/icons/com.randogoth.carrier-128.png dist/share/icons/hicolor/128x128/apps/
|
||||
|
||||
say "zipping"
|
||||
version=$(sed -n 's/^version = "\(.*\)"$/\1/p' Cargo.toml | head -1)
|
||||
rm -f "carrier-windows-$version.zip"
|
||||
(cd dist && zip -qr "../carrier-windows-$version.zip" .)
|
||||
bash windows/bundle.sh
|
||||
|
||||
say "done — test with ./dist/carrier.exe (SmartScreen may ask once)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue