2016-04-12 04:50:11 +08:00
|
|
|
# Table of contents
|
|
|
|
|
|
|
|
* [Platforms](#platforms)
|
|
|
|
* [Get the source code](#get-the-source-code)
|
|
|
|
* [Dependencies](#dependencies)
|
2016-04-27 11:11:45 +08:00
|
|
|
* [Windows dependencies](#windows-dependencies)
|
2016-10-27 01:58:43 +08:00
|
|
|
* [macOS dependencies](#macos-dependencies)
|
2016-04-12 04:50:11 +08:00
|
|
|
* [Linux dependencies](#linux-dependencies)
|
2025-04-29 23:17:41 +08:00
|
|
|
* [Automatic Building](#automatic-building)
|
|
|
|
* [Manual Building](#manual-building)
|
2016-04-27 11:11:45 +08:00
|
|
|
* [Windows details](#windows-details)
|
2020-06-25 02:37:12 +08:00
|
|
|
* [MinGW](#mingw)
|
2016-10-27 01:58:43 +08:00
|
|
|
* [macOS details](#macos-details)
|
2016-04-27 11:11:45 +08:00
|
|
|
* [Issues with Retina displays](#issues-with-retina-displays)
|
|
|
|
* [Linux details](#linux-details)
|
2016-04-12 04:50:11 +08:00
|
|
|
* [Using shared third party libraries](#using-shared-third-party-libraries)
|
|
|
|
|
2015-01-06 20:34:40 +08:00
|
|
|
# Platforms
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2013-11-24 03:01:34 +08:00
|
|
|
You should be able to compile Aseprite successfully on the following
|
2025-04-29 23:17:41 +08:00
|
|
|
platforms (older and newer versions might work):
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2025-04-29 23:17:41 +08:00
|
|
|
* Windows 11 + [Visual Studio Community 2022 + Windows 11 SDK](https://imgur.com/a/7zs51IT)
|
|
|
|
* *Important*: We don't support [MinGW](#mingw)
|
|
|
|
* macOS 15.2 Sequoia + Xcode 16.3 + macOS 15.4 SDK
|
|
|
|
* Linux Ubuntu Focal Fossa 20.04 + clang 12
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2015-01-06 20:34:40 +08:00
|
|
|
# Get the source code
|
|
|
|
|
2016-04-13 23:00:12 +08:00
|
|
|
You can get the source code downloading a `Aseprite-v1.x-Source.zip`
|
2018-08-24 04:35:05 +08:00
|
|
|
file from the latest Aseprite release (*in that case please follow the
|
|
|
|
compilation instructions inside the `.zip` file*):
|
2015-01-06 20:34:40 +08:00
|
|
|
|
2016-04-13 23:00:12 +08:00
|
|
|
https://github.com/aseprite/aseprite/releases
|
2015-01-06 20:34:40 +08:00
|
|
|
|
2016-04-13 23:00:12 +08:00
|
|
|
Or you can clone the repository and all its submodules using the
|
|
|
|
following command:
|
2015-01-06 20:34:40 +08:00
|
|
|
|
|
|
|
git clone --recursive https://github.com/aseprite/aseprite.git
|
|
|
|
|
2016-04-13 23:00:12 +08:00
|
|
|
To update an existing clone you can use the following commands:
|
2015-11-20 10:12:07 +08:00
|
|
|
|
|
|
|
cd aseprite
|
|
|
|
git pull
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
2016-04-27 11:54:47 +08:00
|
|
|
You can use [Git for Windows](https://git-for-windows.github.io/) to
|
2016-04-27 11:11:45 +08:00
|
|
|
clone the repository on Windows.
|
2015-01-06 20:34:40 +08:00
|
|
|
|
2016-04-12 04:50:11 +08:00
|
|
|
# Dependencies
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
To compile Aseprite you will need:
|
|
|
|
|
2025-04-29 23:17:41 +08:00
|
|
|
* The latest version of [CMake](https://cmake.org)
|
2016-04-27 11:11:45 +08:00
|
|
|
* [Ninja](https://ninja-build.org) build system
|
2024-03-25 22:59:25 +08:00
|
|
|
* And a compiled version of the `aseprite-m124` branch of
|
2020-03-02 10:42:08 +08:00
|
|
|
the [Skia library](https://github.com/aseprite/skia#readme).
|
|
|
|
There are [pre-built packages available](https://github.com/aseprite/skia/releases).
|
|
|
|
You can get some extra information in
|
|
|
|
the [*laf* dependencies](https://github.com/aseprite/laf#dependencies) page.
|
2016-04-27 11:11:45 +08:00
|
|
|
|
|
|
|
## Windows dependencies
|
|
|
|
|
2025-04-29 23:17:41 +08:00
|
|
|
* Windows 11 (we don't support cross-compiling)
|
2022-05-09 21:57:34 +08:00
|
|
|
* [Visual Studio Community 2022](https://visualstudio.microsoft.com/downloads/) (we don't support [MinGW](#mingw))
|
2025-04-29 23:17:41 +08:00
|
|
|
* The [Desktop development with C++ item + Windows 10.0.26100.0 SDK](https://imgur.com/a/7zs51IT)
|
|
|
|
from Visual Studio installer
|
2016-04-27 11:11:45 +08:00
|
|
|
|
2016-10-27 01:58:43 +08:00
|
|
|
## macOS dependencies
|
2016-04-27 11:11:45 +08:00
|
|
|
|
2025-04-29 23:17:41 +08:00
|
|
|
On macOS you will need macOS 15.4 SDK and Xcode 16.3 (older versions might work).
|
2016-04-27 11:11:45 +08:00
|
|
|
|
2016-04-12 04:50:11 +08:00
|
|
|
## Linux dependencies
|
|
|
|
|
2018-08-29 21:24:13 +08:00
|
|
|
You will need the following dependencies on Ubuntu/Debian:
|
2016-04-12 04:50:11 +08:00
|
|
|
|
2025-09-17 07:43:59 +08:00
|
|
|
sudo apt-get install -y g++ clang cmake ninja-build libx11-dev libxcursor-dev libxi-dev libxrandr-dev libgl1-mesa-dev libfontconfig1-dev
|
2023-01-09 20:47:28 +08:00
|
|
|
|
2025-04-29 23:17:41 +08:00
|
|
|
Or use clang-12 packages (or newer) in case that clang in your distribution is older than clang 12.0:
|
2023-01-09 20:47:28 +08:00
|
|
|
|
2025-04-29 23:17:41 +08:00
|
|
|
sudo apt-get install -y clang-12
|
2018-08-29 21:24:13 +08:00
|
|
|
|
|
|
|
On Fedora:
|
|
|
|
|
2025-09-17 07:43:59 +08:00
|
|
|
sudo dnf install -y gcc-c++ clang libcxx-devel cmake ninja-build libX11-devel libXcursor-devel libXi-devel libXrandr-devel mesa-libGL-devel fontconfig-devel
|
2016-04-12 04:50:11 +08:00
|
|
|
|
2021-06-20 17:25:52 +08:00
|
|
|
On Arch:
|
|
|
|
|
2025-09-17 07:43:59 +08:00
|
|
|
sudo pacman -S gcc clang cmake ninja libx11 libxcursor libxi libxrandr mesa-libgl fontconfig libwebp
|
2021-06-20 17:25:52 +08:00
|
|
|
|
2022-09-09 09:06:01 +08:00
|
|
|
On SUSE:
|
|
|
|
|
2025-09-17 07:43:59 +08:00
|
|
|
sudo zypper install gcc-c++ clang cmake ninja libX11-devel libXcursor-devel libXi-devel libXrandr-devel Mesa-libGL-devel fontconfig-devel
|
2022-09-09 09:06:01 +08:00
|
|
|
|
2025-04-29 23:17:41 +08:00
|
|
|
# Automatic Building
|
|
|
|
|
|
|
|
We offer a new [build script](build.sh) that automates and help you to
|
|
|
|
compile Aseprite following instructions on screen. This will be the
|
|
|
|
preferred method for new users and developers to compile Aseprite.
|
|
|
|
|
|
|
|
After you get [get Aseprite code](#get-the-source-code) and install
|
|
|
|
[its dependencies](#dependencies), you can run [build.cmd](build.cmd)
|
|
|
|
file on Windows double-clicking it, or [build.sh](build.sh) on macOS or
|
|
|
|
Linux running it from the terminal from the same Aseprite folder.
|
|
|
|
|
|
|
|
# Manual Building
|
2013-11-24 03:32:13 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
1. [Get Aseprite code](#get-the-source-code), put it in a folder like
|
|
|
|
`C:\aseprite`, and create a `build` directory inside to leave all
|
|
|
|
the files that are result of the compilation process (`.exe`,
|
|
|
|
`.lib`, `.obj`, `.a`, `.o`, etc).
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
cd C:\aseprite
|
|
|
|
mkdir build
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2013-11-24 03:01:34 +08:00
|
|
|
In this way, if you want to start with a fresh copy of Aseprite
|
2012-07-08 12:41:14 +08:00
|
|
|
source code, you can remove the `build` directory and start again.
|
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
2. Enter in the new directory and execute `cmake`:
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
cd C:\aseprite\build
|
2020-03-02 10:42:08 +08:00
|
|
|
cmake -G Ninja -DLAF_BACKEND=skia ..
|
2016-04-12 04:50:11 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
Here `cmake` needs different options depending on your
|
|
|
|
platform. You must check the details for
|
2016-10-27 01:58:43 +08:00
|
|
|
[Windows](#windows-details), [macOS](#macos-details), and
|
2016-04-27 11:11:45 +08:00
|
|
|
[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).
|
2016-04-12 04:50:11 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
3. After you have executed and configured `cmake`, you have to compile
|
|
|
|
the project:
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
cd C:\aseprite\build
|
|
|
|
ninja aseprite
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
4. When `ninja` finishes the compilation, you can find the executable
|
|
|
|
inside `C:\aseprite\build\bin\aseprite.exe`.
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
## Windows details
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2024-07-30 04:31:03 +08:00
|
|
|
Open a command prompt window with the VS 2022 tools. For this you can
|
|
|
|
search for `x64 Native Tools Command Prompt for VS 2022` in the Start
|
|
|
|
menu, or open a `cmd.exe` terminal and run:
|
2019-01-02 23:22:00 +08:00
|
|
|
|
2022-05-09 21:57:34 +08:00
|
|
|
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -arch=x64
|
2019-01-02 23:22:00 +08:00
|
|
|
|
2024-07-30 04:31:03 +08:00
|
|
|
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](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)
|
|
|
|
instead.
|
2023-10-02 20:55:25 +08:00
|
|
|
|
2019-01-02 23:22:00 +08:00
|
|
|
And then
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
cd aseprite
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2020-08-17 22:56:07 +08:00
|
|
|
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 ..
|
2016-04-27 11:11:45 +08:00
|
|
|
ninja aseprite
|
2016-02-29 23:25:15 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
In this case, `C:\deps\skia` is the directory where Skia was compiled
|
2020-03-02 10:42:08 +08:00
|
|
|
or uncompressed.
|
2015-04-10 20:37:56 +08:00
|
|
|
|
2020-06-25 03:01:31 +08:00
|
|
|
### MinGW
|
2020-06-25 02:37:12 +08:00
|
|
|
|
2020-06-25 03:00:18 +08:00
|
|
|
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](https://github.com/aseprite/aseprite/issues/2449)
|
2020-06-25 02:37:12 +08:00
|
|
|
|
2016-10-27 01:58:43 +08:00
|
|
|
## macOS details
|
2015-12-30 23:29:53 +08:00
|
|
|
|
2020-03-02 10:42:08 +08:00
|
|
|
Run `cmake` with the following parameters and then `ninja`:
|
2015-12-30 23:29:53 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
cd aseprite
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake \
|
2019-01-02 23:22:00 +08:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2016-04-27 11:11:45 +08:00
|
|
|
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
|
2018-12-29 06:17:54 +08:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
|
2021-11-17 08:20:00 +08:00
|
|
|
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
|
2020-03-02 10:42:08 +08:00
|
|
|
-DLAF_BACKEND=skia \
|
2016-04-27 11:11:45 +08:00
|
|
|
-DSKIA_DIR=$HOME/deps/skia \
|
2020-03-02 10:42:08 +08:00
|
|
|
-DSKIA_LIBRARY_DIR=$HOME/deps/skia/out/Release-x64 \
|
2020-08-17 22:56:07 +08:00
|
|
|
-DSKIA_LIBRARY=$HOME/deps/skia/out/Release-x64/libskia.a \
|
2016-04-27 11:11:45 +08:00
|
|
|
-G Ninja \
|
|
|
|
..
|
|
|
|
ninja aseprite
|
|
|
|
|
|
|
|
In this case, `$HOME/deps/skia` is the directory where Skia was
|
2020-03-02 10:42:08 +08:00
|
|
|
compiled or downloaded. Make sure that `CMAKE_OSX_SYSROOT` is
|
|
|
|
pointing to the correct SDK directory (in this case
|
2021-11-17 08:20:00 +08:00
|
|
|
`/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`),
|
2018-12-29 06:17:54 +08:00
|
|
|
but it could be different in your Mac.
|
2012-07-08 12:41:14 +08:00
|
|
|
|
2021-11-17 08:20:00 +08:00
|
|
|
### Apple Silicon
|
|
|
|
|
|
|
|
If you running macOS on an ARM64/AArch64/Apple Silicon Mac (e.g. M1),
|
2024-07-30 04:31:03 +08:00
|
|
|
you can compile a native ARM64 version of Aseprite following similar
|
2021-11-17 08:20:00 +08:00
|
|
|
steps as above but when we call `cmake`, we have some differences:
|
|
|
|
|
2023-07-01 12:22:56 +08:00
|
|
|
cd aseprite
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2021-11-17 08:20:00 +08:00
|
|
|
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 \
|
|
|
|
..
|
2024-07-09 15:12:56 +08:00
|
|
|
ninja aseprite
|
2021-11-17 08:20:00 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
### Issues with Retina displays
|
2012-07-10 05:29:36 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
If you have a Retina display, check the following issue:
|
2014-08-14 11:41:30 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
https://github.com/aseprite/aseprite/issues/589
|
2016-04-27 02:01:10 +08:00
|
|
|
|
2016-04-27 11:11:45 +08:00
|
|
|
## Linux details
|
2016-04-27 02:01:10 +08:00
|
|
|
|
2025-04-29 23:17:41 +08:00
|
|
|
You can compile Aseprite with gcc or clang. In case that you are using
|
|
|
|
the [pre-compiled Skia version](https://github.com/aseprite/skia/releases/),
|
|
|
|
you must use libstdc++ to compile Aseprite:
|
2016-04-27 02:01:10 +08:00
|
|
|
|
|
|
|
cd aseprite
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2022-05-09 21:57:34 +08:00
|
|
|
export CC=clang
|
|
|
|
export CXX=clang++
|
2019-01-02 23:22:00 +08:00
|
|
|
cmake \
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2025-04-29 23:17:41 +08:00
|
|
|
-DCMAKE_CXX_FLAGS:STRING=-stdlib=libstdc++ \
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS:STRING=-stdlib=libstdc++ \
|
2020-03-02 10:42:08 +08:00
|
|
|
-DLAF_BACKEND=skia \
|
2019-01-02 23:22:00 +08:00
|
|
|
-DSKIA_DIR=$HOME/deps/skia \
|
2020-03-02 10:42:08 +08:00
|
|
|
-DSKIA_LIBRARY_DIR=$HOME/deps/skia/out/Release-x64 \
|
2020-08-17 22:56:07 +08:00
|
|
|
-DSKIA_LIBRARY=$HOME/deps/skia/out/Release-x64/libskia.a \
|
2019-01-02 23:22:00 +08:00
|
|
|
-G Ninja \
|
|
|
|
..
|
2016-04-27 11:11:45 +08:00
|
|
|
ninja aseprite
|
2016-04-27 02:01:10 +08:00
|
|
|
|
2018-08-09 05:31:48 +08:00
|
|
|
In this case, `$HOME/deps/skia` is the directory where Skia was
|
2020-03-02 10:42:08 +08:00
|
|
|
compiled or uncompressed.
|
2015-04-18 01:30:09 +08:00
|
|
|
|
2015-01-06 20:34:40 +08:00
|
|
|
# Using shared third party libraries
|
2013-11-24 03:32:13 +08:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2016-02-29 23:34:55 +08:00
|
|
|
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.
|