Commit Graph

285 Commits

Author SHA1 Message Date
David Capello
340883a2f5 Don't use webp/freetype/harfbuzz libs/includes if they're not found
Fixes #3589, #3628, #3831, #3874, #4547
2024-09-19 16:14:32 -03:00
David Capello
32a099dcb6 Fix crashes with ill-formed fmt format strings (fix #2274)
There is a third-party translation (and can happen with our own
translations) that a fmt format string is ill-formed in the .ini file
of the translation (this could happen even if the en.ini file was
manually modified/broken by hand).

This patch includes a refactor of the Strings class so we can:

1) Static check at compile-time about the number of required arguments
   to format a string (no need to call fmt::format() directly with
   arbitrary number of args)
2) If a string is not valid for the fmt library, the runtime exception
   is caught and the default (English) string is returned.
2024-06-20 20:49:10 -03:00
David Capello
533fb778f3 Reorganize compilation flags in CMakeLists.txt files
* Moved flags that only app-lib uses from add_definitions() to
  target_compile_definitions()
* Curl flags for TLS moved from third_party to root CMakeLists.txt (as
  they were defined in both places)
2024-06-12 17:43:43 -03:00
David Capello
7ce9f85b39 [lua] Fix bug comparing integers and floating points (fix #4516)
This bug was introduced in:

  db8284f5fc

We've removed the patch in our updated Lua v5.4.6 branch.
2024-06-03 11:39:16 -03:00
Jakub Marcowski
0c9966df98 zlib: Update to 1.3.1 2024-05-29 10:33:26 -03:00
David Capello
a1bd6f59aa Update cmark module 2024-05-08 14:52:39 -03:00
David Capello
30a4000c7c Disable tinyxml2 tests 2024-05-08 09:59:21 -03:00
David Capello
e48e71ba28 Update to tinyxml2 2024-04-22 18:28:03 -03:00
David Capello
4d18200b0c [lua] Fix bugs handling errors inside app.transaction()
This errors was reported in #4431: The Tx wasn't rolled back correctly
in case of a Lua error inside the transaction because Lua needs to be
compiled as C++ to avoid longjmps and support stack
unwinding (i.e. calling destructors).
2024-04-22 11:13:10 -03:00
David Capello
d1ea2eaff1 Avoid warnings about redefining LUA_USE_WINDOWS 2024-04-21 22:43:24 -03:00
David Capello
d886e20f6c [lua] Secure io.popen() access (and enable popen on Linux) 2024-04-10 12:01:29 -03:00
David Capello
1a067bb223 Update json11 module 2024-02-28 08:30:23 -03:00
David Capello
3fb1692cdd Update submodules: laf, simpleini 2023-12-06 12:51:29 -03:00
David Capello
eeb5be9bed [lua] Fix crashes setting values out of bounds in JSON objects (fix #4166) 2023-11-30 18:40:02 -03:00
David Capello
7fb4bea265 Fix include directories for pixman target
This is required to include the pixman-version.h
2023-11-26 21:43:31 -03:00
David Capello
4da02d6770 Update libpng module (possible fix for #4037) 2023-11-23 09:50:19 -03:00
David Capello
6c5b27db81 Fix crash/hang using WebSocket in a previously disconnected socket
This can happen using Pribambase extension when we close Aseprite in
some strange way (e.g. killing the process), and the connection is not
closed correctly. It looks like the Blender addon is in an invalid
state and the data cannot be sent any more, but without this patch
Aseprite just hangs/crashes if we retry sending data, but with this
fix we can receive/show that an error happened sending data.

Related to: https://github.com/machinezone/IXWebSocket/pull/481
2023-08-29 12:39:12 -03:00
David Capello
aeeef8e255 Add suppor for doc::Image row stride size > width size
This patch solves several problems introducing the possibility to
specify a row stride bigger than the width (visible pixels) on each
image row. Useful in case that we want to align the initial pixel
address of each row (if DOC_USE_ALIGNED_PIXELS is defined).

This allows us to use some SIMD intrinsics (e.g. SSE2) for some image
functions in the future (right now implemented only in the new
is_same_image_simd_templ() for is_same_image()).

Anyway to avoid breaking some existing code, by default we'll still
keep the old behavior: row stride bytes = width bytes (so
DOC_USE_ALIGNED_PIXELS is undefined).
2023-08-07 15:27:39 -03:00
Zephyr Lykos
2f6655f57e Fix compilation on GCC13
See: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
Bug: https://bugs.gentoo.org/865117
Bug: https://bugs.gentoo.org/895616

Signed-off-by: Zephyr Lykos <self@mochaa.ws>
2023-06-29 14:19:43 -03:00
David Capello
9a915355c5 Update fmt library to 10.0.0 2023-05-15 18:54:46 -03:00
David Capello
1c6e583c87 [lua] Add require() function (fix aseprite/api#10)
This is the first attempt to finally implement the require() function
on Lua. The main problem was how to solve conflicts between plugins
that use the same library name. Here we separate each plugin like in a
namespace, so require(name) inside a plugin will save the module in
_LOADED["pluginName/libraryName"] to avoid conflicts with other
libraryName from other plugins.
2023-04-18 19:41:01 -03:00
David Capello
d3aac6a1cd Add support for .qoi file format (fix #3121) 2023-01-05 14:23:01 -03:00
David Capello
88594bfa0e Merge branch 'main' into beta 2022-09-28 16:20:03 -03:00
David Capello
eadef19924 Update submodules 2022-09-16 12:30:13 -03:00
David Capello
a471ac8425 Update laf/clip/fmt submodules 2022-09-15 12:29:52 -03:00
David Capello
207c1c518c Merge branch 'main' into beta 2022-08-02 19:08:36 -03:00
David Capello
ccb32562ad Link with libwebp from Skia if possible 2022-08-02 18:56:34 -03:00
David Capello
54fa702296 Merge branch 'main' into beta 2022-06-01 10:25:02 -03:00
David Capello
c84210fa74 Don't use expat for libarchive (we don't need support for xar files) 2022-05-31 16:51:00 -03:00
David Capello
77771b703b Merge branch 'main' into beta 2022-05-30 20:41:35 -03:00
David Capello
6277329176 Update harfbuzz module 2022-05-26 15:26:43 -03:00
David Capello
cbbb4f12fa Update pixman module 2022-05-26 11:31:36 -03:00
David Capello
e8f28575f1 Merge branch 'main' into beta 2022-05-09 19:52:57 -03:00
David Capello
e823ee37e9 Fix crash using built-in zlib functions from freetype
We must define FT_CONFIG_OPTION_SYSTEM_ZLIB to use zlib instead of the
built-in zlib functions in FreeType (which crash the program).
2022-05-09 15:40:34 -03:00
David Capello
5864e84d47 Fix freetype compilation including the correct dir for ftconfig.h for Unix-like systems 2022-05-09 13:06:41 -03:00
David Capello
ff397fe425 Update compilation instructions to new compilers and Skia-m102
The code is compatible with Skia-m96, so in the best case the update
of Skia is not mandatory yet.
2022-05-09 10:57:34 -03:00
David Capello
8d2863a58b Merge branch 'main' into beta 2022-05-05 09:57:29 -03:00
David Capello
ea47f6624f Update IXWebSocket module 2022-04-26 10:30:34 -03:00
David Capello
2a59076f49 Merge branch 'main' into beta 2022-04-25 11:45:31 -03:00
David Capello
ae7f340f7e Don't use system libb2 by default in libarchive (fix #3257) 2022-04-22 08:46:57 -03:00
David Capello
f489b7085a Merge branch 'main' into beta 2022-04-06 09:33:51 -03:00
David Capello
5ddf8c0d28 Fix json11 compilation with MSVC
Probably a cmake bug that doesn't detect some invalid flags with VS2022.
Reported here: https://gitlab.kitware.com/cmake/cmake/issues/23398
2022-04-06 09:31:39 -03:00
David Capello
49d279f84e Merge branch 'main' into beta 2022-04-06 00:30:08 -03:00
David Capello
7e2b7b6096 Fix json11 module on MSVC 2022-04-06 00:29:52 -03:00
David Capello
ab2cef1c29 Merge branch 'main' into beta 2022-04-06 00:00:44 -03:00
David Capello
693a5777e7 Update json11 module 2022-04-06 00:00:23 -03:00
David Capello
91c687b1e3 Merge branch 'main' into beta 2021-12-15 17:51:19 -03:00
David Capello
977994765c Normalize some cmake options from WITH_* to ENABLE_* 2021-12-15 17:47:44 -03:00
David Capello
2b57fcaa6c Merge branch 'main' into beta 2021-12-01 18:14:53 -03:00
David Capello
de768a020d Use Skia freetype & harfbuzz when LAF_BACKEND=skia 2021-12-01 18:14:18 -03:00