.PHONY: install-dll
ifeq ($(OS),Win32)
install-dll:
- set -e; \
- dllfetch() \
- { \
- dll=$$1; \
- [ -f "install/$$dll" ] && return; \
- dllsource=`which $$dll`; \
- echo "Fetching $$dll..."; \
- $(CP) $$dllsource install/$$dll; \
- dlldeps install/$$dll; \
- }; \
- dlldeps() \
- { \
- echo "Looking for dependencies of $$1..."; \
- $(OBJDUMP) -p $$1 | grep "DLL Name" | grep -- '-' | while read -r DUMMY1 DUMMY2 dll; do \
- dllfetch $$dll; \
- done; \
- }; \
- dllfetch zlib1.dll; \
- dllfetch intl.dll; \
- for obj in install/*.$(EXE) install/*/*.$(DLL); do \
- dlldeps $$obj; \
- done
+ sh install-dlls.sh
else
install-dll:
echo No DLL inclusion required for this target.
--- /dev/null
+#!/bin/sh
+
+set -ex
+
+: ${WHICHDLL:=which}
+: ${GTKDIR:=/gtk}
+: ${CP:=cp}
+
+for DLL in \
+ intl.dll \
+ libatk-1.0-0.dll \
+ libcairo-2.dll \
+ libgdk-win32-2.0-0.dll \
+ libgdk_pixbuf-2.0-0.dll \
+ libgdkglext-win32-1.0-0.dll \
+ libglib-2.0-0.dll \
+ libgmodule-2.0-0.dll \
+ libgobject-2.0-0.dll \
+ libgtk-win32-2.0-0.dll \
+ libgtkglext-win32-1.0-0.dll \
+ libpango-1.0-0.dll \
+ libpangocairo-1.0-0.dll \
+ libpangowin32-1.0-0.dll \
+ libpng12-0.dll \
+ libxml2-2.dll \
+ zlib1.dll \
+; do
+ $CP "`$WHICHDLL $DLL`" install/
+done
+
+cp "$GTKDIR/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll" install/libgdk-win32-2.0-0-pixbufloader-bmp.dll
+mkdir -p install/etc/gtk-2.0
+cat > install/etc/gtk-2.0/gdk-pixbuf.loaders <<'EOF'
+# GdkPixbuf Image Loader Modules file
+#
+#
+
+"libgdk-win32-2.0-0-pixbufloader-bmp.dll"
+"bmp" 5 "gtk20" "The BMP image format"
+"image/bmp" "image/x-bmp" "image/x-MS-bmp" ""
+"bmp" ""
+"BM" "" 100
+
+EOF