2020/12/02 Merge branch 'master' into sdl2.0

This commit is contained in:
Pere Pujal i Carabantes 2020-12-02 20:24:43 +01:00
commit 3b44b4929f
6 changed files with 88 additions and 29 deletions

View file

@ -23,7 +23,12 @@ SYSNAME:=$(shell uname -s)
ifeq ($(findstring MINGW32, $(SYSNAME)),MINGW32) ifeq ($(findstring MINGW32, $(SYSNAME)),MINGW32)
OS:=windows OS:=windows
GPERF:=/usr/bin/gperf 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 else
ifeq ($(findstring MINGW64, $(SYSNAME)),MINGW64) ifeq ($(findstring MINGW64, $(SYSNAME)),MINGW64)
OS:=windows OS:=windows
@ -878,7 +883,50 @@ install-dlls:
@echo "...Installing Windows DLLs..." @echo "...Installing Windows DLLs..."
@install -d $(BIN_PREFIX) @install -d $(BIN_PREFIX)
@cp $(TPCONF_PATH)/tuxpaint-config.exe $(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 @strip -s $(BIN_PREFIX)/*.dll
@echo @echo
@echo "...Installing Configuration Files..." @echo "...Installing Configuration Files..."

View file

@ -8,7 +8,7 @@ http://www.tuxpaint.org/
$Id$ $Id$
2020.October.30 (0.9.25) 2020.November.21 (0.9.25)
* New Features * New Features
------------ ------------
* Export drawings: * Export drawings:
@ -116,6 +116,10 @@ $Id$
descriptions, if we failed to know what language to use descriptions, if we failed to know what language to use
(see above). (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: * New Translations:
----------------- -----------------

View file

@ -6,7 +6,7 @@
Copyright 2002-2020 by various contributors; see AUTHORS.txt Copyright 2002-2020 by various contributors; see AUTHORS.txt
http://www.tuxpaint.org/ http://www.tuxpaint.org/
June 14, 2002 - August 25, 2020 June 14, 2002 - November 21, 2020
---------------------------------------------------------------------- ----------------------------------------------------------------------

View file

@ -35,7 +35,7 @@
</p> </p>
<p> <p>
June 14, 2002 - August 25, 2020 June 14, 2002 - November 21, 2020
</p> </p>
</center> </center>

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (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 #else
#include <librsvg/rsvg.h> #include <librsvg/rsvg.h>
/* #include <librsvg/rsvg-cairo.h> -- Deprecated */ #if defined (__MINGW32__) && (__GNUC__ <= 4 )
#include <librsvg/rsvg-cairo.h>
#endif
#if !defined(RSVG_H) || !defined(RSVG_CAIRO_H) #if !defined(RSVG_H) || !defined(RSVG_CAIRO_H)
#error "---------------------------------------------------" #error "---------------------------------------------------"
@ -11968,6 +11970,7 @@ static SDL_Surface *load_starter_helper(char *path_and_basename, const char *ext
ext = strdup(extension); ext = strdup(extension);
safe_snprintf(fname, sizeof(fname), "%s.%s", path_and_basename, ext); safe_snprintf(fname, sizeof(fname), "%s.%s", path_and_basename, ext);
surf = (*load_func) (fname); surf = (*load_func) (fname);
if (surf == NULL) if (surf == NULL)
@ -16645,6 +16648,7 @@ static void play_slideshow(int *selected, int num_selected, char *dirname, char
SDL_Surface *img; SDL_Surface *img;
char *tmp_starter_id, *tmp_template_id, *tmp_file_id; char *tmp_starter_id, *tmp_template_id, *tmp_file_id;
int tmp_starter_mirrored, tmp_starter_flipped, tmp_starter_personal; int tmp_starter_mirrored, tmp_starter_flipped, tmp_starter_personal;
/* FIXME: Do we want to keep `template_personal` safe, too? */
char fname[1024]; char fname[1024];
SDL_Event event; SDL_Event event;
SDLKey key; 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_mirrored = starter_mirrored;
tmp_starter_flipped = starter_flipped; tmp_starter_flipped = starter_flipped;
tmp_starter_personal = starter_personal; tmp_starter_personal = starter_personal;
/* FIXME: Do we want to keep `template_personal` safe, too? */
do_setcursor(cursor_tiny); do_setcursor(cursor_tiny);
@ -17396,8 +17401,11 @@ static void do_render_cur_text(int do_blit)
{ {
#if defined(_FRIBIDI_H) || defined(FRIBIDI_H) #if defined(_FRIBIDI_H) || defined(FRIBIDI_H)
//FriBidiCharType baseDir = FRIBIDI_TYPE_LTR; //FriBidiCharType baseDir = FRIBIDI_TYPE_LTR;
//FriBidiCharType baseDir = FRIBIDI_TYPE_WL; /* Per: Shai Ayal <shaiay@gmail.com>, 2009-01-14 */ #if defined (__MINGW32__) && (__GNUC__ <= 4 )
FriBidiCharType baseDir = FRIBIDI_TYPE_WL; /* Per: Shai Ayal <shaiay@gmail.com>, 2009-01-14 */
#else
FriBidiParType baseDir = FRIBIDI_TYPE_WL; //EP to avoid warning on types in now commented line above FriBidiParType baseDir = FRIBIDI_TYPE_WL; //EP to avoid warning on types in now commented line above
#endif
FriBidiChar *unicodeIn, *unicodeOut; FriBidiChar *unicodeIn, *unicodeOut;
unsigned int i; unsigned int i;
@ -19557,7 +19565,8 @@ static int do_new_dialog(void)
DIR *d; DIR *d;
struct dirent *f; struct dirent *f;
struct dirent2 *fs; struct dirent2 *fs;
int place, oldplace; struct stat sbuf;
int place;
char *dirname[NUM_PLACES_TO_LOOK]; char *dirname[NUM_PLACES_TO_LOOK];
char **d_names = NULL, **d_exts = NULL; char **d_names = NULL, **d_exts = NULL;
int *d_places; int *d_places;
@ -19643,18 +19652,22 @@ static int do_new_dialog(void)
{ {
f = readdir(d); f = readdir(d);
if (f != NULL) if (f !=NULL)
{ {
memcpy(&(fs[num_files_in_dirs].f), f, sizeof(struct dirent)); safe_snprintf(fname, sizeof(fname), "%s/%s", dirname[places_to_look], f->d_name);
fs[num_files_in_dirs].place = places_to_look; if (!stat(fname, &sbuf) && S_ISREG(sbuf.st_mode))
num_files_in_dirs++;
if (num_files_in_dirs >= things_alloced)
{ {
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: */ /* Read directory of images and build thumbnails: */
oldplace = -1;
for (j = 0; j < num_files_in_dirs; j++) for (j = 0; j < num_files_in_dirs; j++)
{ {
f = &(fs[j].f); f = &(fs[j].f);
place = fs[j].place; 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; first_template = num_files;
oldplace = place;
show_progress_bar(screen); show_progress_bar(screen);
if (f != NULL) if (f != NULL)

View file

@ -85,7 +85,7 @@ PrivilegesRequired=admin
Name: "afr"; MessagesFile: "compiler:Languages\Afrikaans.isl" Name: "afr"; MessagesFile: "compiler:Languages\Afrikaans.isl"
Name: "alb"; MessagesFile: "compiler:Languages\Albanian.isl" Name: "alb"; MessagesFile: "compiler:Languages\Albanian.isl"
Name: "ara"; MessagesFile: "compiler:Languages\Arabic.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: "ast"; MessagesFile: "compiler:Languages\Asturian.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-es-COPIADO.txt"
Name: "baq"; MessagesFile: "compiler:Languages\Basque.isl" Name: "baq"; MessagesFile: "compiler:Languages\Basque.isl"
Name: "bel"; MessagesFile: "compiler:Languages\Belarusian.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-be.txt" 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: "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: "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: "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: "cos"; MessagesFile: "compiler:Languages\Corsican.isl"
Name: "cze"; MessagesFile: "compiler:Languages\Czech.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-cs.txt" 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" 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: "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: "fre"; MessagesFile: "compiler:Languages\French.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-fr-COPIER.txt"
Name: "gal"; MessagesFile: "compiler:Languages\Galician.isl" 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: "ger"; MessagesFile: "compiler:Languages\German.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-de-KOPIE.txt"
Name: "gla"; MessagesFile: "compiler:Languages\ScottishGaelic.isl" Name: "gla"; MessagesFile: "compiler:Languages\ScottishGaelic.isl"
Name: "gre"; MessagesFile: "compiler:Languages\Greek.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-el.txt" 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: "tat"; MessagesFile: "compiler:Languages\Tatar.isl"
Name: "tur"; MessagesFile: "compiler:Languages\Turkish.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-tr.txt" Name: "tur"; MessagesFile: "compiler:Languages\Turkish.isl"; LicenseFile: "{#BdistDir}\docs\COPYING\COPYING-tr.txt"
Name: "uig"; MessagesFile: "compiler:Languages\Uyghur.islu" Name: "uig"; MessagesFile: "compiler:Languages\Uyghur.islu"
Name: "ukr"; MessagesFile: "compiler:Languages\Ukrainian.isl" Name: "ukr"; MessagesFile: "compiler:Languages\Ukrainian.isl"
Name: "urd"; MessagesFile: "compiler:Languages\Urdu.isl"
Name: "uzb"; MessagesFile: "compiler:Languages\Uzbek.isl" Name: "uzb"; MessagesFile: "compiler:Languages\Uzbek.isl"
Name: "vie"; MessagesFile: "compiler:Languages\Vietnamese.isl" Name: "vie"; MessagesFile: "compiler:Languages\Vietnamese.isl"