From 968de6f0ea960ea66563028768e8d97eb04c8160 Mon Sep 17 00:00:00 2001 From: dolphin6k Date: Sun, 15 Nov 2020 13:47:29 +0900 Subject: [PATCH] Enabled compiling on John Popplewell's build environment (for Windows 2000 & XP) --- Makefile | 12 +++++++++++- src/tuxpaint.c | 9 +++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7fb2e6fe6..7d238793a 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,12 @@ SYSNAME:=$(shell uname -s) ifeq ($(findstring MINGW32, $(SYSNAME)),MINGW32) OS:=windows GPERF:=/usr/bin/gperf - MINGW_DIR:=/mingw32 + ifeq ($(findstring NT-6.2, $(SYSNAME)),NT-6.2) + BDIST_2KXP:=True + MINGW_DIR:=/usr/local + else + MINGW_DIR:=/mingw32 + endif else ifeq ($(findstring MINGW64, $(SYSNAME)),MINGW64) OS:=windows @@ -888,6 +893,11 @@ install-dlls: @mkdir -p $(BIN_PREFIX)/lib/gdk-pixbuf-2.0/2.10.0/loaders @cp $(MINGW_DIR)/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll $(BIN_PREFIX)/lib/gdk-pixbuf-2.0/2.10.0/loaders @strip -s $(BIN_PREFIX)/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll + @if [ "x$(BDIST_2KXP)" = "xTrue" ]; then \ + mkdir -p $(BIN_PREFIX)/lib/pango/1.6.0/modules; \ + cp /usr/local/lib/pango/1.6.0/modules/*.dll $(BIN_PREFIX)/lib/pango/1.6.0/modules; \ + strip -s $(BIN_PREFIX)/lib/pango/1.6.0/modules/*.dll; \ + fi # Install symlink: .PHONY: install-haiku diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 09326a0f1..183fa93db 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -455,7 +455,9 @@ static void mtw(wchar_t * wtok, char *tok) #else #include -/* #include -- Deprecated */ +#if defined (__MINGW32__) && (__GNUC__ <= 4 ) +#include +#endif #if !defined(RSVG_H) || !defined(RSVG_CAIRO_H) #error "---------------------------------------------------" @@ -16915,8 +16917,11 @@ static void do_render_cur_text(int do_blit) { #if defined(_FRIBIDI_H) || defined(FRIBIDI_H) //FriBidiCharType baseDir = FRIBIDI_TYPE_LTR; - //FriBidiCharType baseDir = FRIBIDI_TYPE_WL; /* Per: Shai Ayal , 2009-01-14 */ +#if defined (__MINGW32__) && (__GNUC__ <= 4 ) + FriBidiCharType baseDir = FRIBIDI_TYPE_WL; /* Per: Shai Ayal , 2009-01-14 */ +#else FriBidiParType baseDir = FRIBIDI_TYPE_WL; //EP to avoid warning on types in now commented line above +#endif FriBidiChar *unicodeIn, *unicodeOut; unsigned int i;