diff --git a/.gitmodules b/.gitmodules
index bcb194467..b9d8b9625 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -12,7 +12,7 @@
url = https://github.com/aseprite/duktape.git
[submodule "third_party/libwebp"]
path = third_party/libwebp
- url = https://chromium.googlesource.com/webm/libwebp
+ url = https://github.com/aseprite/libwebp.git
[submodule "src/flic"]
path = src/flic
url = https://github.com/aseprite/flic.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed77f00af..2f3978335 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -210,7 +210,12 @@ if(WITH_WEBP_SUPPORT)
message(FATAL_ERROR "libwebp not found")
endif()
else()
- set(WEBP_LIBRARIES webp)
+ # Skia already includes webp library
+ if(NOT USE_SKIA_BACKEND)
+ set(WEBP_LIBRARIES webp)
+ else()
+ set(WEBP_LIBRARIES "")
+ endif()
set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
endif()
include_directories(${WEBP_INCLUDE_DIR})
diff --git a/INSTALL.md b/INSTALL.md
index 31d402ef2..f2727a794 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -4,18 +4,18 @@
* [Get the source code](#get-the-source-code)
* [Dependencies](#dependencies)
* [Windows dependencies](#windows-dependencies)
- * [Mac OS X dependencies](#mac-os-x-dependencies)
+ * [macOS dependencies](#macos-dependencies)
* [Linux dependencies](#linux-dependencies)
* [Compiling](#compiling)
* [Windows details](#windows-details)
- * [Mac OS X details](#mac-os-x-details)
+ * [macOS details](#macos-details)
* [Issues with Retina displays](#issues-with-retina-displays)
* [Linux details](#linux-details)
* [Using shared third party libraries](#using-shared-third-party-libraries)
* [Linux issues](#linux-issues)
* [Building Skia dependency](#building-skia-dependency)
* [Skia on Windows](#skia-on-windows)
- * [Skia on Mac OS X](#skia-on-mac-os-x)
+ * [Skia on macOS](#skia-on-macos)
# Platforms
@@ -23,7 +23,7 @@ You should be able to compile Aseprite successfully on the following
platforms:
* Windows 10 + VS2015 Community Edition + Windows 10 SDK
-* Mac OS X 10.11.4 El Capitan + Xcode 7.3 + OS X 10.11 SDK + Skia (without GPU)
+* macOS 10.12.1 Sierra + Xcode 8.0 + macOS 10.12 SDK + Skia
* Linux + gcc 4.8 with some C++11 support
# Get the source code
@@ -62,7 +62,7 @@ Aseprite can be compiled with two different back-ends:
removed in future versions. All new development is being done in
the new Skia back-end.
-2. Skia back-end (Windows, Mac OS X): You will need a compiled version
+2. Skia back-end (Windows, macOS): You will need a compiled version
of the Skia library. Please check the details about
[how to build Skia](#building-skia-dependency) on your platform.
@@ -83,12 +83,12 @@ After that you have to choose the back-end:
[Windows details](#windows-details) section to know how to call
`cmake` correctly.
-## Mac OS X dependencies
+## macOS dependencies
-On OS X you will need Mac OS X 10.11 SDK and Xcode 7.3 (maybe older
-versions might work).
+On macOS you will need macOS 10.12 SDK and Xcode 8.0 (older versions
+might work).
-Also, you must compile [Skia](#skia-on-mac-os-x) before starting with
+Also, you must compile [Skia](#skia-on-macos) before starting with
the [compilation](#compiling).
## Linux dependencies
@@ -121,7 +121,7 @@ The `libxcursor-dev` package is needed to
Here `cmake` needs different options depending on your
platform. You must check the details for
- [Windows](#windows-details), [OS X](#mac-os-x-details), and
+ [Windows](#windows-details), [macOS](#macos-details), and
[Linux](#linux-details). Some `cmake` options can be modified using tools like
[`ccmake`](https://cmake.org/cmake/help/latest/manual/ccmake.1.html)
or [`cmake-gui`](https://cmake.org/cmake/help/latest/manual/cmake-gui.1.html).
@@ -150,9 +150,9 @@ with the following arguments:
In this case, `C:\deps\skia` is the directory where Skia was compiled
as described in [Skia on Windows](#skia-on-windows) section.
-## Mac OS X details
+## macOS details
-After [compiling Skia](#skia-on-mac-os-x), you should run `cmake` with
+After [compiling Skia](#skia-on-macos), you should run `cmake` with
the following parameters and then `ninja`:
cd aseprite
@@ -161,7 +161,7 @@ the following parameters and then `ninja`:
cmake \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 \
- -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk \
+ -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk \
-DUSE_ALLEG4_BACKEND=OFF \
-DUSE_SKIA_BACKEND=ON \
-DSKIA_DIR=$HOME/deps/skia \
@@ -171,7 +171,7 @@ the following parameters and then `ninja`:
ninja aseprite
In this case, `$HOME/deps/skia` is the directory where Skia was
-compiled as described in [Skia on Mac OS X](#skia-on-mac-os-x) section.
+compiled as described in [Skia on macOS](#skia-on-macos) section.
### Issues with Retina displays
@@ -220,13 +220,13 @@ known issues solved in
# Building Skia dependency
When you compile Aseprite with [Skia](https://skia.org) as back-end on
-Windows or OS X, you need to compile a specific version of Skia. In
+Windows or macOS, you need to compile a specific version of Skia. In
the following sections you will find straightforward steps to compile
Skia.
You can always check the
[official Skia instructions](https://skia.org/user/quick) and select
-the OS you are building for. Aseprite uses the `aseprite-m53` Skia
+the OS you are building for. Aseprite uses the `aseprite-m55` Skia
branch from `https://github.com/aseprite/skia`.
## Skia on Windows
@@ -249,7 +249,7 @@ Just ignore it.)
cd C:\deps
git clone https://github.com/aseprite/skia.git
cd skia
- git checkout aseprite-m53
+ git checkout aseprite-m55
python bin/sync-and-gyp
(The `bin/sync-and-gyp` will take some minutes because it downloads a
@@ -260,7 +260,7 @@ lot of packages, please wait and re-run the same command in case it fails.)
More information about these steps in the
[official Skia documentation](https://skia.org/user/quick/windows).
-## Skia on Mac OS X
+## Skia on macOS
These steps will create a `deps` folder in your home directory with a
couple of subdirectories needed to build Skia (you can change the
@@ -273,14 +273,14 @@ several minutes to finish:
git clone https://github.com/aseprite/skia.git
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
- git checkout aseprite-m53
+ git checkout aseprite-m55
python bin/sync-and-gyp
ninja -C out/Release dm
After this you should have all Skia libraries compiled. When you
[compile Aseprite](#compiling), remember to add
`-DSKIA_DIR=$HOME/deps/skia` parameter to your `cmake` call as
-described in the [Mac OS X details](#mac-os-x-details) section.
+described in the [macOS details](#macos-details) section.
More information about these steps in the
[official Skia documentation](https://skia.org/user/quick/macos).
diff --git a/data/palettes/master-system.gpl b/data/palettes/master-system.gpl
index 256867e1d..b6494b7d1 100644
--- a/data/palettes/master-system.gpl
+++ b/data/palettes/master-system.gpl
@@ -1,34 +1,67 @@
GIMP Palette
+Columns: 16
#
- 85 0 85 Untitled
-170 85 170 Untitled
-255 170 255 Untitled
- 0 0 85 Untitled
- 85 85 170 Untitled
-170 170 255 Untitled
- 85 170 170 Untitled
- 0 85 85 Untitled
-170 255 255 Untitled
- 0 85 0 Untitled
-170 255 170 Untitled
- 85 170 0 Untitled
-170 255 0 Untitled
-170 170 0 Untitled
- 85 85 0 Untitled
-255 255 85 Untitled
-170 170 85 Untitled
-255 255 170 Untitled
-255 170 0 Untitled
-170 85 0 Untitled
-255 170 85 Untitled
-255 85 0 Untitled
-255 0 0 Untitled
-170 0 0 Untitled
- 85 0 0 Untitled
-255 85 85 Untitled
-170 85 85 Untitled
-255 170 170 Untitled
-255 255 255 Untitled
-170 170 170 Untitled
- 85 85 85 Untitled
- 0 0 0 Untitled
+ 0 0 0 Untitled
+ 85 0 0 Untitled
+170 0 0 Untitled
+255 0 0 Untitled
+ 0 85 0 Untitled
+ 85 85 0 Untitled
+170 85 0 Untitled
+255 85 0 Untitled
+ 0 170 0 Untitled
+ 85 170 0 Untitled
+170 170 0 Untitled
+255 170 0 Untitled
+ 0 255 0 Untitled
+ 85 255 0 Untitled
+170 255 0 Untitled
+255 255 0 Untitled
+ 0 0 85 Untitled
+ 85 0 85 Untitled
+170 0 85 Untitled
+255 0 85 Untitled
+ 0 85 85 Untitled
+ 85 85 85 Untitled
+170 85 85 Untitled
+255 85 85 Untitled
+ 0 170 85 Untitled
+ 85 170 85 Untitled
+170 170 85 Untitled
+255 170 85 Untitled
+ 0 255 85 Untitled
+ 85 255 85 Untitled
+170 255 85 Untitled
+255 255 85 Untitled
+ 0 0 170 Untitled
+ 85 0 170 Untitled
+170 0 170 Untitled
+255 0 170 Untitled
+ 0 85 170 Untitled
+ 85 85 170 Untitled
+170 85 170 Untitled
+255 85 170 Untitled
+ 0 170 170 Untitled
+ 85 170 170 Untitled
+170 170 170 Untitled
+255 170 170 Untitled
+ 0 255 170 Untitled
+ 85 255 170 Untitled
+170 255 170 Untitled
+255 255 170 Untitled
+ 0 0 255 Untitled
+ 85 0 255 Untitled
+170 0 255 Untitled
+255 0 255 Untitled
+ 0 85 255 Untitled
+ 85 85 255 Untitled
+170 85 255 Untitled
+255 85 255 Untitled
+ 0 170 255 Untitled
+ 85 170 255 Untitled
+170 170 255 Untitled
+255 170 255 Untitled
+ 0 255 255 Untitled
+ 85 255 255 Untitled
+170 255 255 Untitled
+255 255 255 Untitled
diff --git a/data/pref.xml b/data/pref.xml
index 2229acd4f..b27cefb9a 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -60,7 +60,7 @@
-!
+
diff --git a/data/skins/default/skin.xml b/data/skins/default/skin.xml
index 290f0cb40..e1c672ea6 100644
--- a/data/skins/default/skin.xml
+++ b/data/skins/default/skin.xml
@@ -18,6 +18,7 @@
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 437dcca07..83403c73a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -109,6 +109,7 @@ add_subdirectory(gen)
add_subdirectory(gfx)
add_subdirectory(net)
add_subdirectory(render)
+add_subdirectory(docio)
add_subdirectory(script)
add_subdirectory(she)
add_subdirectory(ui)
diff --git a/src/README.md b/src/README.md
index c67c5b937..99986a5e5 100644
--- a/src/README.md
+++ b/src/README.md
@@ -47,11 +47,11 @@ because they don't depend on any other component.
## Level 4
- * [iff](iff/) (base, doc, render): Image File Formats library (load/save documents).
+ * [docio](docio/) (base, flic): Load/save documents.
## Level 5
- * [app](app/) (allegro, base, doc, filters, fixmath, gfx, iff, pen, render, scripting, she, ui, undo, updater, webserver)
+ * [app](app/) (allegro, base, doc, docio, filters, fixmath, flic, gfx, pen, render, scripting, she, ui, undo, updater, webserver)
## Level 6
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
index 1ca0ea29f..340ae7d27 100644
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -461,6 +461,7 @@ target_link_libraries(app-lib
clip
css-lib
doc-lib
+ docio-lib
filters-lib
fixmath-lib
flic-lib
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 337d1f4e4..c5a5c460d 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -166,7 +166,7 @@ void App::initialize(const AppOptions& options)
m_modules->createDataRecovery();
if (isPortable())
- LOG("Running in portable mode\n");
+ LOG("APP: Running in portable mode\n");
// Load or create the default palette, or migrate the default
// palette from an old format palette to the new one, etc.
@@ -174,7 +174,7 @@ void App::initialize(const AppOptions& options)
// Initialize GUI interface
if (isGui()) {
- LOG("GUI mode\n");
+ LOG("APP: GUI mode\n");
// Setup the GUI cursor and redraw screen
@@ -202,7 +202,7 @@ void App::initialize(const AppOptions& options)
}
// Procress options
- LOG("Processing options...\n");
+ LOG("APP: Processing options...\n");
{
base::UniquePtr delegate;
if (options.previewCLI())
@@ -297,11 +297,9 @@ void App::run()
App::~App()
{
try {
+ LOG("APP: Exit\n");
ASSERT(m_instance == this);
- // Remove Aseprite handlers
- LOG("ASE: Uninstalling\n");
-
// Delete file formats.
FileFormatsManager::destroyInstance();
@@ -325,12 +323,13 @@ App::~App()
m_instance = NULL;
}
catch (const std::exception& e) {
+ LOG(ERROR) << "APP: Error: " << e.what() << "\n";
she::error_message(e.what());
// no re-throw
}
catch (...) {
- she::error_message("Error closing ASE.\n(uncaught exception)");
+ she::error_message("Error closing " PACKAGE ".\n(uncaught exception)");
// no re-throw
}
diff --git a/src/app/app_brushes.cpp b/src/app/app_brushes.cpp
index ce0e6b057..bf2c92a00 100644
--- a/src/app/app_brushes.cpp
+++ b/src/app/app_brushes.cpp
@@ -185,7 +185,7 @@ AppBrushes::AppBrushes()
load(fn);
}
catch (const std::exception& ex) {
- LOG("Error loading user brushes: %s", ex.what());
+ LOG(ERROR) << "BRSH: Error loading user brushes: " << ex.what() << "\n";
}
}
diff --git a/src/app/app_menus.cpp b/src/app/app_menus.cpp
index a8cb34f4d..ac441ca6d 100644
--- a/src/app/app_menus.cpp
+++ b/src/app/app_menus.cpp
@@ -71,7 +71,7 @@ void AppMenus::reload()
////////////////////////////////////////
// Load menus
- LOG(" - Loading menus from \"%s\"...\n", path);
+ LOG("MENU: Loading menus from %s\n", path);
m_rootMenu.reset(loadMenuById(handle, "main_menu"));
@@ -81,7 +81,7 @@ void AppMenus::reload()
m_rootMenu->insertChild(0, createInvalidVersionMenuitem());
#endif
- LOG("Main menu loaded.\n");
+ LOG("MENU: Main menu loaded.\n");
m_tabPopupMenu.reset(loadMenuById(handle, "tab_popup"));
m_documentTabPopupMenu.reset(loadMenuById(handle, "document_tab_popup"));
@@ -96,7 +96,7 @@ void AppMenus::reload()
////////////////////////////////////////
// Load keyboard shortcuts for commands
- LOG(" - Loading commands keyboard shortcuts from \"%s\"...\n", path);
+ LOG("MENU: Loading commands keyboard shortcuts from %s\n", path);
TiXmlElement* xmlKey = handle
.FirstChild("gui")
@@ -167,8 +167,6 @@ Menu* AppMenus::loadMenuById(TiXmlHandle& handle, const char* id)
{
ASSERT(id != NULL);
- //LOG("loadMenuById(%s)\n", id);
-
//