This was originated for #1279 (CLI-only Aseprite) which can be
achieved with LAF_BACKEND=none anyway.
In this way we simplify the development process, and checking for the
availability of the GUI can be done in run-time through App::isGui()
or Context::isUIAvailable().
With this change we are reusing the cached/loaded matrix on each
DitheringMatrixInfo struct, calling the
load_dithering_matrix_from_sprite() function just one time (not on
each brush preview/mouse movement).
This 1) hides user themes whose name is the same as the default,
and are present in the user folders (i.e. 'extensions' and
'data/themes' folders), and 2) doesn't allow to install themes with
the same content/ID of the default aseprite-theme (fix#4226)
The default language (en.ini) has a new "display_name" property, but
probably we should remove it and transform the English language in an
extension (just as the default Aseprite theme).
Before this fix, when installing dithering matrices if Aseprite
couldn't find the file of some matrix described in the json, Aseprite
would crash (this happened during the installation of an erroneous
dithering matrices extension, and after every reboot of Aseprite).
The cause of the crash was the absence of the MainWindow instance
during the ContextBar creation. When an error occurs, the console is
called, but since MainWindows is not yet available, aseprite crashes.
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.
Before this the ASSERT(group.items.empty()) in
AppMenus::removeMenuGroup() was failing when a plugin created
subgroups/submenus inside groups.
We have to remove plugins items in the reverse order that they were
added to uninstall them correctly.
Prior to this fix, any additional external files or directories within the Extension's directory tree, break the subdirectory removal iteration, resulting in empty subdirectories and a console error.
This is a problem introduced with the plugin groups, but now we use a
group to store the list of recent files. With this commit we fixed
some bugs in the impl of menu groups.
It looks like libarchive API is a little tricky, on Windows it needs
wide strings in the pathname. Even archive_entry_set_pathname_utf8()
cannot be used: there is no UTF8 -> wide string conversion inside
libarchive, I guess it's because archive_mstring_get_wcs() doesn't check
for AES_SET_UTF8 case.