You should be able to compile Aseprite successfully on the following platforms:
- Windows 11 + Visual Studio Community 2022 + Windows 10.0 SDK (the latest version available) (we don't support MinGW)
- macOS 13.0.1 Ventura + Xcode 14.1 + macOS 11.3 SDK (older version might work)
- Linux Ubuntu Bionic 18.04 + clang 10.0
You can get the source code downloading a Aseprite-v1.x-Source.zip
file from the latest Aseprite release (in that case please follow the
compilation instructions inside the .zip
file):
https://github.com/aseprite/aseprite/releases
Or you can clone the repository and all its submodules using the following command:
git clone --recursive https://github.com/aseprite/aseprite.git
To update an existing clone you can use the following commands:
cd aseprite
git pull
git submodule update --init --recursive
You can use Git for Windows to clone the repository on Windows.
To compile Aseprite you will need:
- The latest version of CMake (3.16 or greater)
- Ninja build system
- And a compiled version of the
aseprite-m102
branch of the Skia library. There are pre-built packages available. You can get some extra information in the laf dependencies page.
- Windows 10 (we don't support cross-compiling)
- Visual Studio Community 2022 (we don't support MinGW)
- The Desktop development with C++ item + Windows 10.0.18362.0 SDK from the Visual Studio installer
On macOS you will need macOS 11.3 SDK and Xcode 13.1 (older versions might work).
You will need the following dependencies on Ubuntu/Debian:
sudo apt-get install -y g++ clang libc++-dev libc++abi-dev cmake ninja-build libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev
Or use clang-10 packages (or newer) in case that clang in your distribution is older than clang 10.0:
sudo apt-get install -y clang-10 libc++-10-dev libc++abi-10-dev
On Fedora:
sudo dnf install -y gcc-c++ clang libcxx-devel cmake ninja-build libX11-devel libXcursor-devel libXi-devel mesa-libGL-devel fontconfig-devel
On Arch:
sudo pacman -S gcc clang libc++ cmake ninja libx11 libxcursor mesa-libgl fontconfig
On SUSE:
sudo zypper install gcc-c++ clang libc++-devel libc++abi-devel cmake ninja libX11-devel libXcursor-devel libXi-devel Mesa-libGL-devel fontconfig-devel
-
Get Aseprite code, put it in a folder like
C:\aseprite
, and create abuild
directory inside to leave all the files that are result of the compilation process (.exe
,.lib
,.obj
,.a
,.o
, etc).cd C:\aseprite mkdir build
In this way, if you want to start with a fresh copy of Aseprite source code, you can remove the
build
directory and start again. -
Enter in the new directory and execute
cmake
:cd C:\aseprite\build cmake -G Ninja -DLAF_BACKEND=skia ..
Here
cmake
needs different options depending on your platform. You must check the details for Windows, macOS, and Linux. Somecmake
options can be modified using tools likeccmake
orcmake-gui
. -
After you have executed and configured
cmake
, you have to compile the project:cd C:\aseprite\build ninja aseprite
-
When
ninja
finishes the compilation, you can find the executable insideC:\aseprite\build\bin\aseprite.exe
.
Open a command prompt window (cmd.exe
) and call:
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -arch=x64
The command above is required while using the 64-bit version of skia. When compiling with the 32-bit version, it is possible to open a developer command prompt instead.
And then
cd aseprite
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLAF_BACKEND=skia -DSKIA_DIR=C:\deps\skia -DSKIA_LIBRARY_DIR=C:\deps\skia\out\Release-x64 -DSKIA_LIBRARY=C:\deps\skia\out\Release-x64\skia.lib -G Ninja ..
ninja aseprite
In this case, C:\deps\skia
is the directory where Skia was compiled
or uncompressed.
We don't support MinGW compiler and it might bring some problems into
the compilation process. If you see that the detected C++ compiler by
cmake is C:\MinGW\bin\c++.exe
or something similar, you have to get
rid of MinGW path (C:\MinGW\bin
) from the PATH
environment
variable and run cmake again from scratch, so the Visual Studio C++
compiler (cl.exe
) is used instead.
You can define the CMAKE_IGNORE_PATH
variable when running cmake for
the first time in case that you don't know or don't want to modify the
PATH
variable, e.g.:
cmake -DCMAKE_IGNORE_PATH=C:\MinGW\bin ...
More information in issue #2449
Run cmake
with the following parameters and then ninja
:
cd aseprite
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
-DLAF_BACKEND=skia \
-DSKIA_DIR=$HOME/deps/skia \
-DSKIA_LIBRARY_DIR=$HOME/deps/skia/out/Release-x64 \
-DSKIA_LIBRARY=$HOME/deps/skia/out/Release-x64/libskia.a \
-G Ninja \
..
ninja aseprite
In this case, $HOME/deps/skia
is the directory where Skia was
compiled or downloaded. Make sure that CMAKE_OSX_SYSROOT
is
pointing to the correct SDK directory (in this case
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
),
but it could be different in your Mac.
If you running macOS on an ARM64/AArch64/Apple Silicon Mac (e.g. M1),
you can compile a native ARM64 version of Aseprite following similar
steps as above but when we call cmake
, we have some differences:
cd aseprite
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
-DLAF_BACKEND=skia \
-DSKIA_DIR=$HOME/deps/skia \
-DSKIA_LIBRARY_DIR=$HOME/deps/skia/out/Release-arm64 \
-DSKIA_LIBRARY=$HOME/deps/skia/out/Release-arm64/libskia.a \
-DPNG_ARM_NEON:STRING=on \
-G Ninja \
..
ninja aseprite
If you have a Retina display, check the following issue:
You need to use clang and libc++ to compile Aseprite:
cd aseprite
mkdir build
cd build
export CC=clang
export CXX=clang++
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS:STRING=-stdlib=libc++ \
-DCMAKE_EXE_LINKER_FLAGS:STRING=-stdlib=libc++ \
-DLAF_BACKEND=skia \
-DSKIA_DIR=$HOME/deps/skia \
-DSKIA_LIBRARY_DIR=$HOME/deps/skia/out/Release-x64 \
-DSKIA_LIBRARY=$HOME/deps/skia/out/Release-x64/libskia.a \
-G Ninja \
..
ninja aseprite
In this case, $HOME/deps/skia
is the directory where Skia was
compiled or uncompressed.
In case that you are using the pre-compiled Skia version, you must use the clang compiler and libc++ to compile Aseprite. Only if you compile Skia with GCC, you will be able to compile Aseprite with GCC, and this is not recommended as you will have a performance penalty doing so.
If you don't want to use the embedded code of third party libraries
(i.e. to use your installed versions), you can disable static linking
configuring each USE_SHARED_
option.
After running cmake -G
, you can edit build/CMakeCache.txt
file,
and enable the USE_SHARED_
flag (set its value to ON
) of the
library that you want to be linked dynamically.