Skip to content

Commit 5a41a09

Browse files
committed
Enhance macOS DMG workflow by adding vendorization of PyGObject and PyCairo into the bundled Python path, and updating the app copy process to prefer the self-contained version for distribution.
1 parent 3e246a4 commit 5a41a09

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/macos-dmg.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,19 @@ jobs:
165165
fi
166166
done
167167
168+
# 4b) Vendor PyGObject (gi) and PyCairo into bundled Python path
169+
for SITE in \
170+
"$BREW_PREFIX/lib/python3.13/site-packages" \
171+
"$BREW_PREFIX/opt/pygobject3/lib/python3.13/site-packages" \
172+
"$BREW_PREFIX/opt/py3cairo/lib/python3.13/site-packages"; do
173+
if [ -d "$SITE/gi" ]; then
174+
rsync -a "$SITE/gi" "$RES/python/"
175+
fi
176+
if [ -d "$SITE/cairo" ]; then
177+
rsync -a "$SITE/cairo" "$RES/python/"
178+
fi
179+
done
180+
168181
# 5) Schemas needed by GSettings
169182
mkdir -p "$RES/share/glib-2.0/schemas"
170183
rsync -a "$BREW_PREFIX/opt/glib/share/glib-2.0/schemas/" "$RES/share/glib-2.0/schemas/"
@@ -214,15 +227,19 @@ jobs:
214227
- name: List .app contents
215228
run: |
216229
set -euxo pipefail
230+
echo 'gtk-mac-bundler app:' || true
217231
ls -R build/ssh-studio.bundle/SSH\ Studio.app/Contents || true
232+
echo 'self-contained app:' || true
233+
ls -R 'dist/SSH Studio.app/Contents' || true
218234
219235
- name: Create DMG
220236
run: |
221237
set -euxo pipefail
222238
VER=$(sed -n "s/.*version: '\([^']*\)'.*/\1/p" meson.build | head -n1)
223239
ARCH=$(uname -m)
224240
mkdir -p dmgroot
225-
cp -R "build/ssh-studio.bundle/SSH Studio.app" "dmgroot/SSH Studio.app"
241+
# Prefer self-contained app for distribution
242+
cp -R "dist/SSH Studio.app" "dmgroot/SSH Studio.app"
226243
ln -s /Applications dmgroot/Applications
227244
hdiutil create -volname "SSH Studio" -srcfolder dmgroot -ov -fs HFS+ "ssh-studio-${VER}-${ARCH}.dmg"
228245

0 commit comments

Comments
 (0)