From e92d32fdb9e95ecf87ce036dbd14ccd1fe89902f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 8 Dec 2010 13:30:58 +0100 Subject: [PATCH] updates to make win32 building work again --- cross-Makefile.conf | 23 ++--------------------- install-dlls.sh | 33 ++++++++++++++++++++------------- mingw-Makefile.conf | 28 ++++------------------------ mingw-Makefile.inc | 29 +++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 58 deletions(-) create mode 100644 mingw-Makefile.inc diff --git a/cross-Makefile.conf b/cross-Makefile.conf index f503195d..2b44320d 100644 --- a/cross-Makefile.conf +++ b/cross-Makefile.conf @@ -5,24 +5,5 @@ # how to call the mingw tools MINGW_EXEC_PREFIX = i586-mingw32msvc- -# where the dependencies package is extracted -RADIANT_DEPENDENCIES_PREFIX = $(HOME)/radiant-deps-mingw32/ - -# run the prefix fixing tool -IGNORETHIS := $(shell cd $(RADIANT_DEPENDENCIES_PREFIX) && ./fixprefix.sh) - -# set the environment for make -OS = Win32 -CFLAGS += -CXXFLAGS += -CPPFLAGS += -I$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/include -LDFLAGS += -L$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/lib -PKG_CONFIG_PATH := $(RADIANT_DEPENDENCIES_PREFIX)/gtk/lib/pkgconfig:$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/lib/pkgconfig:$(PKG_CONFIG_PATH) -WHICHDLL = $(RADIANT_DEPENDENCIES_PREFIX)/whichdll.sh - -CC = $(MINGW_EXEC_PREFIX)gcc -CXX = $(MINGW_EXEC_PREFIX)g++ -LDD = -RANLIB = $(MINGW_EXEC_PREFIX)ranlib -AR = $(MINGW_EXEC_PREFIX)ar -WINDRES = $(MINGW_EXEC_PREFIX)windres +# use mingw32 +include mingw-Makefile.inc diff --git a/install-dlls.sh b/install-dlls.sh index d6fb970e..69da6415 100755 --- a/install-dlls.sh +++ b/install-dlls.sh @@ -13,35 +13,42 @@ for DLL in \ intl.dll \ libatk-1.0-0.dll \ libcairo-2.dll \ + libfontconfig-1.dll \ + libfreetype6.dll \ libgdk-win32-2.0-0.dll \ libgdk_pixbuf-2.0-0.dll \ libgdkglext-win32-1.0-0.dll \ + libgio-2.0-0.dll \ libglib-2.0-0.dll \ libgmodule-2.0-0.dll \ libgobject-2.0-0.dll \ + libgthread-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 \ + libpangoft2-1.0-0.dll \ libpangowin32-1.0-0.dll \ - libpng12-0.dll \ + libpng14-14.dll \ libxml2-2.dll \ zlib1.dll \ ; do $CP "`$WHICHDLL $DLL`" $INSTALLDIR/ done -$CP "$GTKDIR/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll" $INSTALLDIR/libgdk-win32-2.0-0-pixbufloader-bmp.dll -$MKDIR $INSTALLDIR/etc/gtk-2.0 -$CAT > $INSTALLDIR/etc/gtk-2.0/gdk-pixbuf.loaders <<'EOF' -# GdkPixbuf Image Loader Modules file +# apparently we no longer need this workaround: # +# $CP "$GTKDIR/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll" $INSTALLDIR/libgdk-win32-2.0-0-pixbufloader-bmp.dll +# $MKDIR $INSTALLDIR/etc/gtk-2.0 +# $CAT > $INSTALLDIR/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 +# "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 diff --git a/mingw-Makefile.conf b/mingw-Makefile.conf index 652421ac..e6c08904 100644 --- a/mingw-Makefile.conf +++ b/mingw-Makefile.conf @@ -2,28 +2,8 @@ # copy this file to Makefile.conf # edit the paths in here -# how to call the mingw tools -MINGW_EXEC_PREFIX = +# how to get pkg-config +PKGCONFIG = $(RADIANT_DEPENDENCIES_PREFIX)/gtk/bin/pkg-config.exe -# where the dependencies package is extracted -RADIANT_DEPENDENCIES_PREFIX = /c/mingw/radiant-deps-mingw32/ - -# run the prefix fixing tool -IGNORETHIS := $(shell cd $(RADIANT_DEPENDENCIES_PREFIX) && ./fixprefix.sh) - -# set the environment for make -OS = Win32 -CFLAGS += -CXXFLAGS += -CPPFLAGS += -I$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/include -LDFLAGS += -L$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/lib -PKG_CONFIG_PATH := $(RADIANT_DEPENDENCIES_PREFIX)/gtk/lib/pkgconfig:$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/lib/pkgconfig:$(PKG_CONFIG_PATH) -WHICHDLL = $(RADIANT_DEPENDENCIES_PREFIX)/whichdll.sh - -CC = $(MINGW_EXEC_PREFIX)gcc -CXX = $(MINGW_EXEC_PREFIX)g++ -LDD = -RANLIB = $(MINGW_EXEC_PREFIX)ranlib -AR = $(MINGW_EXEC_PREFIX)ar -WINDRES = $(MINGW_EXEC_PREFIX)windres -PKGCONFIG = $(RADIANT_DEPENDENCIES_PREFIX)/gtk/bin/pkg-config +# use mingw32 +include mingw-Makefile.inc diff --git a/mingw-Makefile.inc b/mingw-Makefile.inc new file mode 100644 index 00000000..0710fe15 --- /dev/null +++ b/mingw-Makefile.inc @@ -0,0 +1,29 @@ +# how to call the mingw tools +MINGW_EXEC_PREFIX ?= + +# where the dependencies package is extracted +RADIANT_DEPENDENCIES_PREFIX = $(HOME)/radiant-deps-mingw32/ + +# run the prefix fixing tool +IGNORETHIS := $(shell cd $(RADIANT_DEPENDENCIES_PREFIX) && ./fixprefix.sh) + +# set the environment for make +OS = Win32 +CFLAGS += +CXXFLAGS += +CPPFLAGS += -I$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/include +LDFLAGS += -L$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/lib +CPPFLAGS += -I$(RADIANT_DEPENDENCIES_PREFIX)/gtk/include +LDFLAGS += -L$(RADIANT_DEPENDENCIES_PREFIX)/gtk/lib +PKG_CONFIG_PATH := $(RADIANT_DEPENDENCIES_PREFIX)/gtk/lib/pkgconfig:$(RADIANT_DEPENDENCIES_PREFIX)/radiantdeps/lib/pkgconfig:$(PKG_CONFIG_PATH) +WHICHDLL = $(RADIANT_DEPENDENCIES_PREFIX)/whichdll.sh + +#CPPFLAGS_XML = +#LIBS_XML = -lxml2 + +CC = $(MINGW_EXEC_PREFIX)gcc +CXX = $(MINGW_EXEC_PREFIX)g++ +LDD = +RANLIB = $(MINGW_EXEC_PREFIX)ranlib +AR = $(MINGW_EXEC_PREFIX)ar +WINDRES = $(MINGW_EXEC_PREFIX)windres -- 2.39.2