mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Updated macOS CI staging (arm64 + x86_64) to copy locales into $STAGE_PREFIX/locale/ (instead of $STAGE_PREFIX/share/locale) so gtk-mac-bundler can resolve gtk30.mo at the path it expects.
Updated both macOS packaging steps to pass BUNDLE_PREFIX with a trailing slash (.../stage/<arch>/).
Replaced cp -a with rsync -aL when staging enchant so symlinks are dereferenced into the staged tree (avoids Homebrew opt symlink pitfalls).
Adjusted osx/makebundle.sh to preserve a caller-provided trailing slash when writing the XML default prefix (instead of stripping it), matching the CI fix for malformed x86_64locale path concatenation.
This commit is contained in:
16
.github/workflows/macos-build.yml
vendored
16
.github/workflows/macos-build.yml
vendored
@@ -59,14 +59,14 @@ jobs:
|
||||
BREW_PREFIX="$(brew --prefix)"
|
||||
ENCHANT_PREFIX="$(brew --prefix enchant)"
|
||||
|
||||
mkdir -p "$STAGE_PREFIX/lib" "$STAGE_PREFIX/share"
|
||||
mkdir -p "$STAGE_PREFIX/lib" "$STAGE_PREFIX/locale"
|
||||
rsync -a "$BREW_PREFIX/lib/gtk-3.0" "$STAGE_PREFIX/lib/"
|
||||
rsync -a "$BREW_PREFIX/lib/gdk-pixbuf-2.0" "$STAGE_PREFIX/lib/"
|
||||
rsync -a "$BREW_PREFIX/share/locale" "$STAGE_PREFIX/share/"
|
||||
rsync -a "$BREW_PREFIX/share/locale/" "$STAGE_PREFIX/locale/"
|
||||
|
||||
mkdir -p "$STAGE_PREFIX/opt"
|
||||
rm -rf "$STAGE_PREFIX/opt/enchant"
|
||||
cp -a "$ENCHANT_PREFIX" "$STAGE_PREFIX/opt/enchant"
|
||||
rsync -aL "$ENCHANT_PREFIX/" "$STAGE_PREFIX/opt/enchant/"
|
||||
|
||||
- name: Package unsigned .app (arm64)
|
||||
run: |
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
|
||||
(
|
||||
cd osx
|
||||
BUNDLE_PREFIX="$PWD/../stage/arm64" \
|
||||
BUNDLE_PREFIX="$PWD/../stage/arm64/" \
|
||||
ENCHANT_PREFIX="$PWD/../stage/arm64/opt/enchant" \
|
||||
TARGET_ARCHES="arm64" \
|
||||
./makebundle.sh
|
||||
@@ -144,14 +144,14 @@ jobs:
|
||||
BREW_PREFIX="$(brew --prefix)"
|
||||
ENCHANT_PREFIX="$(brew --prefix enchant)"
|
||||
|
||||
mkdir -p "$STAGE_PREFIX/lib" "$STAGE_PREFIX/share"
|
||||
mkdir -p "$STAGE_PREFIX/lib" "$STAGE_PREFIX/locale"
|
||||
rsync -a "$BREW_PREFIX/lib/gtk-3.0" "$STAGE_PREFIX/lib/"
|
||||
rsync -a "$BREW_PREFIX/lib/gdk-pixbuf-2.0" "$STAGE_PREFIX/lib/"
|
||||
rsync -a "$BREW_PREFIX/share/locale" "$STAGE_PREFIX/share/"
|
||||
rsync -a "$BREW_PREFIX/share/locale/" "$STAGE_PREFIX/locale/"
|
||||
|
||||
mkdir -p "$STAGE_PREFIX/opt"
|
||||
rm -rf "$STAGE_PREFIX/opt/enchant"
|
||||
cp -a "$ENCHANT_PREFIX" "$STAGE_PREFIX/opt/enchant"
|
||||
rsync -aL "$ENCHANT_PREFIX/" "$STAGE_PREFIX/opt/enchant/"
|
||||
|
||||
- name: Package unsigned .app (x86_64)
|
||||
run: |
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
|
||||
(
|
||||
cd osx
|
||||
BUNDLE_PREFIX="$PWD/../stage/x86_64" \
|
||||
BUNDLE_PREFIX="$PWD/../stage/x86_64/" \
|
||||
ENCHANT_PREFIX="$PWD/../stage/x86_64/opt/enchant" \
|
||||
TARGET_ARCHES="x86_64" \
|
||||
./makebundle.sh
|
||||
|
||||
@@ -58,11 +58,10 @@ if [ -z "$BUNDLE_PREFIX" ]; then
|
||||
BUNDLE_PREFIX="/usr/local"
|
||||
fi
|
||||
|
||||
# gtk-mac-bundler translation rebasing can produce off-by-one path slicing
|
||||
# with a trailing slash in <prefix>, yielding broken paths like
|
||||
# ".../x86_64/ocale/...". Keep the XML prefix slashless and let bundle entries
|
||||
# contribute their own separators.
|
||||
BUNDLE_PREFIX_XML="${BUNDLE_PREFIX%/}"
|
||||
# Keep a caller-provided trailing slash so gtk-mac-bundler path concatenation
|
||||
# does not produce malformed locale paths like ".../x86_64locale/...".
|
||||
# CI explicitly sets BUNDLE_PREFIX with a trailing slash.
|
||||
BUNDLE_PREFIX_XML="$BUNDLE_PREFIX"
|
||||
|
||||
ENCHANT_PREFIX_DEFAULT="${BUNDLE_PREFIX}/opt/enchant"
|
||||
ENCHANT_PREFIX_PATH="${ENCHANT_PREFIX:-$ENCHANT_PREFIX_DEFAULT}"
|
||||
|
||||
Reference in New Issue
Block a user