diff --git a/Makefile b/Makefile index 7afb16d04..31f9bd283 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 @@ -878,7 +883,50 @@ install-dlls: @echo "...Installing Windows DLLs..." @install -d $(BIN_PREFIX) @cp $(TPCONF_PATH)/tuxpaint-config.exe $(BIN_PREFIX) - @src/install-dlls.sh tuxpaint.exe $(TPCONF_PATH)/tuxpaint-config.exe $(BIN_PREFIX) + @if [ "x$(BDIST_2KXP)" = "xTrue" ]; then \ + cp $(MINGW_DIR)/bin/libintl-8.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libiconv-2.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libpng12.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/SDL.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/SDL_image.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/SDL_mixer.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/SDL_ttf.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libfreetype-6.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/zlib1.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libogg-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libvorbis-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libvorbisfile-3.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libjpeg-8.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libfribidi-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libxml2-2.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libcairo-2.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libfontconfig-1.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libSDL_Pango-1.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libgobject-2.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libgthread-2.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/librsvg-2-2.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libcroco-0.6-3.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libgdk_pixbuf-2.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libglib-2.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libgsf-1-114.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libpango-1.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libpangocairo-1.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libpangoft2-1.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libgmodule-2.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libpangowin32-1.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libpixman-1-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libgio-2.0-0.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/bz2-1.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/libimagequant.dll $(BIN_PREFIX); \ + cp `which libgcc_s_dw2-1.dll` $(BIN_PREFIX); \ + cp `which libstdc++-6.dll` $(BIN_PREFIX); \ + cp `which libpthread-2.dll` $(BIN_PREFIX); \ + 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; \ + else \ + src/install-dlls.sh tuxpaint.exe $(TPCONF_PATH)/tuxpaint-config.exe $(BIN_PREFIX); \ + fi @strip -s $(BIN_PREFIX)/*.dll @echo @echo "...Installing Configuration Files..." diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index e5b75d094..7eca75619 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -8,7 +8,7 @@ http://www.tuxpaint.org/ $Id$ -2020.October.30 (0.9.25) +2020.November.21 (0.9.25) * New Features ------------ * Export drawings: @@ -116,6 +116,10 @@ $Id$ descriptions, if we failed to know what language to use (see above). + * Mended bug where a personal Template could not be loaded + due to how we tracked which entry in the "New" dialog + was the first template image. + * New Translations: ----------------- diff --git a/docs/en/README.txt b/docs/en/README.txt index 85d0e57cd..9041ff022 100644 --- a/docs/en/README.txt +++ b/docs/en/README.txt @@ -6,7 +6,7 @@ Copyright 2002-2020 by various contributors; see AUTHORS.txt http://www.tuxpaint.org/ - June 14, 2002 - August 25, 2020 + June 14, 2002 - November 21, 2020 ---------------------------------------------------------------------- diff --git a/docs/en/html/README.html b/docs/en/html/README.html index bad42f684..3d9222455 100644 --- a/docs/en/html/README.html +++ b/docs/en/html/README.html @@ -35,7 +35,7 @@

- June 14, 2002 - August 25, 2020 + June 14, 2002 - November 21, 2020

diff --git a/src/tuxpaint.c b/src/tuxpaint.c index a2cb2877c..90fa8835c 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - June 14, 2002 - November 10, 2020 + June 14, 2002 - November 21, 2020 */ @@ -476,7 +476,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 "---------------------------------------------------" @@ -11968,6 +11970,7 @@ static SDL_Surface *load_starter_helper(char *path_and_basename, const char *ext ext = strdup(extension); safe_snprintf(fname, sizeof(fname), "%s.%s", path_and_basename, ext); + surf = (*load_func) (fname); if (surf == NULL) @@ -16645,6 +16648,7 @@ static void play_slideshow(int *selected, int num_selected, char *dirname, char SDL_Surface *img; char *tmp_starter_id, *tmp_template_id, *tmp_file_id; int tmp_starter_mirrored, tmp_starter_flipped, tmp_starter_personal; + /* FIXME: Do we want to keep `template_personal` safe, too? */ char fname[1024]; SDL_Event event; SDLKey key; @@ -16662,6 +16666,7 @@ static void play_slideshow(int *selected, int num_selected, char *dirname, char tmp_starter_mirrored = starter_mirrored; tmp_starter_flipped = starter_flipped; tmp_starter_personal = starter_personal; + /* FIXME: Do we want to keep `template_personal` safe, too? */ do_setcursor(cursor_tiny); @@ -17396,8 +17401,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; @@ -19557,7 +19565,8 @@ static int do_new_dialog(void) DIR *d; struct dirent *f; struct dirent2 *fs; - int place, oldplace; + struct stat sbuf; + int place; char *dirname[NUM_PLACES_TO_LOOK]; char **d_names = NULL, **d_exts = NULL; int *d_places; @@ -19643,18 +19652,22 @@ static int do_new_dialog(void) { f = readdir(d); - if (f != NULL) + if (f !=NULL) { - memcpy(&(fs[num_files_in_dirs].f), f, sizeof(struct dirent)); - fs[num_files_in_dirs].place = places_to_look; - - num_files_in_dirs++; - - if (num_files_in_dirs >= things_alloced) + safe_snprintf(fname, sizeof(fname), "%s/%s", dirname[places_to_look], f->d_name); + if (!stat(fname, &sbuf) && S_ISREG(sbuf.st_mode)) { - things_alloced = things_alloced + 32; + memcpy(&(fs[num_files_in_dirs].f), f, sizeof(struct dirent)); + fs[num_files_in_dirs].place = places_to_look; - fs = (struct dirent2 *)realloc(fs, sizeof(struct dirent2) * things_alloced); + num_files_in_dirs++; + + if (num_files_in_dirs >= things_alloced) + { + things_alloced = things_alloced + 32; + + fs = (struct dirent2 *)realloc(fs, sizeof(struct dirent2) * things_alloced); + } } } } @@ -19725,19 +19738,14 @@ static int do_new_dialog(void) /* Read directory of images and build thumbnails: */ - oldplace = -1; - for (j = 0; j < num_files_in_dirs; j++) { f = &(fs[j].f); place = fs[j].place; - if ((place == PLACE_PERSONAL_TEMPLATES_DIR || place == PLACE_TEMPLATES_DIR) && oldplace != place) + if ((place == PLACE_PERSONAL_TEMPLATES_DIR || place == PLACE_TEMPLATES_DIR) && first_template == -1) first_template = num_files; - oldplace = place; - - show_progress_bar(screen); if (f != NULL) diff --git a/win32/tuxpaint.iss b/win32/tuxpaint.iss index 43de5bc8e..e4c23da4b 100644 --- a/win32/tuxpaint.iss +++ b/win32/tuxpaint.iss @@ -85,7 +85,7 @@ PrivilegesRequired=admin Name: "afr"; MessagesFile: "compiler:Languages\Afrikaans.isl" Name: "alb"; MessagesFile: "compiler:Languages\Albanian.isl" Name: "ara"; MessagesFile: "compiler:Languages\Arabic.isl" -Name: "arm"; MessagesFile: "compiler:Languages\Armenian.isl" +Name: "arm"; MessagesFile: "compiler:Languages\Armenian.islu" Name: "ast"; MessagesFile: "compiler:Languages\Asturian.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-es-COPIADO.txt" Name: "baq"; MessagesFile: "compiler:Languages\Basque.isl" Name: "bel"; MessagesFile: "compiler:Languages\Belarusian.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-be.txt" @@ -96,7 +96,7 @@ Name: "bul"; MessagesFile: "compiler:Languages\Bulgarian.isl"; LicenseFile: "{#B Name: "cat"; MessagesFile: "compiler:Languages\Catalan.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-ca.txt" Name: "chs"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-zh_cn.txt" Name: "cht"; MessagesFile: "compiler:Languages\ChineseTraditional.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-zh_tw_GNU_GPL_Chinese.txt" -Name: "cnr"; MessagesFile: "compiler:Languages\Montenegrin.isl" +Name: "cnr"; MessagesFile: "compiler:Languages\Montenegrian.isl" Name: "cos"; MessagesFile: "compiler:Languages\Corsican.isl" Name: "cze"; MessagesFile: "compiler:Languages\Czech.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-cs.txt" Name: "dan"; MessagesFile: "compiler:Languages\Danish.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-da.txt" @@ -110,7 +110,7 @@ Name: "fas"; MessagesFile: "compiler:Languages\Farsi.isl" Name: "fin"; MessagesFile: "compiler:Languages\Finnish.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-fi.txt" Name: "fre"; MessagesFile: "compiler:Languages\French.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-fr-COPIER.txt" Name: "gal"; MessagesFile: "compiler:Languages\Galician.isl" -Name: "geo"; MessagesFile: "compiler:Languages\Georgian.isl" +Name: "geo"; MessagesFile: "compiler:Languages\Georgian.islu" Name: "ger"; MessagesFile: "compiler:Languages\German.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-de-KOPIE.txt" Name: "gla"; MessagesFile: "compiler:Languages\ScottishGaelic.isl" Name: "gre"; MessagesFile: "compiler:Languages\Greek.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-el.txt" @@ -151,8 +151,7 @@ Name: "tai"; MessagesFile: "compiler:Languages\Thai.isl" Name: "tat"; MessagesFile: "compiler:Languages\Tatar.isl" Name: "tur"; MessagesFile: "compiler:Languages\Turkish.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-tr.txt" Name: "uig"; MessagesFile: "compiler:Languages\Uyghur.islu" -Name: "ukr"; MessagesFile: "compiler:Languages\Ukrainian.isl" -Name: "urd"; MessagesFile: "compiler:Languages\Urdu.isl" +Name: "ukr"; MessagesFile: "compiler:Languages\Ukrainian.isl" Name: "uzb"; MessagesFile: "compiler:Languages\Uzbek.isl" Name: "vie"; MessagesFile: "compiler:Languages\Vietnamese.isl"