Fix broken macOS release bundle missing GTK libraries.

Replace fragile dylibbundler with a recursive otool-based bundler, verify every dependency, smoke-test launch, and ship GTK schemas with the Windows zip.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepaskopec-blip 2026-09-16 16:30:23 +02:00
commit 9f27724751
3 changed files with 169 additions and 68 deletions

View file

@ -79,6 +79,14 @@ bundle: $(TARGET)
@cp -R share dist/
@ldd $(TARGET) | grep -Ei '/(ucrt64|mingw64)/bin/' | awk '{print $$3}' \
| xargs -r -I{} cp -f {} dist/
@# GTK runtime data (schemas / pixbuf loaders) next to the exe.
@GTK_PREFIX="$$($(PKG_CONFIG) --variable=prefix gtk4)"; \
if [ -d "$$GTK_PREFIX/share/glib-2.0" ]; then \
mkdir -p dist/share && cp -R "$$GTK_PREFIX/share/glib-2.0" dist/share/; \
fi; \
if [ -d "$$GTK_PREFIX/lib/gdk-pixbuf-2.0" ]; then \
mkdir -p dist/lib && cp -R "$$GTK_PREFIX/lib/gdk-pixbuf-2.0" dist/lib/; \
fi
@echo "Bundled into dist/ - run dist/$(TARGET)"
else ifeq ($(UNAME_S),Darwin)
bundle: